EUI-64 data type.
More...
#include <senf/Socket/Protocols/Raw/EUI64.hh>
|
(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. More...
|
| |
| std::istream & | operator>> (std::istream &is, EUI64 &v) |
| | Read EUI64 string representation from stream. More...
|
| |
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[]:
data.resize(8);
std::copy(eui64.begin(), eui64.end(), data.begin());
\see <a href="http://tools.ietf.org/html/rfc4291">RFC 4291</a>
Definition at line 66 of file EUI64.hh.
◆ EUI64() [1/2]
| senf::EUI64::EUI64 |
( |
boost::uint64_t |
v = 0u | ) |
|
|
explicit |
◆ EUI64() [2/2]
Construct uninitialized EUI-64.
◆ from_data()
template<class InputIterator >
| static EUI64 senf::EUI64::from_data |
( |
InputIterator |
i | ) |
|
|
static |
Construct EUI-64 from 8 data octets.
The iterator i must point to a sequence of 8 octets in network byte order.
◆ from_mac()
◆ from_string()
| senf::EUI64 senf::EUI64::from_string |
( |
std::string const & |
s | ) |
|
|
static |
Construct EUI-64 from string representation.
The string representation consists of 8 octets in hexadecimal notation separated by ':' or '-'
- Exceptions
-
Definition at line 31 of file EUI64.cc.
◆ group()
| bool senf::EUI64::group |
( |
| ) |
const |
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).
◆ isMACCompatible()
| bool senf::EUI64::isMACCompatible |
( |
| ) |
const |
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.
◆ local()
| bool senf::EUI64::local |
( |
| ) |
const |
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).
◆ operator bool()
| senf::EUI64::operator bool |
( |
| ) |
const |
|
explicit |
true, if EUI64 is != 0, false otherwise
◆ uint64()
| boost::uint64_t senf::EUI64::uint64 |
( |
| ) |
const |
Return EUI64 as integer number.
◆ operator<<()
| std::ostream & operator<< |
( |
std::ostream & |
os, |
|
|
EUI64 const & |
v |
|
) |
| |
|
related |
Write out EUI64 in it's string representation to stream.
◆ operator>>()
| std::istream & operator>> |
( |
std::istream & |
is, |
|
|
EUI64 & |
v |
|
) |
| |
|
related |
Read EUI64 string representation from stream.
◆ None
The empty (0) address.
Definition at line 73 of file EUI64.hh.
The documentation for this struct was generated from the following files: