This is a multi-part message in MIME format.

--===============0060636474==
Content-class: urn:content-classes:message
Content-Type: multipart/alternative;
boundary="----_=_NextPart_001_01C7C78C.61D2FB5B"

This is a multi-part message in MIME format.

------_=_NextPart_001_01C7C78C.61D2FB5B
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

Antonio,
I did not use AgentX subagent, but i addeed sink
dynamically as follows:=20
=20
If you see netsnmp_send_traps( ) API, sinks to which traps are generated
are from the structure : =20
=20
struct trap_sink {
netsnmp_session *sesp;
struct trap_sink *next;
int pdutype;
int version;
};
=20
struct trap_sink *sinks =3D NULL;

you can use following API with appropriate parameters for adding a sink
: create_trap_session( )
=20
I tried this and it worked.
=20
Thanks,
Madan=20
________________________________

From: net-snmp-users-bounces@lists.sourceforge.net
[mailto:net-snmp-users-bounces@lists.sourceforge.net] On Behalf Of DI
BACCO ANTONIO - technolabs
Sent: Monday, July 16, 2007 2:39 PM
To: net-snmp-users@lists.sourceforge.net
Subject: Adding and removing trap sessions from a subagent


Is it possible to add a new trap sink dinamically (and programmatically,
not via configuration files) from within an AgentX subagent?

------_=_NextPart_001_01C7C78C.61D2FB5B
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable



charset=3Dus-ascii">


size=3D2> class=3D983333009-16072007>Antonio,

size=3D2> class=3D983333009-16072007>       &nbs=
p;       =20
I did not use AgentX subagent, but i addeed sink dynamically as follows: =


size=3D2> 

align=3Dleft> face=3DArial> class=3D105382609-16072007>If=20
you see netsnmp_send_traps( ) API, sinks to which traps are generated =
are from=20
the structure :  class=3D983333009-16072007> 

>
align=3Dleft> face=3DArial> class=3D105382609-16072007> class=3D983333009-16072007> 
>
align=3Dleft> face=3DArial> class=3D105382609-16072007> class=3D983333009-16072007>struct trap_sink {
   =20
netsnmp_session *sesp;
    struct trap_sink=20
*next;
   =20
int           &nbs=
p;=20
pdutype;
   =20
int           &nbs=
p;=20
version;
};

 

align=3Dleft> face=3DArial> class=3D105382609-16072007> class=3D983333009-16072007>struct trap_sink *sinks =3D=20
NULL;

align=3Dleft> face=3DArial> class=3D105382609-16072007> class=3D983333009-16072007>you can use following API with =
appropriate=20
parameters for adding  a sink :  create_trap_session(=20
)

align=3Dleft> face=3DArial> class=3D105382609-16072007> class=3D983333009-16072007> 
>
align=3Dleft> face=3DArial> class=3D105382609-16072007> class=3D983333009-16072007>I tried this and it=20
worked.

align=3Dleft> face=3DArial> class=3D105382609-16072007> class=3D983333009-16072007> 
>
align=3Dleft> face=3DArial> class=3D105382609-16072007> class=3D983333009-16072007>Thanks, V>
align=3Dleft> face=3DArial> class=3D105382609-16072007> class=3D983333009-16072007>Madan


From:=20
net-snmp-users-bounces@lists.sourceforge.net=20
[mailto:net-snmp-users-bounces@lists.sourceforge.net] On Behalf Of =
DI=20
BACCO ANTONIO - technolabs
Sent: Monday, July 16, 2007 2:39=20
PM
To: net-snmp-users@lists.sourceforge.net
Subject: =
Adding=20
and removing trap sessions from a subagent



Is it =
possible to=20
add a new trap sink dinamically (and programmatically, not via =

configuration files) from within an=20
AgentX subagent?


------_=_NextPart_001_01C7C78C.61D2FB5B--


--===============0060636474==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
--===============0060636474==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
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

--===============0060636474==--