RE: help - SNMP Trap manager registration and deregistrationdynamically...

"Borra, Kishore Babu" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
Hi,

I had tried the below explained method, in a slightly different way, i.e:-

1. For adding/creating a new trap session, used api - create_trap_session(..),  instead of netsnmp_config(  "trapsink  localhost"  );. 
 2.And Removing the Notification receivers using snmpd_free_trapsinks(), as replied in the below mail.

But the problem here is snmpd_free_trapsinks(), is not removing the Recievers, but create_trap_session(..),  works properly.

Could you pls me know, if  these two api - netsnmp_config(), create_trap_session(..),behaviours are different, which makes snmpd_free_trapsinks(), works or not.
 
Thanks in advance.

Regards,
Kishore


-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Dave Shield
Sent: Tuesday, January 19, 2010 4:35 PM
To: Borra, Kishore Babu
Cc: Mike Ayers; [email protected]
Subject: Re: help - SNMP Trap manager registration and deregistrationdynamically...

2010/1/19 Borra, Kishore Babu <[email protected]>:
> But, I want to do this operation, of Adding/removing the Notification receiver
> (Register/Deregist the trap receiver), without using any of the SNMP-TARGET-MIB procedures.
>  I want know some pointers to the code where this is done(Trap receiver addition and deletion).

The simplest way to add a trap receiver is probably to mimic the processing
of the config file entries, by calling

    netsnmp_config(  "trapsink  localhost"  );

with an appropriate config directive.

To remove *all* notification receivers, call

    snmpd_free_trapsinks();

Removing an individual trap receiver is going to be harder, since the
config processing routines aren't designed with that in mind.


And remember this will only work from the main SNMP agent.
It's not possible to manipulate the list of notification receivers
from an AgentX subagent (except by using the Target MIB)

Dave

------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.