diff options
author | Michael Brown | 2013-09-01 21:55:18 +0200 |
---|---|---|
committer | Michael Brown | 2013-09-03 03:02:58 +0200 |
commit | 6bf36f57a0f7a22ffa85ae4995933077df62e309 (patch) | |
tree | 46822c3bbedc5fea9c395daf313fd83803131f81 /src/include/ipxe/tcpip.h | |
parent | [linux] Apply MAC address prior to registering network device (diff) | |
download | ipxe-6bf36f57a0f7a22ffa85ae4995933077df62e309.tar.gz ipxe-6bf36f57a0f7a22ffa85ae4995933077df62e309.tar.xz ipxe-6bf36f57a0f7a22ffa85ae4995933077df62e309.zip |
[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>
Diffstat (limited to 'src/include/ipxe/tcpip.h')
-rw-r--r-- | src/include/ipxe/tcpip.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/include/ipxe/tcpip.h b/src/include/ipxe/tcpip.h index 0cc688a9..b2c559e2 100644 --- a/src/include/ipxe/tcpip.h +++ b/src/include/ipxe/tcpip.h @@ -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, |