Computer Science 881 Quiz 2 Name _________________ 1. Identify the socket calls for which UDP provides its own handler (as opposed to relying upon the AF_INET handler to do all the work) ___ a. socket() ___ c. bind() ___ b. connect() ___ d. sendto() 2. The UDP port allocation algorithm guarantees that the port that is allocated will be a. The hash queue that has the b. The shortest existing hash least amount of active traffic queue. c. The hash queue from which a d. selected from a randomly port has been least recently chosen hash queue allocated. 4. Which of the following best characterizes a "shared" sk_buff. a. Multiple struct sk_buff's b. A single struct sk_buff point to a single kmalloc'd points to multiple kmalloc'd buffer area buffer areas c. Multiple entities hold valid pointers to a single struct sk_buff 5. Which of the following best characterizes a "cloned" sk_buff. a. Multiple struct sk_buff's b. A single struct sk_buff point to a single kmalloc'd points to multiple kmalloc'd buffer area buffer areas c. Multiple entities hold valid pointers to a single struct sk_buff 6. Pointers to the fragment list and unmapped page buffers are kept in a. the struct sk_buff b. the kmalloc'd area that is also used to hold header and application data. c. in an extra area that is also kmalloc'd. 7. Answer I, D, or N depending upon whether the specified function Increases, Decreases, or has no effect on sk_buff headroom. ___ a. skb_reserve() ___ b. skb_put() ___ c. skb_pull() 8. During the socket creation (fd = socket(family, type, protocol)) Which one of the three parameters shown above is used to index the hash queue on which the desired inet_protosw structure should be found. 9. During a UDP bind operation a. If the socket is not already b. Any existing connection is connected inet_autoconn() is reset to null. called to connect it. c. The connection status is not altered. 10. During a UDP connect operation a. If the socket is not already b. Any existing bind status is bound inet_autobind() is reset to null called to bind it. c. The bind status is not altered. 11. In UDP identify the best characterization of the use of ip_route_output() for both connected and non connected sockets when a large number of packets are to be sent to a single receiver ____ a. connected 1. Never needs to be called 2. Needs to be called EXACTLY once ____ b. not connected 3. Needs to be called at least once but not for every packet sent 4. Must be called for every packet sent. 12. During a UDP sendto operation, the data to be transmitted is copied from user space to kernel space a. Before the call to b. During the call to ip_build_xmit() ip_build_xmit() c. After return from ip_build_xmit() 13. It is possible for a process to be put to sleep during a UDP send. Describe how and where in the code this can happen. 14. Suppose that the value of the udp_port_rover in udp_v4_get_port() is 0x85C3. a. Write in hex the index of the associated hash queue. b. Suppose this queue is selected but it is not empty. If port 0x85C3 is found already in use what will be the next port number tested. c. In the worst case what is the maximum number of ports that may have to be tested?