INET Framework for OMNeT++/OMNEST
|
This module handles the mapping between ports and MAC addresses. More...
#include <MACAddressTable.h>
Classes | |
struct | AddressEntry |
struct | MAC_compare |
Public Member Functions | |
MACAddressTable () | |
~MACAddressTable () | |
virtual int | getPortForAddress (MACAddress &address, unsigned int vid=0) override |
For a known arriving port, V-TAG and destination MAC. More... | |
virtual bool | updateTableWithAddress (int portno, MACAddress &address, unsigned int vid=0) override |
Register a new MAC address at AddressTable. More... | |
virtual void | flush (int portno) override |
Clears portno cache. More... | |
virtual void | printState () override |
Prints cached data. More... | |
virtual void | copyTable (int portA, int portB) override |
Copy cache from portA to portB port. More... | |
virtual void | removeAgedEntriesFromVlan (unsigned int vid=0) override |
Remove aged entries from a specified VLAN. More... | |
virtual void | removeAgedEntriesFromAllVlans () override |
Remove aged entries from all VLANs. More... | |
virtual void | removeAgedEntriesIfNeeded () override |
virtual void | readAddressTable (const char *fileName) override |
Pre-reads in entries for Address Table during initialization. More... | |
virtual void | clearTable () override |
For lifecycle: clears all entries from the vlanAddressTable. More... | |
virtual void | setAgingTime (simtime_t agingTime) override |
virtual void | resetDefaultAging () override |
Protected Types | |
typedef std::map< MACAddress, AddressEntry, MAC_compare > | AddressTable |
typedef std::map< unsigned int, AddressTable * > | VlanAddressTable |
Protected Member Functions | |
virtual void | initialize () override |
virtual void | handleMessage (cMessage *msg) override |
AddressTable * | getTableForVid (unsigned int vid) |
Returns a MAC Address Table for a specified VLAN ID. More... | |
Protected Attributes | |
simtime_t | agingTime |
simtime_t | lastPurge |
AddressTable * | addressTable = nullptr |
VlanAddressTable | vlanAddressTable |
Friends | |
std::ostream & | operator<< (std::ostream &os, const AddressEntry &entry) |
This module handles the mapping between ports and MAC addresses.
See the NED definition for details.
|
protected |
|
protected |
inet::MACAddressTable::MACAddressTable | ( | ) |
inet::MACAddressTable::~MACAddressTable | ( | ) |
|
overridevirtual |
For lifecycle: clears all entries from the vlanAddressTable.
Implements inet::IMACAddressTable.
|
overridevirtual |
Copy cache from portA to portB port.
Implements inet::IMACAddressTable.
|
overridevirtual |
Clears portno cache.
Implements inet::IMACAddressTable.
|
overridevirtual |
For a known arriving port, V-TAG and destination MAC.
It finds out the port where relay component should deliver the message
address | MAC destination |
vid | VLAN ID |
Implements inet::IMACAddressTable.
|
protected |
Returns a MAC Address Table for a specified VLAN ID.
Referenced by getPortForAddress(), readAddressTable(), removeAgedEntriesFromVlan(), and updateTableWithAddress().
|
overrideprotectedvirtual |
|
overrideprotectedvirtual |
|
overridevirtual |
Prints cached data.
Implements inet::IMACAddressTable.
|
overridevirtual |
Pre-reads in entries for Address Table during initialization.
Implements inet::IMACAddressTable.
Referenced by initialize().
|
overridevirtual |
Remove aged entries from all VLANs.
Implements inet::IMACAddressTable.
Referenced by removeAgedEntriesIfNeeded().
|
overridevirtual |
Remove aged entries from a specified VLAN.
Implements inet::IMACAddressTable.
|
overridevirtual |
Implements inet::IMACAddressTable.
Referenced by updateTableWithAddress().
|
overridevirtual |
Implements inet::IMACAddressTable.
|
overridevirtual |
Implements inet::IMACAddressTable.
|
overridevirtual |
Register a new MAC address at AddressTable.
Implements inet::IMACAddressTable.
|
friend |
|
protected |
Referenced by clearTable(), getTableForVid(), initialize(), MACAddressTable(), and updateTableWithAddress().
|
protected |
|
protected |
Referenced by initialize(), and removeAgedEntriesIfNeeded().
|
protected |