Hi Dave, 

Thank you for you answer.

My issue is that there are 2 interfaces, for the first interface, I can use
"snmp_varlist_add_variable" and then use "send_v2trap(linktrap_vars)", the
program looks fine. But when the program running into the second interface,
by debugging, when arriving "snmp_varlist_add_variable", the program dumped.

In my program, every 3 seconds, I collect information for the equipment and
then according to the status send the linkup/Down trap. My first step is
make the program run, then I will try to collect the traps from up manager.

The version I used is 5.3.1.

Another question: for the second interface, the if_index_oid is
{1,3,6,1,2,1,2,2,1,1,1} or {1,3,6,1,2,1,2,2,1,1,2} ?
                    ^^^                        ^^^
Thank you

Li
                                
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Dave Shield
Sent: Tuesday, August 22, 2006 9:47 AM
To: Li Gan
Cc: [email protected]
Subject: Re: how can I send linkUp trap in my code

On 22/08/06, Li Gan <[EMAIL PROTECTED]> wrote:
> How can I add auto linkUp trap in my code?

Which version of the agent are you using?
For recent releases, please see the snmpd.conf(5) man page, and the
description of the
"linkUpDownNotifications" directive.

> What I did is as following:
    [snip]
> Am I right?

I haven't looked closely, but that looks pretty much right for sending
a linkUp trap.

> unfortunately, it doesn't work, please help me , thanks!

The main thing that you haven't said is how you are triggering this code.
What decides when to send this trap?
What code have you written for monitoring the status of each interface?

Please note the FAQ entry:
    How can I get the agent to generate a trap (or inform)?
(and particularly the second half of this entry).

Dave


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to