Event handler for ethernet interface specific events.
Handles events on ethernet interfaces. Includes physical interfaces and LAGs (port-channels) among other interface types.
Public Functions
Registers to receive updates on changes to the interface.
Signifies whether notifications should be propagated to this handler instance or not.
Registers this class to receive change updates on the given interface.
Signifies which interface to subscribe to.
Signifies whether notifications should be propagated to this handler instance or not.
Handler called when an ethernet interface is created.
Handler called when an ethernet interface is deleted.
Handler called when the mac address of an interface changes.
Iterator type for ethernet interfaces.
Private Functions
Friends
The ethernet interface manager.
Public Functions
Returns the operational ethernet address of the interface.
Returns the currently configured ethernet address.
Configures the ethernet address of the interface
The interface ID of the interface to change the address of
The address to set
Returns the currently configured mode of operation of a given interface. Note that only Ethernet and Port-Channel interfaces can be switchports, using any other type of interface will lead to a panic.
Configures the mode of operation of a given interface. Note that only Ethernet and Port-Channel interfaces can be switchports, using any other type of interface will lead to a panic.
Returns the ‘default’ VLAN of a given interface. The ‘default’ VLAN depends on the switchport mode of the interface. If the interface is in access mode, then the access VLAN is returned. If the interface is in tap or trunk mode, then the native VLAN is returned. If no native VLAN is configured, then 0 is returned.
Configures the ‘default’ VLAN of a given interface. The ‘default’ VLAN depends on the switchport mode of the interface. If the interface is in access mode, then the access VLAN is configured. If the interface is in tap or trunk mode, then the native VLAN is configured.
Returns the set of VLANs trunked on this interface. Note that by default all VLANs are trunked on all interfaces.
Adds a VLAN to the set of allowed VLANs when in trunk mode. If the interface isn’t in trunk mode, then the configuration is changed nevertheless, but the configuration won’t take effect until the interface is switched to trunk mode.
Configures the set of allowed VLANs when in trunk mode. If the interface isn’t in trunk mode, then the configuration is changed nevertheless, but the configuration won’t take effect until the interface is switched to trunk mode.
Removes a VLAN to the set of allowed VLANs when in trunk mode. If the interface isn’t in trunk mode, then the configuration is changed nevertheless, but the configuration won’t take effect until the interface is switched to trunk mode.
Protected Functions
Private Members
Friends
Enums
The mode of operation of a switch port.
Values:
Interface only has access to its access VLAN.
Interface is in 802.1q mode (“trunk mode”).
Interface is in 802.1ad mode (“QinQ mode”).
Interface is in tap mode (“span mode”).
Interface is a tool port (egress for a tap).
Interface is routed (“no switchport”).