An Ethernet address.
More...
|
|
typedef uninitialized_type | uninitialized_t |
| |
|
typedef bool(EtherAddress::* | unspecified_bool_type) () const |
| |
|
typedef const EtherAddress & | parameter_type |
| |
An Ethernet address.
The EtherAddress type represents an Ethernet address. It supports equality operations and provides methods for unparsing addresses into ASCII form.
◆ EtherAddress() [1/3]
| EtherAddress::EtherAddress |
( |
| ) |
|
|
inline |
◆ EtherAddress() [2/3]
| EtherAddress::EtherAddress |
( |
const unsigned char * |
data | ) |
|
|
inlineexplicit |
Construct an EtherAddress from data.
- Parameters
-
| data | the address data, in network byte order |
The bytes data[0]...data[5] are used to construct the address.
◆ EtherAddress() [3/3]
| EtherAddress::EtherAddress |
( |
const uninitialized_type & |
unused | ) |
|
|
inline |
◆ make_broadcast()
◆ operator unspecified_bool_type()
| EtherAddress::operator unspecified_bool_type |
( |
| ) |
const |
|
inline |
Return true iff the address is not 00-00-00-00-00-00.
◆ is_group()
| bool EtherAddress::is_group |
( |
| ) |
const |
|
inline |
Return true iff this address is a group address.
Group addresses have the low-order bit of the first byte set to 1, as in 01-00-00-00-00-00 or 03-00-00-02-04-09.
◆ is_local()
| bool EtherAddress::is_local |
( |
| ) |
const |
|
inline |
Return true iff this address is a "local" address.
Local addresses have the next-to-lowest-order bit of the first byte set to 1.
◆ is_broadcast() [1/2]
| bool EtherAddress::is_broadcast |
( |
| ) |
const |
|
inline |
Return true iff this address is the broadcast address.
The Ethernet broadcast address is FF-FF-FF-FF-FF-FF.
◆ is_broadcast() [2/2]
| static bool EtherAddress::is_broadcast |
( |
const unsigned char * |
data | ) |
|
|
inlinestatic |
Return true if data points to a broadcast address.
◆ data() [1/2]
| unsigned char * EtherAddress::data |
( |
| ) |
|
|
inline |
Return a pointer to the address data.
◆ data() [2/2]
| const unsigned char * EtherAddress::data |
( |
| ) |
const |
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
◆ sdata()
| const uint16_t * EtherAddress::sdata |
( |
| ) |
const |
|
inline |
Return a pointer to the address data, as an array of uint16_ts.
◆ hashcode()
| size_t EtherAddress::hashcode |
( |
| ) |
const |
|
inline |
◆ unparse()
| String EtherAddress::unparse |
( |
| ) |
const |
|
inline |
Unparse this address into a dash-separated hex String.
Examples include "00-00-00-00-00-00" and "00-05-4E-50-3C-1A".
- Note
- The IEEE standard for printing Ethernet addresses uses dashes as separators, not colons. Use unparse_colon() to unparse into the nonstandard colon-separated form.
◆ unparse_colon()
| String EtherAddress::unparse_colon |
( |
| ) |
const |
Unparse this address into a colon-separated hex String.
Examples include "00:00:00:00:00:00" and "00:05:4E:50:3C:1A".
- Note
- Use unparse() to create the IEEE standard dash-separated form.
◆ unparse_dash()
| String EtherAddress::unparse_dash |
( |
| ) |
const |
Unparse this address into a dash-separated hex String.
Examples include "00-00-00-00-00-00" and "00-05-4E-50-3C-1A".
- Note
- This is the IEEE standard for printing Ethernet addresses.
- See also
- unparse_colon
◆ s()
| String EtherAddress::s |
( |
| ) |
const |
|
inline |
◆ operator String()
| EtherAddress::operator String |
( |
| ) |
const |
|
inline |
◆ operator==()
◆ operator!=()
The documentation for this class was generated from the following files: