Hi Dave,

Thanks for your response.

Following is my reply:

> I am developing a SNMP trap daemon (snmptd) using net-snmp library.

Is there any reason why you are not able to use the notification receiver
(snmptrapd) that's part of the existing Net-SNMP package?
  This already handled SNMPv3 notification correctly.

>> I need to implement some other functioanlities along with trap receiver,
so I can't use existing snmptrapd.

------------------

> snmptd is able to receive the traps from agent

Are you talking about traps or inform requests?
   (Because the handling of these are different with SNMPv3)
Are you talking about noAuth, authNoPriv or authPriv requests?

Have you looked at the tutorial page
  http://www.net-snmp.org/wiki/index.php/TUT:snmptrap_SNMPv3
      which explains some of the issues involved.

>> I need to provide support for authPriv SNMPv3 traps.

-----------------

> but the callback is not called after receiving the trap.
> Someone, please suggest any code
> modification or something that I am missing.

My suspicion is that the library is receiving the raw packet
containing the request, but that the decoding is failing.
(particularly if noAuth works, but auth or priv doesn't)


Try sending traps using the command-line tool (snmptrap),
which should let you experiment with different options
very simply.
  Try turning on debug flags in the notification receiver,
so that you can see what's happening in the library.

And I'd strongly suggest that you consider using the existing
trap receiver (which works!), rather than trying to write your own.

>> I have studied the tutorial and using the "snmptrap" exe to send traps.
But still the same problem. For v1 and v2, callback is called just after
"snmp_sess_read (ss,&fdset);" statement, while for SNMPv3, callback is not
called. I used "snmp_sess_error(&fdset,&liberr,&snmperr,&perrstring);" and
got "bad parse of ASN.1 type" error in perrstring.
Please help.

Thanks
Gaurav


On Tue, Jul 20, 2010 at 1:01 PM, Dave Shield <d.t.shi...@liverpool.ac.uk>wrote:

> On 20 July 2010 06:57, Gaurav Chaturvedi <gauravchaturve...@gmail.com>
> wrote:
> > I am developing a SNMP trap daemon (snmptd) using net-snmp library.
>
> Is there any reason why you are not able to use the notification receiver
> (snmptrapd) that's part of the existing Net-SNMP package?
>   This already handled SNMPv3 notification correctly.
>
>
> > snmptd is able to receive the traps from agent
>
> Are you talking about traps or inform requests?
>    (Because the handling of these are different with SNMPv3)
> Are you talking about noAuth, authNoPriv or authPriv requests?
>
> Have you looked at the tutorial page
>   http://www.net-snmp.org/wiki/index.php/TUT:snmptrap_SNMPv3
>       which explains some of the issues involved.
>
>
>
> > but the callback is not called after receiving the trap.
> > Someone, please suggest any code
> > modification or something that I am missing.
>
> My suspicion is that the library is receiving the raw packet
> containing the request, but that the decoding is failing.
> (particularly if noAuth works, but auth or priv doesn't)
>
>
> Try sending traps using the command-line tool (snmptrap),
> which should let you experiment with different options
> very simply.
>   Try turning on debug flags in the notification receiver,
> so that you can see what's happening in the library.
>
> And I'd strongly suggest that you consider using the existing
> trap receiver (which works!), rather than trying to write your own.
>
> Dave
>
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to