On 09/01/07, Kapil Sharma <[EMAIL PROTECTED]> wrote: > The only other way I can think of is using netsnmp_variable_list instead of > netsnmp_pdu and calling snmp_varlist_add_var() instead of > snmp_pdu_add_variable(). Do you think that would work?
No. It's not *how* you're adding the varbinds that's wrong for SNMPv2. It's *which* varbinds you're adding. If you are constructing the PDU by hand, then the very first two varbinds *must* be sysUpTime.0, followed by snmpTrapOID.0, followed by your original SNMPv1 varbind list. See RFC 3584 for how this compares to SNMPv1 traps. > I am not sure if I can simply call the function send_v2trap() to send the > notification, because how would the function know the target address? send_v2trap() will use the snmpd.conf settings (trapsink, trap2sink, etc) to determine where to direct notifications. Dave ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Net-snmp-coders mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
