Title: eth_rec()

eth_rec() is called from the main loop or by eth_get_stat() or by eth_set_rec_conf() upon receipt of a message from the ethernet task. If the message is valid, the message will either indicate that a write operation has successfully ended (in which case, write_int() is called) or that the ethernet task has received a packet (in which case, read_int() is called).

The message (which is of type mess_2) has the following structure:
From dp8390.c:

* |------------|----------|---------|----------|---------|---------|
* |DL_TASK_REPL| port nr | proc nr | rd-count | err|stat| clock |
* |------------|----------|---------|----------|---------|---------|

From include/minix/type.h:

typedef struct {
int m_source;                     /* who sent the message */
int m_type;                     /* what kind of message is it */
union {
       mess_1 m_m1;
       mess_2 m_m2;
       mess_3 m_m3;
       mess_4 m_m4;
       mess_5 m_m5;
       mess_6 m_m6;
} m_u;
} message;

typedef struct {int m2i1, m2i2, m2i3; long m2l1, m2l2; char *m2p1;} mess_2;

From include/minix/com.h:

#       define DL_PORT              m2_i1
#       define DL_PROC              m2_i2
#       define DL_COUNT              m2_i3
#       define DL_CLCK              m2_l2
#       define DL_STAT              m2_l1