diff options
| author | Michael Brown | 2008-08-20 04:21:37 +0200 |
|---|---|---|
| committer | Michael Brown | 2008-08-20 04:21:37 +0200 |
| commit | 30fb3b3810409a4971adf9abf00e0842f88d87d8 (patch) | |
| tree | 19e986606936b2e6f1eed89b066cb2791f77c9b5 /src/include | |
| parent | [undi] Work around broken UNDI polling behaviour in winBoot/i (diff) | |
| download | ipxe-30fb3b3810409a4971adf9abf00e0842f88d87d8.tar.gz ipxe-30fb3b3810409a4971adf9abf00e0842f88d87d8.tar.xz ipxe-30fb3b3810409a4971adf9abf00e0842f88d87d8.zip | |
[undi] Fill in ProtType correctly in PXENV_UNDI_ISR
Determine the network-layer packet type and fill it in for UNDI
clients. This is required by some NBPs such as emBoot's winBoot/i.
This change requires refactoring the link-layer portions of the
gPXE netdevice API, so that it becomes possible to strip the
link-layer header without passing the packet up the network stack.
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 * |
