[tcpip] Pass through network device to transport layer protocols
NDP requires knowledge of the network device on which a packet was received. Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -69,6 +69,7 @@ struct tcpip_protocol {
|
||||
* Process received packet
|
||||
*
|
||||
* @v iobuf I/O buffer
|
||||
* @v netdev Network device
|
||||
* @v st_src Partially-filled source address
|
||||
* @v st_dest Partially-filled destination address
|
||||
* @v pshdr_csum Pseudo-header checksum
|
||||
@@ -76,7 +77,8 @@ struct tcpip_protocol {
|
||||
*
|
||||
* This method takes ownership of the I/O buffer.
|
||||
*/
|
||||
int ( * rx ) ( struct io_buffer *iobuf, struct sockaddr_tcpip *st_src,
|
||||
int ( * rx ) ( struct io_buffer *iobuf, struct net_device *netdev,
|
||||
struct sockaddr_tcpip *st_src,
|
||||
struct sockaddr_tcpip *st_dest, uint16_t pshdr_csum );
|
||||
/**
|
||||
* Transport-layer protocol number
|
||||
@@ -128,8 +130,8 @@ struct tcpip_net_protocol {
|
||||
/** Declare a TCP/IP network-layer protocol */
|
||||
#define __tcpip_net_protocol __table_entry ( TCPIP_NET_PROTOCOLS, 01 )
|
||||
|
||||
extern int tcpip_rx ( struct io_buffer *iobuf, uint8_t tcpip_proto,
|
||||
struct sockaddr_tcpip *st_src,
|
||||
extern int tcpip_rx ( struct io_buffer *iobuf, struct net_device *netdev,
|
||||
uint8_t tcpip_proto, struct sockaddr_tcpip *st_src,
|
||||
struct sockaddr_tcpip *st_dest, uint16_t pshdr_csum );
|
||||
extern int tcpip_tx ( struct io_buffer *iobuf, struct tcpip_protocol *tcpip,
|
||||
struct sockaddr_tcpip *st_src,
|
||||
|
||||
Reference in New Issue
Block a user