mirror of
https://github.com/ipxe/ipxe
synced 2026-04-16 03:00:10 +03:00
[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>
This commit is contained in:
+8
-5
@@ -381,10 +381,12 @@ static int ipv4_tx ( struct io_buffer *iobuf,
|
||||
/**
|
||||
* Process incoming packets
|
||||
*
|
||||
* @v iobuf I/O buffer
|
||||
* @v netdev Network device
|
||||
* @v ll_dest Link-layer destination address
|
||||
* @v ll_source Link-layer destination source
|
||||
* @v iobuf I/O buffer
|
||||
* @v netdev Network device
|
||||
* @v ll_dest Link-layer destination address
|
||||
* @v ll_source Link-layer destination source
|
||||
* @v flags Packet flags
|
||||
* @ret rc Return status code
|
||||
*
|
||||
* This function expects an IP4 network datagram. It processes the headers
|
||||
* and sends it to the transport layer.
|
||||
@@ -392,7 +394,8 @@ static int ipv4_tx ( struct io_buffer *iobuf,
|
||||
static int ipv4_rx ( struct io_buffer *iobuf,
|
||||
struct net_device *netdev __unused,
|
||||
const void *ll_dest __unused,
|
||||
const void *ll_source __unused ) {
|
||||
const void *ll_source __unused,
|
||||
unsigned int flags __unused ) {
|
||||
struct iphdr *iphdr = iobuf->data;
|
||||
size_t hdrlen;
|
||||
size_t len;
|
||||
|
||||
Reference in New Issue
Block a user