21.8 dg_cli Function Using Multicasting


Exercises

20.1

Run the UDP client using the dg_cli function that broadcasts (Figure 20.5). How many replies do you receive? Are the replies always in the same order? Do the hosts on your network have synchronized clocks?

20.2

Put some printfs in Figure 20.10 after select returns to see whether it returns an error or readability for one of the two descriptors. When the alarm expires , does your system return EINTR or readability on the pipe?

20.3

Run a tool such as tcpdump , if available, and look for broadcast packets on your LAN; tcpdump ether broadcast is the tcpdump command. To which protocol suites do the broadcasts belong?




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