aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorPaolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>2007-05-06 17:51:13 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-07 15:13:02 -0400
commite024715f5f6250179a31716a898800a48cf23b39 (patch)
tree2cba9702be41ff8263d1fb50825f6f17c9f40171 /include/linux
parent85ee2ce8ae7d6716beffc84451dd65cd217dbf7a (diff)
uml: improve checking and diagnostics of ethernet MACs
Improve checking and diagnostics for broadcast and multicast Ethernet MAC addresses, and distinguish between those cases in output; also make sure the device is assigned a MAC address valid only locally to avoid collisions. Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/etherdevice.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/etherdevice.h b/include/linux/etherdevice.h
index 745c988359c0..071c67abed86 100644
--- a/include/linux/etherdevice.h
+++ b/include/linux/etherdevice.h
@@ -71,6 +71,18 @@ static inline int is_multicast_ether_addr(const u8 *addr)
71} 71}
72 72
73/** 73/**
74 * is_local_ether_addr - Determine if the Ethernet address is locally-assigned
75 * one (IEEE 802).
76 * @addr: Pointer to a six-byte array containing the Ethernet address
77 *
78 * Return true if the address is a local address.
79 */
80static inline int is_local_ether_addr(const u8 *addr)
81{
82 return (0x02 & addr[0]);
83}
84
85/**
74 * is_broadcast_ether_addr - Determine if the Ethernet address is broadcast 86 * is_broadcast_ether_addr - Determine if the Ethernet address is broadcast
75 * @addr: Pointer to a six-byte array containing the Ethernet address 87 * @addr: Pointer to a six-byte array containing the Ethernet address
76 * 88 *