mirror of
https://github.com/ipxe/ipxe
synced 2025-12-27 01:52:39 +03:00
[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.
This commit is contained in:
@@ -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
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user