Title: ip_buffree()


ip_buffree(priority) is called by bf_memreq() if bf_memreq() does not have enough accessors to satisfy a buffer request.

priority, ip_buffree()'s only parameter, will be either IP_PRI_PORTBUFS (#define'd as 3), IP_PRI_ASSBUFS (4), IP_PRI_FDBUFS_EXTRA (5), or IP_PRI_FDBUFS (6). If priority is IP_PRI_PORTBUFS, all packets (which are held in accessors) in the ip port's loopback queue (i.e., packets in the ip_loopb_head queue) are freed. In addition, accessors specific to an ip port's underlying data link layer are freed. For example, if the underlying data link layer protocol is ethernet, packets waiting for arp resolution (i.e., packets in the de_arp_head queue) and packets waiting to be sent out (i.e., packets in the de_q_head queue) are freed. If priority is IP_PRI_FDBUFS, all packets in the read queues of all ip file descriptors are freed. If priority is IP_PRI_FDBUFS_EXTRA, every packet except the last packet in the read queue of each ip file descriptor is freed. If priority is IP_PRI_ASBUFS, all fragments in ip_ass_table[] are freed.