EUI-64 data type.
More...
#include <senf/Socket/Protocols/Raw/EUI64.hh>
List of all members.
Detailed Description
EUI-64 data type.
An EUI-64 is a 64 bit (8 octet) id. The id is represented as an 8 byte sequence in network byte order. An EUI64 can be converted from/to several other representations
Since senf::EUI64 is based on boost::array
, you can access the raw data bytes of the address using begin()
, end()
or operator
[]:
senf::EUI64 eui64 (...);
std::vector<char> data;
data.resize(8);
std::copy(eui64.begin(), eui64.end(), data.begin());
- See also:
- RFC 4291
Definition at line 76 of file EUI64.hh.
|
Public Member Functions
|
bool |
isMACCompatible () const |
|
true , if EUI64 is MAC compatible, false otherwise
|
bool |
local () const |
|
true if the local bit is set, false otherwise
|
bool |
group () const |
|
true if the group bit is set, false otherwise
|
bool |
boolean_test () const |
|
true , if EUI64 is != 0, false otherwise
|
boost::uint64_t |
uint64 () const |
|
Return EUI64 as integer number.
|
Related Functions
|
(Note that these are not member functions.)
|
std::ostream & |
operator<< (std::ostream &os, EUI64 const &v) |
|
Write out EUI64 in it's string representation to stream.
|
std::istream & |
operator>> (std::istream &is, EUI64 &v) |
|
Read EUI64 string representation from stream.
|
Structors and default members
|
static EUI64 const |
None |
|
The empty (0) address.
|
|
EUI64 (boost::uint64_t v=0u) |
|
Construct EUI-64.
|
|
EUI64 (senf::NoInit_t) |
|
Construct uninitialized EUI-64.
|
static EUI64 |
from_mac (MACAddress const &mac) |
|
Construct EUI-64 from senf::MACAddress.
|
static EUI64 |
from_string (std::string const &s) |
|
Construct EUI-64 from string representation.
|
template<class InputIterator > |
static EUI64 |
from_data (InputIterator i) |
|
Construct EUI-64 from 8 data octets.
|
Constructor & Destructor Documentation
senf::EUI64:: |
EUI64 |
( |
boost::uint64_t |
v = 0u
|
) |
|
Construct EUI-64.
Definition at line 36 of file EUI64.cci.
Construct uninitialized EUI-64.
Definition at line 48 of file EUI64.cci.
Member Function Documentation
bool senf::EUI64:: |
boolean_test |
() |
|
|
|
|
true
, if EUI64 is != 0, false
otherwise
Definition at line 83 of file EUI64.cci.
template<class InputIterator >
senf::EUI64 senf::EUI64:: |
from_data |
( |
InputIterator |
i |
) |
|
Construct EUI-64 from 8 data octets.
The iterator i must point to a sequence of 8 octets in network byte order.
Definition at line 35 of file EUI64.cti.
senf::EUI64 senf::EUI64:: |
from_string |
( |
std::string const & |
s |
) |
|
Construct EUI-64 from string representation.
The string representation consists of 8 octets in hexadecimal notation separated by ':' or '-'
- Exceptions:
-
Definition at line 40 of file EUI64.cc.
bool senf::EUI64:: |
group |
() |
|
|
|
|
true
if the group bit is set, false
otherwise
The group bit is the least significant bit of the first octet (bit 7 in standard RFC bit numbering).
Definition at line 77 of file EUI64.cci.
bool senf::EUI64:: |
isMACCompatible |
() |
|
|
|
|
true
, if EUI64 is MAC compatible, false
otherwise
An EUI64 is MAC compatible if bytes 4th and 5th byte (in network byte order) are 0xfffe.
Definition at line 65 of file EUI64.cci.
bool senf::EUI64:: |
local |
() |
|
|
|
|
true
if the local bit is set, false
otherwise
The local bit is the second least significant bit of the first octet (bit 6 in standard RFC bit numbering).
Definition at line 71 of file EUI64.cci.
boost::uint64_t senf::EUI64:: |
uint64 |
() |
|
|
|
|
Friends And Related Function Documentation
std::ostream & |
operator<< |
( |
std::ostream & |
os, |
|
|
|
EUI64 const & |
v |
) |
|
Write out EUI64 in it's string representation to stream.
std::istream & |
operator>> |
( |
std::istream & |
is, |
|
|
|
EUI64 & |
v |
) |
|
Read EUI64 string representation from stream.
Member Data Documentation
The empty (0) address.
Definition at line 85 of file EUI64.hh.
The documentation for this class was generated from the following files: