Hi!
        Dave thanks for your reply.
        I don't understand first point that is.
        >> a) you don't appear to be linking your application with the
Net-            SNMP library, this would explain why it's not picking up
the             Net-SNMP library routines.

                Let me explain about my code so that you can help me.

         I have written infinte while loop that as shown below
        
main ()
{
        int tempVal = 45;

        while(1)
        {

#ifndef DISABLE_TEMPHIGMARK_TRAP
                if( tempVal > THRESHOLD_VALUE )
                        send_ampTempHighMark_trap( tempVal );
#endif

#ifndef DISABLE_TEMPLOWMARK_TRAP
                send_ampTempLowMark_trap( ampTempLowVal );
#endif

#ifndef DISABLE_BBU_PRESENT_TRAP
                send_ampBBUPresent_trap( ampBBuPreVal  );
#endif

#ifndef DISABLE_BBU_ON_TRAP
                send_ampBBUOn_trap( ampBBUonVal );
#endif

#ifndef DISABLE_CPU_UTILIZATION_TRAP
                send_ampCpuUtilization_trap(cpuUser, cpuSys, cpuIdle );
#endif

#ifndef DISABLE_MEMORY_UTILIZATION_TRAP
                send_ampMemUtilization_trap(  );
#endif

#ifndef DISABLE_HARADWARE_FAILURE_TRAP
                send_ampHardwareFailure_trap();
#endif

                sleep(30);
                tempVal++;
        }

        here you can see the routines like
send_ampTempHighMark_trap(tempVal);

Inside send_ampTempHighMark_trap( int tempVal ) this function,three
net-snmp
Routines I am using that is
        1. snmp_varlist_add_variable
      2. send_v2trap
      3. snmp_free_varbind.

        While compiling using make file I'm getting the error messages
as shown in the previous mails.

        Dave, hope my explanation is clear to help me.

        With Regards,
  G. Siva Prakash Reddy.



 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Dave Shield
Sent: Monday, March 17, 2008 4:42 PM
To: Siva Prakash Reddy G
Cc: [email protected]
Subject: Re: trap error message

On 17/03/2008, Siva Prakash Reddy G <[EMAIL PROTECTED]> wrote:
>         I'm using make file to compile.
>          Please go thru the make file as shown below.
>

Two comments.

a)  You don't appear to be linking your application with the Net-SNMP
     library,   This would explain why it's not picking up the Net-SNMP
     library routines.

b)  The API call "send_v2trap" is part of the *agent* API.
     It can only be used within Net-SNMP Agent code.

You can't use this in client-side code.

Dave

This email message and its attachments may contain CONFIDENTIAL AND PRIVILEGED 
INFORMATION intended for the sole use of the addressee(s). If you have received 
it in error, please contact the sender by return email, notify your system 
manager and destroy the original message and any copies thereof. Any review, 
use, disclosure or distribution is unlawful. Please check this email and any 
attachments for the presence of viruses. The Company accepts no  liability for 
any damage caused by any virus transmitted by this email. The views or opinions 
presented in this e-mail are solely those of the author and do not necessarily 
represent those of the company.
The Company reserves the right to monitor, review and store the content of all 
messages sent to or from this e-mail address.

www.aztecsoft.com

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to