SNMPv1 TRAPS

Kumar, Vinay 2 Vinay____barco.com
Fri Sep 21 08:30:38 CEST 2001


hi,

i've just started working on SNMPv1 traps
i've created a mib having a Table 
& now i want to send traps on every change in the value of the property of
the table

if my table is
	 IfEntry ::= SEQUENCE			// OID =
1.3.6.1.4.1.100.10.2.1.1
		{
			prop1	DisplayString,	// OID = 1
			prop2    INTEGER	// OID = 2
		}

then is the follwing definition correct for the specific trap :

	myPropChange TRAP-TYPE
			ENTERPRISE			???	// What do i
give here, since in your docs you have said that you don't specify
anything("") in case of SNMPv1
			VARIABLES			{ prop1, prop2 }
	 		DESCRIPTION     
			"This TRAP is fired at the each & every change of
property"
			REFERENCE			"[specific-trap]"
			::= 4    

how can i reflect these changes in my source code :
the following code send simple notifications & send changed property OID in
the ENTERPRISE value of the trap
    	Vbx* vbs = NULL;
    	notification_originator->add_v1_trap_destination(*destination);
	notification_originator->generate(vbs, 0, MyPropertyOid, TimeOut,
""); 	// Where MyPropertyOid = OID [ prop1 / prop2 ]

how can i send the values in the TRAP notification, i.e if prop1 changes
then i need the oid & value of prop1 only
	Vbx* vbs = new Vbx(MyPropertyOid, "Value");		// ???is
this correct, if not then how do i.. ?

whenever i'm sending traps to port 162, then
why we get 2 notifications for the traps
one on the static IP address of the PC & the other one on 127.0.0.1

Any help will be appreciated.

thanks & regards

VINK



More information about the AGENTPP mailing list