mac_table_impl¶
Warning
doxygenfile: Cannot find file “eos/mac_table_impl.h
Type definitions in mac_table_impl¶
-
namespace
eos
-
class
mac_key_impl_t
- #include <mac_table_impl.h>
The MAC entry key class. Maps a MAC address with a specific VLAN ID to an interface.
Public Functions
-
mac_key_impl_t
() Default constructor.
-
mac_key_impl_t
(vlan_id_t vlan_id, eth_addr_t const & eth_addr)
-
vlan_id_t
vlan_id
() const Getter for ‘vlan_id’: the VLAN subdomain identifier.
-
eth_addr_t
eth_addr
() const Getter for ‘eth_addr’: the Ethernet address of the MAC entry.
-
bool
operator!
() const Non-existent keys are effectively false(so this returns true).
-
bool
operator==
(mac_key_impl_t const & other) const
-
bool
operator!=
(mac_key_impl_t const & other) const
-
bool
operator<
(mac_key_impl_t const & other) const
-
uint32_t
hash
() const The hash function for type mac_key_t.
-
std::string
to_string
() const Returns a string representation of the current object’s values.
Friends
-
friend std::ostream &
operator<<
A utility stream operator that adds a string representation of mac_key_t to the ostream.
-
-
class
mac_entry_impl_t
- #include <mac_table_impl.h>
An entry from the MAC address table.
Public Functions
-
mac_entry_impl_t
() Default constructor.
-
mac_entry_impl_t
(mac_key_t const & mac_key) Constructor for basic MAC entry.
-
mac_entry_impl_t
(mac_key_t const & mac_key, intf_id_t intf) Constructor for unicast MAC entry and interface.
-
mac_entry_impl_t
(mac_key_t const & mac_key, std::set< intf_id_t > const & intfs) Constructor for multicast MAC entry and interfaces.
-
mac_entry_impl_t
(vlan_id_t vlan_id, eth_addr_t eth_addr) Deprecated constructor.
-
mac_entry_impl_t
(eth_addr_t eth_addr, intf_id_t intf) Deprecated constructor. Default VLAN identifier is 0. Please use method mac_key_is with a VLAN ID and the eth_addr attribute to set a valid VLAN ID.
-
mac_key_t
mac_key
() const Getter for ‘mac_key’: the key of the MAC entry.
-
void
mac_key_is
(mac_key_t const & mac_key) Setter for ‘mac_key’.
-
std::set< intf_id_t > const &
intfs
() const Getter for ‘intfs’: the set of interfaces that this key forwards to. For unicast MAC entries, this expects a set with either 1 interface or 0 interfaces to signify a drop. If passed a multicast MAC address, ‘intfs’ can contain one or more output interfaces.
-
void
intfs_is
(std::set< intf_id_t > const & intfs) Setter for ‘intfs’.
-
void
intf_set
(intf_id_t const & value) Inserts one intf of ‘value’ to the set.
-
void
intf_del
(intf_id_t const & value) Deletes one intf of ‘value’ from the set.
-
bool
operator!
() const Returns ‘true’ if this key is “empty”, that is if neither the VLAN nor the MAC address is set.
-
vlan_id_t
vlan_id
() const The VLAN subdomain identifier of the MAC entry.
-
eth_addr_t
eth_addr
() const The Ethernet address of the MAC entry.
-
intf_id_t
intf
() const Return the interface of the unicast MAC entry, the first interface of a multicast MAC entry, or an empty object if the entry is a drop entry.
-
void
intf_is
(intf_id_t intf) Setter for ‘intf’: a single interface in a MAC entry.
-
bool
operator==
(mac_entry_impl_t const & other) const
-
bool
operator!=
(mac_entry_impl_t const & other) const
-
uint32_t
hash
() const The hash function for type mac_entry_t.
-
void
mix_me
(hash_mix & h) const The hash mix function for type mac_entry_t.
-
std::string
to_string
() const Returns a string representation of the current object’s values.
Friends
-
friend std::ostream &
operator<<
A utility stream operator that adds a string representation of mac_entry_t to the ostream.
-
-
class