[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:
Michael Brown
2013-09-01 20:55:18 +01:00
parent 8a2dc7a588
commit 6bf36f57a0
8 changed files with 26 additions and 13 deletions

View File

@@ -38,12 +38,15 @@ struct tcpip_protocol icmp_protocol __tcpip_protocol;
* Process a 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
* @ret rc Return status code
*/
static int icmp_rx ( struct io_buffer *iobuf, struct sockaddr_tcpip *st_src,
static int icmp_rx ( struct io_buffer *iobuf,
struct net_device *netdev __unused,
struct sockaddr_tcpip *st_src,
struct sockaddr_tcpip *st_dest,
uint16_t pshdr_csum __unused ) {
struct icmp_header *icmp = iobuf->data;