This is a discussion on Re: Legacy code. Can send V1 traps. V2 traps result in "Invalid within the SNMP Coders forums, part of the Networking and Network Related category; --===============1595882808== Content-Type: multipart/alternative; boundary="0-1691051135-1168986959=:52936" Content-Transfer-Encoding: 8bit --0-1691051135-1168986959=:52936 ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
--===============1595882808==
Content-Type: multipart/alternative; boundary="0-1691051135-1168986959=:52936" Content-Transfer-Encoding: 8bit --0-1691051135-1168986959=:52936 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Thanks Dave, that worked. Appreciate your help. Kapil Dave Shield <D.T.Shield@csc.liv.ac.uk> wrote: On 09/01/07, Kapil Sharma 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 --------------------------------- Now that's room service! Choose from over 150,000 hotels in 45,000 destinations on Yahoo! Travel to find your fit. --0-1691051135-1168986959=:52936 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Thanks Dave, that worked. Appreciate your help.<br><br>Kapil<br><br><b><i>Dave Shield <D.T.Shield@csc.liv.ac.uk></i></b> wrote:<blockquote class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"> On 09/01/07, Kapil Sharma <kapilsharmax@yahoo.com> wrote:<br>> The only other way I can think of is using netsnmp_variable_list instead of<br>> netsnmp_pdu and calling snmp_varlist_add_var() instead of<br>> snmp_pdu_add_variable(). Do you think that would work?<br><br>No.<br>It's not *how* you're adding the varbinds that's wrong for SNMPv2.<br>It's *which* varbinds you're adding.<br><br>If you are constructing the PDU by hand, then the very first two varbinds<br>*must* be sysUpTime.0, followed by snmpTrapOID.0, followed by your<br>original SNMPv1 varbind list.<br> See RFC 3584 for how this compares to SNMPv1 traps.<br><br><br><br>> I am not sure if I can simply call the function send_v2trap() to send the<br>> notification, because how would the function know the target address?<br><br>send_v2trap() will use the snmpd.conf settings (trapsink, trap2sink, etc)<br>to determine where to direct notifications.<br><br><br>Dave<br></kapilsharmax@yahoo.com></blockquote><br><p> <hr size=1>Now that's room service! <a href="http://travel.yahoo.com/hotelsearchpage;_ylc=X3oDMTFtaTIzNXVjBF9TAzk3NDA3N Tg5BF9zAzI3MTk0ODEEcG9zAzIEc2VjA21haWx0YWdsaW5lBHN sawNxMS0wNw-- ">Choose from over 150,000 hotels <br>in 45,000 destinations on Yahoo! Travel</a> to find your fit. --0-1691051135-1168986959=:52936-- --===============1595882808== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- 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?p...rge&CID=DEVDEV --===============1595882808== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/...et-snmp-coders --===============1595882808==-- |