|Version 14 (modified by adam, 8 years ago)|
In this document we describe the functions that the switch library code needs to implement. The class structure for the switch is : Switch -> VendorSwitch -> ModelVendorSwitch . Following standard oo conventions functions are generically implemented in the Switch super class and more specifically implemented in the Vendor and Model sub-classes.
Environmental monitoring and other generic functions such as getName etc will be implemented in the hardware super class, more details to follow.
High level methods
getMACTable() (to be depricated soon)
Gets the full learned mac table from the switch, returning a list of MACTableEntry objects and returns a list of MACTableEntry objects with the results.
getVLANTable(VLAN v = None)
Returns a VLAN dictorary object for the current switch , see hen.py for the VLAN class. (not implemented for the linksys class yet) If VLAN v is specified the switch appends the information to the current VLAN object and returns the appended version.
Applies the VLAN dictionary v to the current switch.
Returns a FDB , Forwarding Database, object for the current switch, see hen.py for the FDB class (note the FDB class hasn't been written yet, but will follow the same structure as the VLAN object). This a read only procedure, there will be no set operation.
setPortMirror(Port, Port, Filter)
Sets the port mirroring up, returns a boolean whether the port mirror request has been accepted or not. This a place holder at the moment, mor e thought and experimentation is needed.
Low level methods
These methods are not expected to be called to configure the switch but are need as internal methods and also by some debugging tools.
Cisco SNMP tool
When developing support for a switch this is very useful.