summaryrefslogtreecommitdiffstats
path: root/sys/net/ieee_oui.h
diff options
context:
space:
mode:
authorgnn <gnn@FreeBSD.org>2013-11-15 16:03:32 +0000
committergnn <gnn@FreeBSD.org>2013-11-15 16:03:32 +0000
commitbbfd12afafeb34a3ee595dd1f5f6e787b3fe281b (patch)
tree3645431028753a16cd3b4288b223ccb37d5abc6d /sys/net/ieee_oui.h
parent32cc455aa902be5130ac8132676d226dee944db3 (diff)
downloadFreeBSD-src-bbfd12afafeb34a3ee595dd1f5f6e787b3fe281b.zip
FreeBSD-src-bbfd12afafeb34a3ee595dd1f5f6e787b3fe281b.tar.gz
Clean up the macros to avoid using casts.
Suggested by: bde and jhb
Diffstat (limited to 'sys/net/ieee_oui.h')
-rw-r--r--sys/net/ieee_oui.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/net/ieee_oui.h b/sys/net/ieee_oui.h
index 0898f8a..3fcb96b 100644
--- a/sys/net/ieee_oui.h
+++ b/sys/net/ieee_oui.h
@@ -32,7 +32,8 @@
*/
/* Organizationally Unique Identifier assigned by IEEE 14 Nov 2013 */
-#define OUI_FREEBSD 0x589cfc
+#define OUI_FREEBSD_BASE 0x589cfc000000
+#define OUI_FREEBSD(nic) (OUI_FREEBSD_BASE | (nic))
/*
* OUIs are most often used to uniquely identify network interfaces
@@ -62,5 +63,5 @@
*/
/* Allocate 64K to bhyve */
-#define OUI_FREEBSD_BHYVE_LOW (((uint64_t)OUI_FREEBSD << 24) | 0x000001)
-#define OUI_FREEBSD_BHYVE_HIGH (((uint64_t)OUI_FREEBSD << 24) | 0x00ffff)
+#define OUI_FREEBSD_BHYVE_LOW OUI_FREEBSD(0x000001)
+#define OUI_FREEBSD_BHYVE_HIGH OUI_FREEBSD(0x00ffff)
OpenPOWER on IntegriCloud