Traditionally, the Unix routing table within the kernel has been accessed using
ioctl commands. In Section 17.9, we described the two commands that are provided,
SIOCDELRT, to add or delete a route. We also mentioned that no command exists to dump the entire routing table, and instead programs such as
netstat read the kernel memory to obtain the contents of the routing table. One additional piece to this hodgepodge is that routing daemons such as
gated need to monitor ICMP redirect messages that are received by the kernel, and they often do this by creating a raw ICMP socket (Chapter 28) and listening on this socket to all received ICMP messages.
4.3BSD Reno cleaned up the interface to the kernel’s ...