
mp = ms; 8
mn =
if
} else { 12
len +=
}
mn =
}
1While true, removes packets from the pending queue and has the device transmit the packets.
2Calls the IF_DEQUEUE macro to remove an entry from the output queue. The output queue is referenced through the if_snd member of the ifnet data structure for this device. The memory buffer information is the instance of the mbuf data structure called m.
3Checks that the total packet length is less than the number of bytes left in the transmit
4Eliminates any
5Skips over any leading
6Stores the next memory buffer in the chain of mbuf data structures in the ms mbuf pointer. The m_next member stores the next memory buffer in the chain. Network device drivers typically reference this member through the alternate name m_next, which is defined in the mbuf.h header file.
7If this is a
8Stores the first memory buffer in the chain of mbuf data structures in the mp mbuf pointer.
9Stores the next memory buffer in the chain of mbuf data structures in the mn mbuf pointer.
10
Stores the amount of data in the mp mbuf in the len variable. The mh_len member of the mbuf data structure pointer stores the amount of data in this mbuf data structure. Network device drivers typically reference this member through the alternate name m_len, which is defined in the mbuf.h header file.
11
While the mn mbuf is not NULL, manipulates the mh_len and mh_next members of the mbuf data structure to eliminate any