Hi Robert,

I used init_snmp("snmptrapd") and gave the engineIDs in this file of those
devices which are send me the traps.
This is working for me. But the problem is, first I need to manually enter
the engineID for every new device in the config file (snmptrapd.conf)

I will see the set_persistent_directory(const char *dir) API call as
suggested by you. Just let me know if this enables a trap from a device
who's engineID is not mentioned ? Basically my aim is to avoid the manual
task of adding the engineID. receiver should automatically identify any new
engineID and make an persistent entry.

A sample entry in the file would be like this,

createUser -e 0x80001f8880eef1d9395b355c5500000002 test

for noauthnopriv v3 traps with username as test.

On Thu, Jul 16, 2015 at 6:53 AM, Robert Story <rst...@freesnmp.com> wrote:

> On Fri, 29 May 2015 16:14:17 +0530 Ajit wrote:
> AA> I have a application in C which receives snmp traps. There is a
> AA> issue with v3 traps. Although I have done the necessary setup.
> AA> I am able to receive v3 traps using the command "snmptrapd -Lo
> AA> -n -f". But when I run my application , no traps are received.
> AA>
> AA> The reason may be that, my application is not reading a config
> AA> file for snmp users and engineID unlike when I run snmptrapd
> AA> which reads snmptrapd.conf.
>
> [Note: CC/moving to coders list]
>
> Hi Ajit,
>
> Did you ever get this working? When you call init_snmp("myapp"),
> the library should read myapp.conf and should generate an engineID.
> You may need to set your persistent dir explicitly for the engineID
> to be saved between runs (unless you're running as root). See
> set_persistent_directory(const char *dir).
>
>
> Robert
>



-- 
Ambekar Ajit Shivaji
Mumbai.
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to