Unmanaged Ethernet Switch

eth_unmanaged_switch – Unmanaged Ethernet Switch

class moddy.lib.net.eth_unmanaged_switch.EthUnmanagedSwitch(sim, obj_name, num_ports, net_speed)[source]
__init__(sim, obj_name, num_ports, net_speed)[source]

Initialize self. See help(type(self)) for accurate signature.

add_mac_to_lookup_table(net_port, mac_addr)[source]

Add macAddr tp lookupTable. Update if it is already in lookup Table :param NetPort netPort: netPort where this macAddr is attached to :param str macAddr: address to addr (e.g. ‘00:11:22:33:44:55’)

lookup_mac_addr(mac_addr)[source]

lookup macAddr in lookupTable. :param str macAddr: address to lookup (e.g. ‘00:11:22:33:44:55’) :return: NetPort where macAddr is known. None if not found or if it macAddr is broadcast