RE: notification filtering

"Anna Edwards" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
Hi Mark,

I'm by no means an expert in this field, but I've been digging around in that same area for a few weeks now, and here's my conclusions:

The net-snmp agent has the ability to populate the SNMP-NOTIFICATION-MIB and SNMP-TARGET-MIB tables, if the agent is configured to include the modules. There are two calls to callback function at the end of the netsnmp_send_traps (in agent_trap.c) which can do the sending of notifications to traps other than those configured as static trapsinks. The send_notifications function in snmpNotifyTable.c is registered to do this, and looks at the entries in the snmpNotifyTable and snmpTargetAddrTable to determine what targets to send to. There is support to pass a pointer to a function (of type TargetFilterFunction -- see target.h) to get_target_sessions to do the actual filtering according to the notification filter tables, however no such function exists as of yet. So, the all framework is there to do the filtering; you just need to write the actual filtering function that refers to the entries in the filter tables with the matching parameter and OIDs (which is surely easier said than done...)

Hope this helps, good luck!
________________
Anna Edwards
Software Engineer
Direct: 519-880-2400 ext 2960
www.sandvine.com

-----Original Message-----
From: [email protected]
[mailto:[email protected]]On Behalf Of Mark
Ellison
Sent: Friday, September 30, 2005 4:02 PM
To: [email protected]
Subject: notification filtering


Hi,

I am looking at the net-snmp-5.2.1.2 distribution to figure out if I can 
populate the SNMP notification filtering tables and then use these 
tables to filter outgoing notifications based upon the value of the 
snmpTrapOID.0 varbind in the outgoing pdu.

I see calls to the snmpd_register_config_handler() routine for the 
snmpNotify*Table configuration token handlers, but I do not see any code 
on the way out (diving down send_v2trap()) that might make the 
appropriate comparisons for filtering.  It appears that each registered 
trap2sink receives all notifications or none.

If someone could point me in the right direction with respect to 
filtering of notifications originated at the agent, I'd appreciate it.

Regards,

Mark

-- 
Mark Ellison                        Ellison Software Consulting, Inc.
tel: +1 (603) 362-9270              38 Salem Road
fax: +1 (603) 362-9271              Atkinson, NH  03811, USA
<http://www.scguild.com/Resume/1321R.html>




-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
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


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
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.