diff options
author | Michael Brown | 2007-01-10 03:25:11 +0100 |
---|---|---|
committer | Michael Brown | 2007-01-10 03:25:11 +0100 |
commit | f008b77ba2b7d921a9d765c9931694e9c7d13ee9 (patch) | |
tree | 1464a93bb9b01a2ae75ed87aa5b5d1e52b91392d /src/net/tcpip.c | |
parent | Add interface management commands (diff) | |
download | ipxe-f008b77ba2b7d921a9d765c9931694e9c7d13ee9.tar.gz ipxe-f008b77ba2b7d921a9d765c9931694e9c7d13ee9.tar.xz ipxe-f008b77ba2b7d921a9d765c9931694e9c7d13ee9.zip |
Allow an explicit network device to be specified for IP-layer
transmissions.
Diffstat (limited to 'src/net/tcpip.c')
-rw-r--r-- | src/net/tcpip.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/net/tcpip.c b/src/net/tcpip.c index ae22104a..eec9ee94 100644 --- a/src/net/tcpip.c +++ b/src/net/tcpip.c @@ -65,11 +65,13 @@ int tcpip_rx ( struct pk_buff *pkb, uint8_t tcpip_proto, * @v pkb Packet buffer * @v tcpip_protocol Transport-layer protocol * @v st_dest Destination address + * @v netdev Network device (or NULL to route automatically) * @v trans_csum Transport-layer checksum to complete, or NULL * @ret rc Return status code */ int tcpip_tx ( struct pk_buff *pkb, struct tcpip_protocol *tcpip_protocol, - struct sockaddr_tcpip *st_dest, uint16_t *trans_csum ) { + struct sockaddr_tcpip *st_dest, struct net_device *netdev, + uint16_t *trans_csum ) { struct tcpip_net_protocol *tcpip_net; /* Hand off packet to the appropriate network-layer protocol */ @@ -78,7 +80,7 @@ int tcpip_tx ( struct pk_buff *pkb, struct tcpip_protocol *tcpip_protocol, if ( tcpip_net->sa_family == st_dest->st_family ) { DBG ( "TCP/IP sending %s packet\n", tcpip_net->name ); return tcpip_net->tx ( pkb, tcpip_protocol, st_dest, - trans_csum ); + netdev, trans_csum ); } } |