Page #444 (Chapter 26)


Chapter 27

27.1

Nothing changes; all the systems are neighbors, so a strict source route is identical to a loose source route.

27.2

We would place an EOL (a byte of 0) at the end of the buffer.

27.3

Since ping creates a raw socket (Chapter 28), it receives the complete IP header, including any IP options, on every datagram it reads with recvfrom .

27.4

rlogind is invoked by inetd (Section 13.5), so descriptor 0 is the socket to the client.

27.5

The problem is that the fifth argument to setsockopt is the pointer to the length, instead of the length. This bug was probably fixed when ANSI C prototypes were first used.

As it turns out, the bug is harmless, because as we mentioned, to clear the IP_OPTIONS socket option, we can specify either a null pointer as the fourth argument or a fifth argument (the length) of 0 (p.269 of TCPv2).




UNIX Network Programming Volume 1, Third Edition
Unix Network Programming, Volume 1: The Sockets Networking API (3rd Edition)
ISBN: 0131411551
EAN: 2147483647
Year: 2003
Pages: 441

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net