Title: find_port()


find_port(m) returns the ethernet port whose etp_port field is equal to DL_PORT field of the message m, find_port()'s only parameter.

For the following inet.conf file for a system with two DP8390 ethernet cards:

eth0 DP8390 0 { default; };
psip1;
eth2 DP8390 1;


the ethernet port associated with eth0 will have an etp_port field equal to 0 and the ethernet port associated with eth2 will have an etp_port field equal to 1.

find_port() is called by setup_read() and eth_write_port(). Both functions call find_port() after an attempt to send a message to the ethernet task is blocked by a message sent by the ethernet task to the network service.