Computer Science 481/681 Quiz 8 - Name ________________________ 1. To send a UDP datagram a program must first create a socket of type: a. SOCK_RAW b. SOCK_UDP c. SOCK_STREAM d. SOCK_DGRAM 2. The recvfrom() system call (like sendto) contains a pointer to struct sockaddr_in. This structure is used to specify a. The local address to which b. Contains the IP and Port the recipient is willing address of the sender at to accept datagrams. when the receive completes c. Both a. and b. d. Neither a. or b. 3. The type of service provided by UDP is best described as a. Connection oriented and b. Connection less and reliable reliable c. Connection oriented and d. Connection less and unreliable unreliable 4. Which of the following "offenses" are most likely to be encountered by users of UDP a. Delivery of duplicate copies b. Discarding and thus "loss" of a single packet. a complete packet. c. Loss of part of a packet. d. None of the above are ever encountered using UDP 6. The maximum size of a UDP datagram that can be transmitted with sendto() (i.e. sendto will actually send it not give you back an immediate -1 return code) a. is always 64K bytes. b. Varies from system to system but is generally larger than 8K bytes c. is always 65507 bytes. d. Is 256 bytes. 7. Setting the IP address field of the sockaddr_in field specified in the bind system call to 0 a. makes the socket not usable b. specifies the receivers for receiving any data. willingness to accept datagrams from any remote IP address. c. specifies the receivers willingness to accept datagrams directed to any local IP address. 8. Which of the following network api system calls can be used to specify that you wish to receive ONLY those udp packets that arrive from a specific remote IP address? a. bind b. select c. connect d. reject 9. Assuming that DF is not set. Fragmentation works the following way in IPV4: a. A packet must be broken down b. A packet will be fragmented into MTU size frags by the source by the router owning the link host and will be reassembled at whose MTU is too small and the destination. will be reassembled by the next router that can handle the c. A packet will be fragmented d. A packet must be broken down by the router owning the link into MTU size units by the whose MTU is too small but not originating host but will reassembled until it reaches the be reassembled as soon as it destination. passes the bottleneck router. 10. The ARP pathology example in the book shows that a UDP datagram transmission from a host on an ethernet will fail: a. Any time the packet to be sent b. Whenever the next hop hardware is larger than Ethernets MTU address is not in the ARP cache. c. Either a. or b. is true. d. both a. and b. are true. 11. In the same example it was also noted that an ICMP reassembly timeout was not returned. The impact of this on the application is: a. the application will hang b. the "sendto" function will in "sendto." return a misleading error code. c. none at all. From the apps perspective the situation will be exactly as if the ICMP message had been sent.