summaryrefslogtreecommitdiffstats
path: root/src/usr/lotest.c
diff options
context:
space:
mode:
authorMichael Brown2011-07-15 19:48:46 +0200
committerMichael Brown2011-07-15 19:48:46 +0200
commita667bf044a37f9e96830f1f35627829860f7019f (patch)
treefabf3420f244fd35ed3576169db8cf0cd706dd9f /src/usr/lotest.c
parent[http] Include port in HTTP Host header as needed (diff)
downloadipxe-a667bf044a37f9e96830f1f35627829860f7019f.tar.gz
ipxe-a667bf044a37f9e96830f1f35627829860f7019f.tar.xz
ipxe-a667bf044a37f9e96830f1f35627829860f7019f.zip
[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/usr/lotest.c')
-rw-r--r--src/usr/lotest.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/usr/lotest.c b/src/usr/lotest.c
index 7f9f2fd0..6ed31ea5 100644
--- a/src/usr/lotest.c
+++ b/src/usr/lotest.c
@@ -47,12 +47,14 @@ FILE_LICENCE ( GPL2_OR_LATER );
* @v netdev 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 lotest_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 ) {
free_iob ( iobuf );
return -ENOTSUP;
}
@@ -97,6 +99,7 @@ int loopback_test ( struct net_device *sender, struct net_device *receiver,
const void *ll_dest;
const void *ll_source;
uint16_t net_proto;
+ unsigned int flags;
unsigned int i;
unsigned int successes;
int rc;
@@ -166,7 +169,8 @@ int loopback_test ( struct net_device *sender, struct net_device *receiver,
/* Check received packet */
if ( ( rc = receiver->ll_protocol->pull ( receiver, iobuf,
&ll_dest, &ll_source,
- &net_proto ) ) != 0 ){
+ &net_proto,
+ &flags ) ) != 0 ) {
printf ( "\nFailed to strip link-layer header: %s",
strerror ( rc ) );
goto done;