On 20 October 2010 09:08, Renjith R. V. <[email protected]> wrote: > The issue with previous try: > It seems that convert_v1pdu_to_v2() function doesn't update pdu->version > parameter as needed (not sure whether this is intentional or not).
That's quite likely. The two conversion functions were originally designed for use within the agent, which uses the routine 'sent_trap_to_sess()' in order to actually send the template PDU to a given destination. This routine explicitly sets the PDU version to match the session that it will be sent over. (Since the v2 PDU can be used for SNMPv2c. SNMPv3 and AgentX sessions - it made more sense to handle this here, rather than an in the conversion routine). > Here again I have one doubt. Even though the trap is forwarded and the > forwarded trap could be received properly using a trap receiver at the > destination end, the syslog file shows an error without proper error > code. > The error log is "snmptrapd[22813]: Forward failed:" > Is there any issue still persisting? Have a look at what error the 'snmp_send' routine is returning. > Let me clarify one more thing which is already commented by you. > I understood that there is nothing like "SNMPv3 trap". SNMPV3 uses > SNMPv2 PDU. > So I hope in order to forward SNMPV1 trap to a v3 destination, > 1. Modify session parameter with v3 configuration > 2. Use SNMPv2 PDU (convert v1pdu to v2 and update pdu version as > SNMP_VERSION_3) > > Am I correct? That sounds right, yes. > If so, can you please tell me how the session should be > modified to send as SNMPV3? The first thing would be to experiment with sending SNMPv3 traps manually (i.e. using "snmptrap"). Once you've got the correct settings for that command, then you can apply the same configuration to the session structure. (The library routine 'snmp_parse_args' may help in mapping command-line options to the appropriate fields in the session structure, if you're not sure at any point). But until you can send a v3 trap by hand, it's probably premature to try and do this programmatically. Dave ------------------------------------------------------------------------------ Download new Adobe(R) Flash(R) Builder(TM) 4 The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly Flex(R) Builder(TM)) enable the development of rich applications that run across multiple browsers and platforms. Download your free trials today! http://p.sf.net/sfu/adobe-dev2dev _______________________________________________ Net-snmp-coders mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
