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

SNMPTrapSource Element Documentation

NAME

SNMPTrapSource -- Click element; generates SNMP traps on demand

SYNOPSIS

SNMPTrapSource(KEYWORDS)

Ports: no inputs, 1 output
Processing: push
Package: snmp

DESCRIPTION

SNMPTrapSource generates SNMP traps on demand. When the user writes to one of its trap-generation handlers, SNMPTrapSource constructs the corresponding trap, optionally including the values of some SNMP variables, and emits it on its first output. Keyword arguments are:

UDP
Boolean. If true, then SNMPTrapSource generates UDP-in-IP packets. If false, then SNMPTrapSource generates packets without UDP or IP encapsulation. Default is true.
TTL
Byte. Specifies the generated IP header's time-to-live field (if the IP keyword argument is true). Default is 255.
SRC
IP address. Specifies the address of the SNMP agent generating the traps. Used for the IP header's source field, and for a field in the trap proper.
SPORT
UDP port. Specifies the UDP source port for generated traps.
DST
IP address. Specifies the address where traps should be sent. Used in the IP header, if IP is true.
DPORT
UDP port. Specifies the UDP destination port for generated traps. Default is 162 (snmp-trap).
COMMUNITY
String. The SNMP community string. Default is "public".
ENTERPRISE
SNMP OID. The SNMP enterprise generating the trap.
TRAP
Trap specification, as defined below. There may be multiple TRAP arguments.
ACTIVE
Boolean. Specifies whether packets will actually be sent when any of the send_TRAPNAME handlers are poked. Default is true. The user must supply at least the ENTERPRISE and SPORT keyword arguments. If IP is true, then SRC and DST must be supplied as well. An SNMPTrapSource element is useless without at least one TRAP argument.

TRAP SPECIFICATIONS

Trap specifications look like "NAME [SPECIFIC] [VARIABLES...]". NAME is a textual name used to identify the trap. It may be one of SNMP's well-known trap types, "coldStart", "warmStart", "linkDown", "linkUp", "authenticationFailure", or "egpNeighborLoss", or an arbitrary nonempty string, which represents an enterpriseSpecific trap. These enterpriseSpecific traps may optionally specify a specific code with the SPECIFIC argument. This is a nonnegative integer that defaults to 0. The VARIABLES argument is a space-separated list of SNMP object IDs corresponding to SNMP variables; see SNMPVariableInfo. When trap NAME is generated, the values of the VARIABLES are encoded into the trap packet.

ELEMENT HANDLERS

send_TRAPNAME (write-only)
A send_TRAPNAME handler exists for each TRAP argument; TRAPNAME corresponds to the trap's name. Writing an arbitrary string to this handler causes SNMPTrapSource to generate the corresponding trap and emit it on output 0.
enterprise (read-only)
Returns the ENTERPRISE argument, an SNMP OID.
traps (read-only)
Returns the trap names this SNMPTrapSource understands, one per line.
src (read/write)
Returns or sets the SRC argument.
dst (read/write)
Returns or sets the DST argument.
sport (read/write)
Returns or sets the SPORT argument.
dport (read/write)
Returns or sets the DPORT argument.
active (read/write)
Returns or sets the ACTIVE argument.
drops (read-only)
Returns the number of traps dropped due to queue overflow or out-of-memory conditions.

SEE ALSO

SNMPVariableInfo, SNMPOidInfo

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

COMMENTS

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