Title: packet2user() / ip


packet2user() attempts to pass a packet off to a higher layer (e.g., udp). If the ip file descriptor is not currently being read (i.e., the IFF_READ_IP flag in the if_flags field of the ip file descriptor is not set), packet2user() puts the packet at the end of its read queue and returns. Note that if the udp code opened the ip file descriptor, however, the udp code set the IFF_READ_IP flag during its initialization and that this flag remains set until the ip file descriptor is closed.