X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Socket%2FProtocols%2FRaw%2FMACAddress.hh;h=6d288871e6bf51090baa9dcadf581c31417eeb07;hb=aa9838dbb3f1b68f17c13acbb3b94a53664d8a3b;hp=4281efdfa62d12e73833a14974b8d7f85fdf8e2f;hpb=412024ed31a4ab4eaea7a4165a434f8efebee325;p=senf.git diff --git a/Socket/Protocols/Raw/MACAddress.hh b/Socket/Protocols/Raw/MACAddress.hh index 4281efd..6d28887 100644 --- a/Socket/Protocols/Raw/MACAddress.hh +++ b/Socket/Protocols/Raw/MACAddress.hh @@ -48,7 +48,7 @@ namespace senf { The following statements all create the same MAC address 00:1A:2B:3C:4D:5F \code // Used to construct constant MAC addresses - MACAddress(0x001A2B3C4D5Flu) + MACAddress(0x001A2B3C4D5Fllu) // Construct a MAC address from it's string representation: MACAddress::from_string("00:1a:2b:3c:4d:5f") // case is ignored @@ -67,14 +67,7 @@ namespace senf { INet6Address(0x2001u,0xDB8u,0x1u,0x0u,0x001Au,0x2BFFu,0xFE3Cu,0x3D5Fu).id()) \endcode - Since MACAddress is based on \c boo Ziel, aber nur ein paar davon sind standardkomform. - -Der aktuelle C++ Standard unterstützt drei verschiedene Möglichkeiten eine Zahl in einen String umzuwandeln. Diese Möglichkeiten sind: - - * sprintf - * std::strstream - * std::stringstream - st::array, you can access the raw data bytes of the + Since MACAddress is based on \c boost::array, you can access the raw data bytes of the address using \c begin(), \c end() or \c operator[]: \code MACAddress mac = ...; @@ -135,6 +128,7 @@ Der aktuelle C++ Standard unterstützt drei verschiedene Möglichkeiten eine Zah boost::uint32_t nic() const; ///< Return last 3 bytes of the address boost::uint64_t eui64() const; ///< Build EUI-64 from the MAC address + boost::uint64_t uint64() const; ///< Return MAC address as uint64 value std::string toString() const; ///< Return string representation of MAC address like 12:34:56:78:90:ab