January 1995
Intermediate to advanced
1200 pages
31h 3m
English
A process accesses the raw IP layer by creating a socket of type SOCK_RAW in the Internet domain. There are three uses for raw sockets:
1. Raw sockets allow a process to send and receive ICMP and IGMP messages.
The Ping program uses this type of socket to send ICMP echo requests and to receive ICMP echo replies.
Some routing daemons use this feature to track ICMP redirects that are processed by the kernel. We saw in Section 19.7 that Net/3 generates an RTM_REDIRECT message on a routing socket when a redirect is processed, obviating the need for this use of raw sockets.
This feature is also used to implement protocols based on ICMP, such as router advertisement and router solicitation ...
Read now
Unlock full access