Title: icmp_write()


icmp_write() loops through an icmp port's write queue, each time placing the head of the queue into the icp_write_pack field of the icmp port and then calling ip_write() to send this icmp packet out.

After functions build an icmp packet, they call enqueue_pack() to send the icmp packet out rather than call icmp_write() directly. enqueue_pack() enqueues the icmp packet if another icmp packet is currently being sent out.

It is doubtful that the write queue mentioned above will ever be more than a single icmp packet. ip_write() was rewritten and currently only returns NW_OK. If the packet is valid, ip_write() always moves the packet to the ip layer even if the packet isn't immediately sent out the ethernet or the psip interface.