snmpit_doc.txt 1.78 KB
Newer Older
1 2 3 4
Documentation for snmpit 

snmpit uses modules that implement the interface to a given switch
5 6 7
model (ie Cisco Catalyst 6509, Intel EhterExpress 510T, etc). They are
responsable for all communication (typically over SNMP) to the switch. 
These modules should support these actions:
8 9

new(ip,args)	Initializes snmp session to IP, "arg=val" sets
		module parameters, ignores unsupported args
11 12 13 14 15 16 17 18 19
		cmd = {enable, disable, 10mbit, 100mbit, full, half, auto}
		ports = list of "pcX:Y"
showPorts	print settings of all ports
getStats	print various stats
vlanLock	Get a vlan editing lock/token/buffer, and
vlanUnlock	Release it when done
setupVlan	(name,ports) - takes a list of ports, and vlans them
removeVlan	(vlan) - takes vlan number
20 21
listVlans	returns a list of entries, with each entry having an ID,
		a name, and a list of members (pcX:Y), tab delimited
22 23 24 25 26 27 28 29 30

showPorts and getStats currently print their results directly. This
makes sense, since the output could be quite different for different
switch types. This also prevents snmpit itself from using these
functions to determine certain things about the state. In the future,
it would be good to have them return data structures, like listVlans
does, and have snmpit be able to use this info.

31 32 33 34
Features supported in snmpit itself:
 - auto vlan config from file or from db
 - device type discovery and command dispatch

35 36 37
Power control has also been moved into its own module, 
It supports new(ip,args) as above, and power(cmd,port) where cmd is 
"on", "off", or "cyc[le]" and port is 1-8.
38 39 40

snmpit library interface
(see comment at top of

43 44
The snmpit library handles all the database transactions. It makes
available all the translations that a module might need to do.