A handler for Ethernet Physical Interface events.
Public Functions
Registers this class to receive interface change update notifications.
Expects a boolean signifying whether notifications should be propagated to this instance or not.
Registers this class to receive interface change update notifications for the given interface.
Expects the id of the corresponding interface and a boolean signifying whether notifications should be propagated to this instance or not.
Handler called when a physical ethernet interface is created.
After on_eth_phy_intf_create is called, the given intf_id is guaranteed to exist (ie eth_phy_intf_mgr::exists will return true). At that point, the intf_id can be used will all methods of the eth_phy_intf_mgr class.
This also means that the intf_id can be used with all other relevant *intf_mgr classes (ie intf_mgr and eth_intf_mgr).
Handler called when a physical ethernet interface is deleted.
After on_eth_phy_intf_delete is called, the given intf_id is guaranteed to not exist (ie eth_phy_intf_mgr::exists will return false). At that point, the intf_id cannot be used will any methods in the eth_phy_intf_mgr class.
This also means that the intf_id can no longer be used with all other relevant *intf_mgr classes (ie intf_mgr and eth_intf_mgr).
Handler called when the presence of the underlying hardware for the physical ethernet interface changes.
When a physical interface goes from not-present to present, only on_eth_phy_intf_hardware_present will get called even though other attributes (like the link_speed) of the eth_phy_intf may have changed. Similarly, when the physical interface hardware goes from present to not-present, attributes of the eth_phy_intf (like the link_speed) that are based on the underlying hardware will go back to their default values even though their explicit handlers are not called. It is up to the user to handle the new values of those attributes within the on_eth_phy_intf_hardware_present handler.
Handler called when the operational link speed changes.
Iterator over physical interfaces.
Private Functions
Friends
Public Functions
Returns whether the given physical ethernet interface exists.
If exists returns true, then this intf_id_t can be successfully passed into every method of the eth_intf_mgr. If not, then methods of the eth_intf_mgr can throw a no_such_interface_error exception.
The exists method of all *intf_mgr classes that manage a given interface (ie intf_mgr, eth_intf_mgr, and eth_phy_intf_mgr for physical interfaces) are all guaranteed to return the same result.
Returns whether the underlying hardware for this interface is present.
Returns the “burned in” address of the interface.
If the underlying hardware is not present, returns the default eth_addr_t(). Once hardware_present is true, burned_in_eth_addr is guaranteed to be available.
Returns the operational link speed.
If the underlying hardware is not present, returns LINK_SPEED_UNKNOWN.
Protected Functions
Private Members
Friends
The Ethernet interface counter manager.
This class inspects ethernet interface counters and statistics.
Public Functions
Get the current counters of the given ethernet interface.
Get the current bin counters of the given ethernet interface.
Protected Functions
Private Members
Enums
Possible interface link speeds.
Values:
Ethernet interface counter class.
All of these attributes have the same meanings as the corresponding objects in the Ethernetlike (RFC3635) and RMON (RFC2819) MIBs.
Public Functions
Getter for ‘single_collision_frames’: Etherlike-MIB singleCollisionFrames counter.
Getter for ‘multiple_collision_frames’: Etherlike-MIB multipleCollisionFrames counter.
Getter for ‘fcs_errors’: Etherlike-MIB fcsErrors counter.
Getter for ‘alignment_errors’: Etherlike-MIB alignmentErrors counter.
Getter for ‘deferred_transmissions’: Etherlike-MIB deferredTransmissions counter.
Getter for ‘late_collisions’: Etherlike-MIB lateCollisions counter.
Getter for ‘excessive_collisions’: Etherlike-MIB excessiveCollisions counter.
Getter for ‘internal_mac_transmit_errors’: Etherlike-MIB internalMacTransmitErrors counter.
Getter for ‘carrier_sense_errors’: Etherlike-MIB carrierSenseErrors counter.
Getter for ‘internal_mac_receive_errors’: Etherlike-MIB internalMacReceiveErrors counter.
Getter for ‘frame_too_shorts’: Etherlike-MIB frameTooShorts counter.
Getter for ‘frame_too_longs’: Etherlike-MIB frameTooLongs counter.
Getter for ‘sqe_test_errors’: Etherlike-MIB sqeTestErrors counter.
Getter for ‘symbol_errors’: Etherlike-MIB symbolErrors counter.
Getter for ‘in_unknown_opcodes’: Etherlike-MIB inUnknownOpcodes counter.
Getter for ‘out_pause_frames’: Etherlike-MIB outPauseFrames counter.
Getter for ‘in_pause_frames’: Etherlike-MIB inPauseFrames counter.
Getter for ‘fragments’: RMON-MIB fragments counter.
Getter for ‘jabbers’: RMON-MIB jabbers counter.
Returns a string representation of the current object’s values.
Private Members
Friends
A utility stream operator that adds a string representation of eth_phy_intf_counters_t to the ostream.
Ethernet interface bin counters class.
All of these attributes have the same meanings as the corresponding objects in the RMON MIB (RFC2819).
Public Functions
Getter for ‘in_64_octet_frames’: Input 64 octet frame counter.
Getter for ‘in_65_to_127_octet_frames’: Input 65 to 127 octet frame counter.
Getter for ‘in_128_to_255_octet_frames’: Input 128 to 255 octet frame counter.
Getter for ‘in_256_to_511_octet_frames’: Input 256 to 511 octet frame counter.
Getter for ‘in_512_to_1023_octet_frames’: Input 512 to 1023 octet frame counter.
Getter for ‘in_1024_to_1522_octet_frames’: Input 1024 to 1522 octet frame counter.
Getter for ‘in_1523_to_max_octet_frames’: Input 1523 to max octet frame counter.
Getter for ‘out_64_octet_frames’: Output 64 octet frame counter.
Getter for ‘out_65_to_127_octet_frames’: Output 65 to 127 octet frame counter.
Getter for ‘out_128_to_255_octet_frames’: Output 128 to 255 octet frame counter.
Getter for ‘out_256_to_511_octet_frames’: Output 256 to 511 octet frame counter.
Getter for ‘out_512_to_1023_octet_frames’: Output 512 to 1023 octet frame counter.
Getter for ‘out_1024_to_1522_octet_frames’: Output 1024 to 1522 octet frame counter.
Getter for ‘out_1523_to_max_octet_frames’: Output 1523 to max octet frame counter.
Returns a string representation of the current object’s values.
Private Members
Friends
A utility stream operator that adds a string representation of eth_phy_intf_bin_counters_t to the ostream.