Views:
The SnmpV1Trap class sends a trap to an SNMP V1 agent.
Constructor
var trap = new SnmpV1Trap();
Properties
Name Type Description
enterprise String Identifies the management enterprise under whose registration authority the trap was defined
genericTrap int Describes the event being reported. Refer to RFC 1157 for specific values
specificTrap int Identifies a non-generic trap when the Generic Trap Type is enterprise specific.
Methods
Return Value Name Description
void addInteger( String oid , int value ) Adds an oid:integer pair to this trap.
void addOid( String oid ) Adds an oid:null value pair to this trap.
void addString( String oid , String value ) Adds an oid:string pair to this trap.
void destroy() Frees up any resources used by this trap request
boolean isDestroyed() Returns true if this trap has been destroyed.
boolean send( SnmpContext context ) Sends this trap to the specified SNMP context.
Sample usage
var trap = new SnmpV1Trap();
trap.enterprise = ‘1.3.6.1.4.1.42’;
trap.genericTrap = 0;
trap.send( context );