|
SatCat5
|
Wrapper for SwitchCacheInner with the required working memory.
Most users should instantiate this instead of SwitchCacheInner.
Definition at line 105 of file eth_sw_cache.h.
#include <eth_sw_cache.h>
Public Member Functions | |
| SwitchCache (satcat5::eth::SwitchCore *sw) | |
| Link this cache to the designated SwitchCore. | |
| void | query (satcat5::eth::PluginPacket &pkt) override |
| Implement the required SwitchPlugin API. | |
| void | set_miss_bcast (unsigned port_idx, bool enable) |
| Enable or disable "miss-as-broadcast" flag for a specific port. More... | |
| void | set_miss_mask (SATCAT5_PMASK_TYPE mask) |
| Enable or disable "miss-as-broadcast" flag for all ports. More... | |
| SATCAT5_PMASK_TYPE | get_miss_mask () const |
| Identify which ports are currently in "miss-as-broadcast" mode. More... | |
| unsigned | mactbl_size () const |
| Read or manipulate the contents of the MAC-address table. More... | |
| bool | mactbl_read (unsigned tbl_idx, unsigned &port_idx, satcat5::eth::MacAddr &mac_addr) |
| Read or manipulate the contents of the MAC-address table. More... | |
| bool | mactbl_write (unsigned port_idx, const satcat5::eth::MacAddr &mac_addr) |
| Read or manipulate the contents of the MAC-address table. More... | |
| bool | mactbl_clear () |
| Read or manipulate the contents of the MAC-address table. More... | |
| bool | mactbl_learn (bool enable) |
| Read or manipulate the contents of the MAC-address table. More... | |
| bool | mactbl_learn () const |
| Read or manipulate the contents of the MAC-address table. More... | |
Protected Member Functions | |
| SATCAT5_PMASK_TYPE | destination_mask (const PluginPacket &pkt) |
| Destination MAC-address lookup. | |
Protected Attributes | |
| satcat5::eth::SwitchCacheInner::CacheEntry | m_table [SIZE] |
| bool | m_learn |
| SATCAT5_PMASK_TYPE | m_miss_mask |
| CacheEntry *const | m_array |
| const unsigned | m_size |
| satcat5::util::LruCache< CacheEntry > | m_cache |
Private Attributes | |
| satcat5::eth::SwitchCore *const | m_switch |
| Pointer to the associated SwitchCore object. | |
| satcat5::eth::PluginCore * | m_next |
|
inlineinherited |
Identify which ports are currently in "miss-as-broadcast" mode.
For format description,
Definition at line 45 of file eth_sw_cache.h.
|
inlineinherited |
Read or manipulate the contents of the MAC-address table.
All functions return true if successful, false otherwise. (These mimic the API provided by satcat5::eth::SwitchConfig)
Definition at line 61 of file eth_sw_cache.h.
|
inlineinherited |
Read or manipulate the contents of the MAC-address table.
All functions return true if successful, false otherwise. (These mimic the API provided by satcat5::eth::SwitchConfig)
Definition at line 65 of file eth_sw_cache.h.
|
inlineinherited |
Read or manipulate the contents of the MAC-address table.
All functions return true if successful, false otherwise. (These mimic the API provided by satcat5::eth::SwitchConfig)
Definition at line 63 of file eth_sw_cache.h.
|
inherited |
Read or manipulate the contents of the MAC-address table.
All functions return true if successful, false otherwise. (These mimic the API provided by satcat5::eth::SwitchConfig)
Definition at line 60 of file eth_sw_cache.cc.
|
inlineinherited |
Read or manipulate the contents of the MAC-address table.
All functions return true if successful, false otherwise. (These mimic the API provided by satcat5::eth::SwitchConfig)
Definition at line 52 of file eth_sw_cache.h.
|
inherited |
Read or manipulate the contents of the MAC-address table.
All functions return true if successful, false otherwise. (These mimic the API provided by satcat5::eth::SwitchConfig)
Definition at line 67 of file eth_sw_cache.cc.
|
inherited |
Enable or disable "miss-as-broadcast" flag for a specific port.
Frames with an unknown destination (i.e., destination MAC not found in cache) are sent to every port with this flag. This method sets the configuration for the specified port index.
Definition at line 55 of file eth_sw_cache.cc.
|
inlineinherited |
Enable or disable "miss-as-broadcast" flag for all ports.
Frames with an unknown destination (i.e., destination MAC not found in cache) are sent to every port with this flag. This method sets all ports in a single call.
Definition at line 40 of file eth_sw_cache.h.