On Fri, Apr 13, 2012 at 12:40 AM, Stéphane Charette <
[email protected]> wrote:

>  My question: What do I call to register my trap definitions?
>>>
>>
>> You don't have to 'register' trap definitions, you simply have to
>> 'send' the (correctly composed) notification (agentx-Notify-PDU).
>>
>
> Thank you!  Next related question:
>
> When I run "mib2c -c mib2c.notify.conf myMib" the functions generated look
> more-or-less like this:
>
> > snmp_varlist_add_variable( &varlist, snmptrap, ... )
> > send_v2trap( varlist );
> > snmp_free_varbind( varlist );
>
> But...where does send_v2trap() actually send the trap notification?  How
> does it know on which host the SNMP daemon is running?
>

This is where my knowledge of the Net-SNMP internals break down.

1/ I understand that you can write a sub-agent using Net-SNMP routines
and then build/run them as either a 'linked' in module or as an AgentX
sub-agent; but I don't know how that works.

2/  In my case, I have an AgentX library (that I wrote in multiple
languages)
that interacts with (connects to) the Net-SNMP master agent.  Here whenever
I need to send a trap, I send Net-SNMP an 'agentx_Notify_PDU' and
it then sends the right thing to the targets as per snmpd.conf
I.e. my agentx_Notify_PDU that the master translated into either
SNMP v1/v3/v3 trap/inform.

Sorry, but someone else is going to have to tell you how this happens using
the Net-SNMP API.
------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to