Unit Two Objectives, CSCI 661, Computer Networks II UNIX Network Programming - 3rd edition - W. R. Stevens, et. al. Chapter 4 - Elementary TCP Sockets 1)Define and give the order of socket services for the client & server. 2)Describe the three basic error possibilities for the connect() service. And explain the thinking regarding ENETUNREACH versus EHOSTUNREACH. 3)Explain the three reasons a server would send RESET. See p 107 also. 4)Describe two roles of the bind function and how to confirm the operation. 5)Explain the TCP/IP stack interprets client/server connections when source addresses are NOT specified. 6)Explain how, in one sense, the role of the listen function is silly, yet in another sense, it plays a key role in connection establishment. 7)Describe the accept function arguments and its key role. 8)Explain how the close function is typically automatic, but when programming concurrent servers, close must be used carefully. 9)Give the five scenarios for using getsockname and getpeername functions. Chapter Five - Client-Server Example (Boundary Conditions) 1)Explain how to test (execute) the client-server example on one host and list the three steps to achieve a state of equilibrium. 2)List the six basic steps of "closure" for the client-server. 3)Contrast "slow" versus "fast" system calls and "manual" versus "automatic" restart of system calls (see p. 134). 4)Explain the oxymoron of a signal handler that must execute "wait()" and list the four steps in processing SIGCHLD (see pp. 132-134). 5)Explain the "nondeterministic" nature of signals and explain how to overcome this UNIX design flaw (see p. 135-139). 6)Explain the role of "EINTR" in server code design (see p. 134 & 139). 7)Explain how the terminated server impacts the client return codes and Stevens suggest remedy. 8)Explain the role of the SIGPIPE signal in TCP connections; explain its "silent" nature, and explain how to make it visible. 9)Contrast what the client sees in a server crash, server host crash, and server host reboot. 10)Describe the three basic problems with sending data among hosts and the two solutions. p. 150 Boundry Zone Lecture 1)Explain the nature of the "boundry zone" and explain the role of the following programs: DD, ifconfig, route, netstat, arp, & iptables. Boundry zone - allows synchronization between user initiated network requests and incoming network packets. Contains a linked list or array of IP packets which have yet to be processed. Also has the following data structures: Routing Table - associates an IP address with an interface plus node status ARP Table - associates an IP address with an Ethernet station address Firewall In & Out Tables - Accepts or denys IP addresses to/from interface Masquerade - Maps ephemeral ports above 32,000 for hidden TCP & UDP hosts Device Driver - Delivers IP packets into the boundry zone from an interface and accepts packets from the boundry zone for the interface. Ifconfig - Enables a DD, associates an interface, establishes route metric Route - Fills in the routing table with IP address and interface pairs. RIP - Net-based packet which adds entries to the routing table. Netstat - Shows the contents of routing table and socket states. ARP - Shows/sets current list of physical and IP addresse pairs. Iptables - Shows/sets firewall and masquerade tables. Chapter Six - I/O Multiplexing: The select() and poll() Functions 1)Stevens I/O Multiplexing is really asychronous (non-blocking) slow I/O (also called real-time I/O). Contrast slow versus fast I/O and synchronous (blocking) versus asychronous (non-blocking) I/0. 2)Decribe the role of the select() function and describe in detail its arguments. 3)Given the amount of debugging time that the select call introduces, support or refute the need for requiring the programmer to count "fd"s and adding 1 to create maxfdp1. 4)Explain what is meant by a socket's "low water mark," and explain how and why it might be manipulated. 5)Contrast the close() and shutdown() functions and explain how shutdown() is used. 6)Describe the additional complexity of desiging a multi-client server as a single process (iterative) server and a possible pitfall. Chapter Seven - Socket Options 1)Describe the overall role of the get/setsockopt, fcntl, and ioctl functions. 2)Explain the interaction among listen(), accept(), and get/setsockopt(). 3)Contrast three types of "broadcast" and the constraints (four parts). 4)Contrast the routing table, SO_DONTROUTE, & MSG_DONTROUTE.