Hallo,

sorry, but I did not get the point. :-(
Example:
I have my own netsnmp subagent enterprise OID 1.3.6.1.4.1.4711 and I want to send a trap with three variables with the oids: 1.3.6.1.4.1.4711.1, 1.3.6.1.4.1.4711.2 and 1.3.6.1.4.1.4711.3 . I thought I can simply call three times the snmp_varlist_add_variable() - function to add the variables and than send the trap using the send_v2trap( notification_vars ) function.

Why do I have to add at first the snmpTrapOID.0 with my notification OID as variable?

Thanks for your advise.
Torben


From: Dave Shield <[EMAIL PROTECTED]>
To: Torben Surmer <[EMAIL PROTECTED]>
CC: [email protected]
Subject: Re: question to notification example
Date: Mon, 25 Jul 2005 09:32:03 +0100

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


_________________________________________________________________
Sie suchen E-Mails, Dokumente oder Fotos? Die neue MSN Suche Toolbar mit Windows-Desktopsuche liefert in sekundenschnelle Ergebnisse. Jetzt neu! http://desktop.msn.de/ Jetzt gratis downloaden!



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to