On Sat, 2005-07-23 at 16:22 +0200, Torben Surmer wrote:
> in the fine working notification sample
> /* In the notification, we have to assign our notification OID to
> * the snmpTrapOID.0 object. Here is it's definition. */
> oid objid_snmptrap[] = { 1, 3, 6, 1, 2, 1, 4, 3, 0 };
> Do anybody know, why I need this snmpTrapOID in the
> snmp_varlist_add_variable function?
Because that's how SNMPv2 (and SNMPv3) specifies which notification
is being sent. The first varbind is *always* sysUpTime.0 and the
second varbind is *always* snmpTrapOID.0.
The agent trap processing code can insert the sysUpTime.0 varbind
automatically, but it's up to your code to specify which notification
is to be sent.
Dave
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders