diff options
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/gpxe/netdevice.h | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/src/include/gpxe/netdevice.h b/src/include/gpxe/netdevice.h index 1ef648e11..cdc8cbad4 100644 --- a/src/include/gpxe/netdevice.h +++ b/src/include/gpxe/netdevice.h @@ -76,7 +76,7 @@ struct ll_protocol { /** Protocol name */ const char *name; /** - * Transmit network-layer packet via network device + * Add link-layer header * * @v iobuf I/O buffer * @v netdev Network device @@ -85,24 +85,28 @@ struct ll_protocol { * @ret rc Return status code * * This method should prepend in the link-layer header - * (e.g. the Ethernet DIX header) and transmit the packet. - * This method takes ownership of the I/O buffer. + * (e.g. the Ethernet DIX header). */ - int ( * tx ) ( struct io_buffer *iobuf, struct net_device *netdev, - struct net_protocol *net_protocol, - const void *ll_dest ); + int ( * push ) ( struct io_buffer *iobuf, struct net_device *netdev, + struct net_protocol *net_protocol, + const void *ll_dest ); /** - * Handle received packet + * Remove link-layer header * * @v iobuf I/O buffer * @v netdev Network device + * @v net_proto Network-layer protocol, in network-byte order + * @v ll_source Source link-layer address + * @ret rc Return status code * * This method should strip off the link-layer header - * (e.g. the Ethernet DIX header) and pass the packet to - * net_rx(). This method takes ownership of the packet - * buffer. + * (e.g. the Ethernet DIX header) and return the protocol and + * source link-layer address. The method must not alter the + * packet content, and may return the link-layer address as a + * pointer to data within the packet. */ - int ( * rx ) ( struct io_buffer *iobuf, struct net_device *netdev ); + int ( * pull ) ( struct io_buffer *iobuf, struct net_device *netdev, + uint16_t *net_proto, const void **ll_source ); /** * Transcribe link-layer address * |
