[Xorp-cvs] SF.net SVN: xorp:[11671] trunk/xorp/libxorp/mac.hh

bms_fbsd at users.sourceforge.net bms_fbsd at users.sourceforge.net
Thu Dec 3 16:04:53 PST 2009


Revision: 11671
          http://xorp.svn.sourceforge.net/xorp/?rev=11671&view=rev
Author:   bms_fbsd
Date:     2009-12-04 00:04:53 +0000 (Fri, 04 Dec 2009)

Log Message:
-----------
Add a Mac::addr() accessor. Like IPv6::addr(), this allows
direct access to Mac's internal representation.

This change is required to marshal class Mac efficiently with Thrift.

Obtained from:	xorp-thrift

Modified Paths:
--------------
    trunk/xorp/libxorp/mac.hh

Modified: trunk/xorp/libxorp/mac.hh
===================================================================
--- trunk/xorp/libxorp/mac.hh	2009-12-04 00:03:20 UTC (rev 11670)
+++ trunk/xorp/libxorp/mac.hh	2009-12-04 00:04:53 UTC (rev 11671)
@@ -166,6 +166,14 @@
     string str() const;
 
     /**
+     * Get the raw value of this address.
+     *
+     * @return the value of this MAC address as a pointer to an array
+     * of unsigned bytes.
+     */
+    const uint8_t* addr() const { return _addr; }
+
+    /**
      * Get the size of the raw Mac address (in octets).
      *
      * @return the size of the raw Mac address (in octets).


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the Xorp-cvs mailing list