Title: eth_close()


eth_close() simply closes a previously opened ethernet file descriptor. To be more specific, eth_close() removes the ethernet file descriptor from the appropriate linked list, frees all the packets in its read queue, and marks the ethernet file descriptor as available. In addition to this, eth_close() sends a message requesting to the ethernet task requesting that it change the receiving capabilities for the ethernet file descriptor's ethernet port.

eth_close() is called only to close an ethernet device file (e.g., /dev/eth) that has been directly opened. eth_close() will not be called if a higher-layer device file (e.g., /dev/udp) has been opened.