diff options
author | Michael Brown <mcb30@ipxe.org> | 2011-07-15 18:48:46 +0100 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2011-07-15 18:48:46 +0100 |
commit | a667bf044a37f9e96830f1f35627829860f7019f (patch) | |
tree | fabf3420f244fd35ed3576169db8cf0cd706dd9f /src/net/vlan.c | |
parent | 69b7d57265679d76e26581d034e8f8ab5168bb27 (diff) | |
download | ipxe-a667bf044a37f9e96830f1f35627829860f7019f.zip ipxe-a667bf044a37f9e96830f1f35627829860f7019f.tar.gz ipxe-a667bf044a37f9e96830f1f35627829860f7019f.tar.bz2 |
[netdevice] Allow link layer to report broadcast/multicast packets via pull()
Allow the link layer to directly report whether or not a packet is
multicast or broadcast at the time of calling pull(), rather than
relying on heuristics to determine this at a later stage.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/net/vlan.c')
-rw-r--r-- | src/net/vlan.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/net/vlan.c b/src/net/vlan.c index 9ac560f..2147f91 100644 --- a/src/net/vlan.c +++ b/src/net/vlan.c @@ -91,12 +91,13 @@ static int vlan_transmit ( struct net_device *netdev, const void *ll_dest; const void *ll_source; uint16_t net_proto; + unsigned int flags; int rc; /* Strip link-layer header and preserve link-layer header fields */ ll_protocol = netdev->ll_protocol; if ( ( rc = ll_protocol->pull ( netdev, iobuf, &ll_dest, &ll_source, - &net_proto ) ) != 0 ) { + &net_proto, &flags ) ) != 0 ) { DBGC ( netdev, "VLAN %s could not parse link-layer header: " "%s\n", netdev->name, strerror ( rc ) ); return rc; @@ -214,10 +215,12 @@ struct net_device * vlan_find ( struct net_device *trunk, unsigned int tag ) { * @v trunk Trunk network device * @v ll_dest Link-layer destination address * @v ll_source Link-layer source address + * @v flags Packet flags * @ret rc Return status code */ static int vlan_rx ( struct io_buffer *iobuf, struct net_device *trunk, - const void *ll_dest, const void *ll_source ) { + const void *ll_dest, const void *ll_source, + unsigned int flags __unused ) { struct vlan_header *vlanhdr = iobuf->data; struct net_device *netdev; struct ll_protocol *ll_protocol; |