eth¶
Type definitions in eth¶
-
namespace
eos
Typedefs
-
typedef vlan_set_t
vlan_set
A deprecated alias. Use eos::vlan_set_t instead.
-
typedef uint16_t
vlan_id_t
Valid range of 1-4094 (0/4095 are reserved).
-
class
vlan_set_t
- #include <eth.h>
A bitset representing a collection of VLAN IDs.
-
class
eth_addr_t
- #include <eth.h>
An Ethernet address.
Public Functions
-
eth_addr_t
() Default constructor. Copy constructor and assignment operator implicitly declared.
-
eth_addr_t
(char const * addr) Constructs an address from a char *. Supported formats are xx:xx:xx:xx:xx:xx, xx-xx-xx-xx-xx-xx, or xxxx.xxxx.xxxx.
-
eth_addr_t
(std::string const & addr) Constructs an address from a std::string. Supported formats are xx:xx:xx:xx:xx:xx, xx-xx-xx-xx-xx-xx, or xxxx.xxxx.xxxx.
-
eth_addr_t
(uint8_t byte0, uint8_t byte1, uint8_t byte2, uint8_t byte3, uint8_t byte4, uint8_t byte5) Constructs an address from the 6 bytes that make it up.
-
eth_addr_t
(uint8_t const bytes[6]) Constructs an address from a byte array. The array will be copied.
-
std::string
to_string
() const String representation of a Ethernet address, e.g “xx:xx:xx:xx:xx:xx”.
-
bool
operator!
() const Only the default MAC address (all zeros) evaluates to false.
-
bool
operator==
(eth_addr_t other) const
-
bool
operator!=
(eth_addr_t other) const
-
bool
operator<
(eth_addr_t other) const
-
operator bool
() const
-
uint32_t
hash
() const The hash function for type eth_addr_t.
-
void
mix_me
(hash_mix & h) const The hash mix function for type eth_addr_t.
-
uint8_t
byte
(int index) const Returns the given byte from the address.
-
void
bytes
(void * arr) const Copies the bytes of the Ethernet address to the given address.
-
bool
is_unicast
() const Returns true if the Ethernet address is a unicast address.
-
bool
is_multicast
() const Returns true if the Ethernet address is a multicast address.
-
bool
is_broadcast
() const Returns true if the Ethernet address is a broadcast address.
Private Members
-
uint8_t
bytes_
[6]
Friends
-
friend std::ostream &
operator<<
A utility stream operator that adds a string representation of eth_addr_t to the ostream.
-
-
class
invalid_vlan_error
- #include <eth.h>
The given VLAN number was invalid (for example 0 or 4095).
Public Functions
-
invalid_vlan_error
(vlan_id_t vlan)
-
virtual
~invalid_vlan_error
()
-
vlan_id_t
vlan
() const
-
virtual void
raise
() const Throws this exception.
-
uint32_t
hash
() const The hash function for type invalid_vlan_error.
-
void
mix_me
(hash_mix & h) const The hash mix function for type invalid_vlan_error.
-
std::string
to_string
() const Returns a string representation of the current object’s values.
Private Members
-
vlan_id_t
vlan_
Friends
-
friend std::ostream &
operator<<
A utility stream operator that adds a string representation of invalid_vlan_error to the ostream.
-
-
class
internal_vlan_error
- #include <eth.h>
Tried to configure an internal VLAN on a trunk port.
Public Functions
-
internal_vlan_error
(vlan_id_t vlan)
-
virtual
~internal_vlan_error
()
-
vlan_id_t
vlan
() const
-
virtual void
raise
() const Throws this exception.
-
uint32_t
hash
() const The hash function for type internal_vlan_error.
-
void
mix_me
(hash_mix & h) const The hash mix function for type internal_vlan_error.
-
std::string
to_string
() const Returns a string representation of the current object’s values.
Private Members
-
vlan_id_t
vlan_
Friends
-
friend std::ostream &
operator<<
A utility stream operator that adds a string representation of internal_vlan_error to the ostream.
-
-
typedef vlan_set_t