My sole purpose is to actually make an agent which would implement a get/set 
request on a MIB object and would also implement sending traps.

The traps are formed in a different way. Some data is parsed and the traps are 
formed using the parsed information. The traps are then sent to the NMS. All 
this is done in one function/module.

I would be generating the skeleton code using mib2c and compile to produce a 
.so file. Il then embed the path of this .so file into the snmpd.conf of the 
master agent. So whenever the master agent is up my subagent also comes up. I 
need your inputs on this approach as well.

Thanks

"No task is so humble that it does not offer an outlet for individuality"

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf 
Of Dave Shield
Sent: Monday, March 30, 2009 3:46 PM
To: Tanisha Kashyap; [email protected]
Cc: [email protected]
Subject: Re: sending traps

2009/3/30  <[email protected]>:
>  It depends upon you. You can send TRAP in same or write different .

I would agree - you could either send the trap from within your application,
or invoke the "snmptrap" command to do this.
   Coding this yourself is cleaner, while forking off snmptrap is probably
simpler.


>Please go throught
>    http://www.net-snmp.org/dev/agent/group__agent__trap.html
> and use appropriate API.

No - please do *NOT* attempt to use these API calls.
They are designed for use within an SNMP agent, and rely
on the agent infrastructure for sending the trap.

>From what you've said, you're working with a standalone application,
and turning it into an SNMP agent doesn't feel the right approach.

You'd be better off looking at the code for the snmptrap command,
to see how this sends traps.

Dave

"DISCLAIMER: This message is proprietary to Aricent and is intended solely for 
the use of the individual to whom it is addressed. It may contain privileged or 
confidential information and should not be circulated or used for any purpose 
other than for what it is intended. If you have received this message in 
error,please notify the originator immediately. If you are not the intended 
recipient, you are notified that you are strictly prohibited from using, 
copying, altering, or disclosing the contents of this message. Aricent accepts 
no responsibility for loss or damage arising from the use of the information 
transmitted by this email including damage from virus."

------------------------------------------------------------------------------
_______________________________________________
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

Reply via email to