Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Nov 2013 16:03:33 +0000 (UTC)
From:      "George V. Neville-Neil" <gnn@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r258175 - head/sys/net
Message-ID:  <201311151603.rAFG3XAp075168@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: gnn
Date: Fri Nov 15 16:03:32 2013
New Revision: 258175
URL: http://svnweb.freebsd.org/changeset/base/258175

Log:
  Clean up the macros to avoid using casts.
  
  Suggested by: bde and jhb

Modified:
  head/sys/net/ieee_oui.h

Modified: head/sys/net/ieee_oui.h
==============================================================================
--- head/sys/net/ieee_oui.h	Fri Nov 15 15:29:53 2013	(r258174)
+++ head/sys/net/ieee_oui.h	Fri Nov 15 16:03:32 2013	(r258175)
@@ -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)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201311151603.rAFG3XAp075168>