> Hi Mark ,
>
> I had a small doubt in the notification filtering which you were trying t=

o do few years back.
> Firstly, is notification filtering available in NetSNMP 5.4 release becau=

se the website says (in the FAQ section) that the feature is still working =
on?
> But the release notes for 5.3 version says that the notification filterin=

g and logging have been included in this release.
>
> How did this happen?
> Moreover, the code for notification filtering is present in the 5.3.1 sou=

rce code which I could download from a site.
>
> Please clarify on this issue?
>
> Thanks and Regards,
> Aditya
> Project Engineer
> WIPRO Technologies
> Manikonda
> Hyderabad
>
> P.S. Please refer the following thread for more information.
>
> 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 =


> =





"Anna Edwards"
View profile

=A0More options Oct 3 2005, 1:12=A0am =



Newsgroups: mailing.unix.net-snmp-users
From: anedwa...@SANDVINE.com ("Anna Edwards")
Date: Mon, 3 Oct 2005 03:42:17 +0800 (CST)
Local: Mon, Oct 3 2005 1:12=A0am
Subject: RE: notification filtering
Reply to author | Forward | Print | Individual message | Show original | Re=
port this message | Find messages by this author Hi Mark, I'm by no means a=
n expert in this field, but I've been digging around in =3D 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 =
=3D and SNMP-TARGET-MIB tables, if the agent is configured to include the =
=3D modules. There are two calls to callback function at the end of the =3D=
netsnmp_send_traps (in agent_trap.c) which can do the sending of =3D notif=
ications to traps other than those configured as static trapsinks. =3D The =
send_notifications function in snmpNotifyTable.c is registered to do =3D th=
is, and looks at the entries in the snmpNotifyTable and =3D snmpTargetAddrT=
able to determine what targets to send to. There is =3D support to pass a p=
ointer to a function (of type TargetFilterFunction -- =3D see target.h) to =
get_target_sessions to do the actual filtering =3D according to the notific=
ation filter tables, however no such function =3D exists as of yet. So, the=
all framework is there to do the filtering; =3D you just need to write the=
actual filtering function that refers to the =3D entries in the filter tab=
les with the matching parameter and OIDs (which =3D is surely easier said t=
han done...) Hope this helps, good luck! =

________________
Anna Edwards
Software Engineer
Direct: 519-880-2400 ext 2960
www.sandvine.com =



Mark Ellison
View profile
Newsgroups: mailing.unix.net-snmp-users
From: elli...@ieee.org (Mark Ellison)
Date: Tue, 4 Oct 2005 03:24:59 +0800 (CST)
Local: Tues, Oct 4 2005 12:54=A0am
Subject: Re: notification filtering
Reply to author | Forward | Print | Individual message | Show original | Re=
port this message | Find messages by this author Hi Anna, Thanks for the go=
od pointer. =A0I guess this area is still under=3D20 construction. =A0I can=
see in the source code how the execution path uses=3D20 the snmp_call_calb=
acks() method to invoke the send_notifications()=3D20 method in snmpNotifyT=
able.c. which in turn calls the=3D20
get_target_sessions() method. =A0The second parameter of the=3D20
get_target_sessions() method provides the method address for the=3D20 filte=
rfunc routine. =A0In the 5.2.1.2 code I have, this second parameter=3D20 is=
null. =A0I used gdb to step into the get_target_sessions, and found the =
=3D parm values were always (interal0, NULL, NULL).=3D20 Thanks for helping=
me understand whats going on here! =

Regards,
Mark
Anna Edwards wrote: =

>Hi Mark,
>I'm by no means an expert in this field, but I've been digging around =


>in=3D

=A0that 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=3D

=A0and SNMP-TARGET-MIB tables, if the agent is configured to include the mo=
=3D dules. There are two calls to callback function at the end of the netsn=
mp=3D _send_traps (in agent_trap.c) which can do the sending of notificatio=
ns t=3D o traps other than those configured as static trapsinks. The send_n=
otific=3D ations function in snmpNotifyTable.c is registered to do this, an=
d looks =3D at the entries in the snmpNotifyTable and snmpTargetAddrTable t=
o determin=3D e what targets to send to. There is support to pass a pointer=
to a functi=3D on (of type TargetFilterFunction -- see target.h) to get_ta=
rget_sessions =3D to do the actual filtering according to the notification =
filter tables, h=3D owever no such function exists as of yet. So, the all f=
ramework is there =3D to do the filtering; you just need to write the actua=
l filtering function=3D
=A0that refers to the entries in the filter tables with the matching parame=
=3D ter and OIDs (which is surely easier said than done...) =

=



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
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/...net-snmp-users