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

SNMPVariableInfo Element Documentation

NAME

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

SYNOPSIS

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

Ports: None
Package: snmp

DESCRIPTION

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.
"OCTET STRING"
A string of bytes.
DisplayString
A string of at most 255 ASCII characters.
NULL
No data.
IPAddress
An IPv4 address.
Gauge or Gauge32 or Unsigned32
A 32-bit unsigned integer.
Counter or Counter32
A 32-bit unsigned integer with wraparound comparison.
TimeTicks
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(1.3.6.1.2.1.6.44 Counter32 c.count); The SNMP OID "1.3.6.1.2.1.6.44" has type Counter32, and its value corresponds to the c.count handler. When another element requests the value of "1.3.6.1.2.1.6.44.0", SNMPVariableInfo will call c.count, parse its value, and return the corresponding unsigned integer. Note, in this example, that the other element requested "1.3.6.1.2.1.6.44.0". The final ".0" indicates that "1.3.6.1.2.1.6.44" is a scalar variable: Counter32 is a scalar type. This ".0" is required; searching for "1.3.6.1.2.1.6.44" will not work. SNMP variable definitions are global. They are not scoped by compound elements, for example.

SEE ALSO

SNMPOidInfo, SNMPTrapSource

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

COMMENTS

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