summaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
authorMichael Brown2010-10-07 17:03:16 +0200
committerMichael Brown2010-10-07 20:15:04 +0200
commit88dd921e24af0893734d4e197d646cfc7732ed54 (patch)
tree8ecbe7ef1e5d84b2243894769a9ab1251d5c56de /src/include
parent[int13] Fix typo in debug message (diff)
downloadipxe-88dd921e24af0893734d4e197d646cfc7732ed54.tar.gz
ipxe-88dd921e24af0893734d4e197d646cfc7732ed54.tar.xz
ipxe-88dd921e24af0893734d4e197d646cfc7732ed54.zip
[netdevice] Pass both link-layer addresses in net_tx() and net_rx()
FCoE requires the use of fabric-provided MAC addresses, which breaks the assumption that the net device's MAC address is implicitly the source address for net_tx() and the (unicast) destination address for net_rx(). Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include')
-rw-r--r--src/include/ipxe/eapol.h5
-rw-r--r--src/include/ipxe/netdevice.h9
2 files changed, 9 insertions, 5 deletions
diff --git a/src/include/ipxe/eapol.h b/src/include/ipxe/eapol.h
index 43d891c61..3fad44284 100644
--- a/src/include/ipxe/eapol.h
+++ b/src/include/ipxe/eapol.h
@@ -90,7 +90,8 @@ struct eapol_handler
*
* @v iob I/O buffer containing packet payload
* @v netdev Network device from which packet was received
- * @v ll_source Source link-layer address from which packet was received
+ * @V ll_dest Destination link-layer address
+ * @v ll_source Source link-layer address
* @ret rc Return status code
*
* The I/O buffer will have the EAPOL header pulled off it, so
@@ -99,7 +100,7 @@ struct eapol_handler
* This function takes ownership of the I/O buffer passed to it.
*/
int ( * rx ) ( struct io_buffer *iob, struct net_device *netdev,
- const void *ll_source );
+ const void *ll_dest, const void *ll_source );
};
#define EAPOL_HANDLERS __table ( struct eapol_handler, "eapol_handlers" )
diff --git a/src/include/ipxe/netdevice.h b/src/include/ipxe/netdevice.h
index 80bc1c6e2..8cec33eee 100644
--- a/src/include/ipxe/netdevice.h
+++ b/src/include/ipxe/netdevice.h
@@ -57,12 +57,13 @@ struct net_protocol {
*
* @v iobuf I/O buffer
* @v netdev Network device
+ * @v ll_dest Link-layer destination address
* @v ll_source Link-layer source address
*
* This method takes ownership of the I/O buffer.
*/
int ( * rx ) ( struct io_buffer *iobuf, struct net_device *netdev,
- const void *ll_source );
+ const void *ll_dest, const void *ll_source );
/**
* Transcribe network-layer address
*
@@ -534,9 +535,11 @@ extern struct net_device * find_netdev_by_location ( unsigned int bus_type,
unsigned int location );
extern struct net_device * last_opened_netdev ( void );
extern int net_tx ( struct io_buffer *iobuf, struct net_device *netdev,
- struct net_protocol *net_protocol, const void *ll_dest );
+ struct net_protocol *net_protocol, const void *ll_dest,
+ const void *ll_source );
extern int net_rx ( struct io_buffer *iobuf, struct net_device *netdev,
- uint16_t net_proto, const void *ll_source );
+ uint16_t net_proto, const void *ll_dest,
+ const void *ll_source );
/**
* Complete network transmission