This is automatically generated documentation. Edit after the "COMMENTS" heading; changes to the main body will be lost.

SNMPVariableInfo Element Documentation


SNMPVariableInfo -- Click element; assigns variable semantics to SNMP OIDs


SNMPVariableInfo(OID TYPE [HANDLER], ...)

Ports: None
Package: snmp


SNMPVariableInfo sets up a correspondence between SNMP OIDs and Click handlers. When an element like SNMPTrapSource wants to generate an SNMP variable binding, it will call the handler specified by SNMPVariableInfo. Each argument specifies an SNMP OID and the SNMP type of the corresponding variable. Valid types are:

INTEGER or Integer32
A 32-bit integer.
A string of bytes.
A string of at most 255 ASCII characters.
No data.
An IPv4 address.
Gauge or Gauge32 or Unsigned32
A 32-bit unsigned integer.
Counter or Counter32
A 32-bit unsigned integer with wraparound comparison.
A 32-bit unsigned integer representing time. All TYPEs except for NULL must be followed by HANDLER, a handler ID. When another element wants to discover that variable's value, SNMPVariableInfo will call the specified handler and parse its value. For example, consider this configuration fragment: ... -> c :: Counter -> ... SNMPVariableInfo( Counter32 c.count); The SNMP OID "" has type Counter32, and its value corresponds to the c.count handler. When another element requests the value of "", SNMPVariableInfo will call c.count, parse its value, and return the corresponding unsigned integer. Note, in this example, that the other element requested "". The final ".0" indicates that "" is a scalar variable: Counter32 is a scalar type. This ".0" is required; searching for "" will not work. SNMP variable definitions are global. They are not scoped by compound elements, for example.


SNMPOidInfo, SNMPTrapSource

Generated by 'click-elem2man' from 'snmpvarinfo.hh:9' on 17/Jan/2012.


elements/snmpvariableinfo.txt · Last modified: 2012/01/17 10:24 (external edit)
Recent changes RSS feed Driven by DokuWiki