seg. fault on calling send_v2Trap

2004-09-10 Thread Narinder Soni
I am using ucd-snmp-4.2.5.
I have everything running in the agent i.e. snmpget, snmpset etc. But as
shown in example.c, if I trigger send_v2Trap() through a snmpset call
then the agent gives segmentation fault. i.e. I make a snmpset on a
particular column and within its write function I call send_v2Trap with
necessary parameters. And it gives seg. fault. If I don't call
send_v2Trap then it works fine.

I tried sending traps by another way i.e. creating a separate thread at
the start of agent after 
init_agent("snmpd");/* do what we need to do first. */
init_mib_modules();
/* start library */
init_snmp("snmpd");
createThread(); // here I create a separate thread which calls a
separate function which further use send_v2Trap to send traps at an
interval of 10 secs.

This way it works fine and I can do snmpget/set also in parallel. But I
don't understand why it fails if I do it like as it is explained in
example.c. Does it clash somewhere?

Thanks
Soni


---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM. 
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
___
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


Re: magic numbers

2004-09-09 Thread Narinder Soni
My question is answered from the first part which you have explained. I
am using v4 API (ucd-snmp-4.2.5). I already tried to do the same i.e. 
 { 1,  .,,   var_this, . },
 { 2,  .,,   var_this, . },
 { 1,  .,,   var_that, . }
it didn't give any problem but still wanted to be sure.
Thanks for your reply.
Soni

Dave Shield wrote:
> 
> 
> > 2) Will there be any problem if I change the value of magic numbers and
> > start them from 1 for each respective table in the same array structure?
> > which means the value of these magic numbers will not be unique in the
> > same structure but they will be unique for their respective tables and
> > their sub-identifiers will also be unique.
> 
> Which mib2c config are you using?
> The v4 API, or one of the newer v5 handler-based ones?
> (If so, which one).
> 
> In general, it doesn't matter if magic numbers are repeated,
> as long as they're unique within a single handler routine.
> 
> So using the v4 array-style registration, something like:
> 
> { 1,  .,,   var_this, . },
> { 2,  .,,   var_this, . },
> { 1,  .,,   var_that, . }
> 
> is OK (since the duplicated magic numbers are used in different
> routines), but:
> 
> { 1,  .,,   var_this, . },
> { 2,  .,,   var_this, . },
> { 1,  .,,   var_this, . }
> 
> is not (since the duplicated magic numbers are used in the
> *same* routine).
> 
> The v5 APIs work in a slightly different way, and don't
> in general rely on magic numbers in quite the same way.
> 
> It's difficult to be more definite, without knowing a bit
> more about the style of code you're using.
> 
> Dave


---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM. 
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
___
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


magic numbers

2004-09-07 Thread Narinder Soni
I have used mib2c to create the skeleton code for 3 tables which are in
same MIB file.

But in the variables structure, the magic numbers(for all 3 tables) are
generated in increasing order starting from 4 one after another.
1) Why does the magic numbers start from 4?
2) Will there be any problem if I change the value of magic numbers and
start them from 1 for each respective table in the same array structure?
which means the value of these magic numbers will not be unique in the
same structure but they will be unique for their respective tables and
their sub-identifiers will also be unique.

Thanks
Soni


---
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
___
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


coldStart, warmStart, linkUp, linkDown Traps

2004-08-26 Thread Narinder Soni
Hi all,

* I am using ucd-snmp-4.2.5. When I start the agent I get coldStart trap
with following variables:
12:58 TRAP0.0 from 0.0.0.0
Trap-Type: Cold Start
Variables:  system.sysUpTime.0 = Timeticks: (5) 0:00:00.05 
.iso.org.dod.internet.snmpV2.snmpModules.snmpMIB.snmpMIBObjects.snmpTrap.snmpTrapOID.0
= OID:
.iso.org.dod.internet.snmpV2.snmpModules.snmpMIB.snmpMIBObjects.snmpTraps.coldStart.iso.org.dod.internet.snmpV2.snmpModules.snmpMIB.snmpMIBObjects.snmpTrap.snmpTrapEnterprise.0
= OID: enterprises.ucdavis.ucdSnmpAgent.linux

But when I stop my agent then still I get coldStart trap with less
number of variables 
12:58 TRAP0.0 from 0.0.0.0
Trap-Type: Cold Start
Variables:  system.sysUpTime.0 = Timeticks: (1407) 0:00:14.07  
.iso.org.dod.internet.snmpV2.snmpModules.snmpMIB.snmpMIBObjects.snmpTrap.snmpTrapOID.0
= OID: enterprises.ucdavis.ucdTraps.0.2
and the value as "ucdShutdown"Why don't I see the value "ucdStart"
in the 1st trap when I start agent?

* When do we get warmStart, linkDown and linkUp traps? 
* I want to generate linkDown and linkUp traps at some specific
time(after getting some interrupt from my Hardware). Which is the best
palce(within agent code) where I can call some function to send linkDown
and linkUp traps with my own variables list appended at end?

Thanks in advance.
Soni


---
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
___
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


Re: --with-cc

2004-08-17 Thread Narinder Soni
I read the solution from FAQwe have to delete the configure.cache
file before doing ./configure with a different compilerBut now I
face different problems while doing make. It shows the errors like:

g++ -g -O2 -Dlinux -I. -I.. -I. -I./.. -c snmp_client.c  -fPIC -DPIC -o
.libs/snmp_client.lo
In file included from snmp_client.c:35:
/usr/include/string.h:259: parse error before `('
make[1]: *** [snmp_client.lo] Error 1

Can anybody suggest something??

Thanks
Soni



"William R. Buckley" wrote:
> 
> Well now, it seems that we have a behavioral problem observed by two
> users of the Net-SNMP toolkit.  In my last posting, I mentioned that use
> of ./configure --with-cc=i386-uclibc-gcc did not yield Makefiles with that
> compiler listed within.  Indeed, the compiler remains gcc.  So, why is
> this.  Has anyone suggestions for making the configuration process work,
> as expressed in toolkit documentation?  Certainly an alternative is to
> make changes to the Makefile directly but, such approaches seem beyond
> the design goals of the toolkit.
> 
> William R. Buckley
> 
> > -Original Message-
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] Behalf Of Narinder
> > Soni
> > Sent: Monday, August 16, 2004 7:10 AM
> > To: [EMAIL PROTECTED]
> > Cc: [EMAIL PROTECTED]
> > Subject: --with-cc
> >
> >
> > I am using ucd-snmp-4.2.5 and when I try to do
> > ./configure --with-cc=g++
> > it doesn't seem to work correctly, because all the Makefiles still use
> > gcc (I tried with --with-cc=arm-elf-gcc also but same result).
> > Why configure doesn't create Makefiles with new compiler instead of
> > default gcc?
> >
> > Any solution for this?
> >
> > Soni
> >
> >
> > ---
> > SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
> > 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
> > Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
> > http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
> > ___
> > 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
> >
> 
> ---
> SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
> 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
> Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
> http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
> ___
> 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


---
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
___
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


--with-cc

2004-08-16 Thread Narinder Soni
I am using ucd-snmp-4.2.5 and when I try to do 
./configure --with-cc=g++ 
it doesn't seem to work correctly, because all the Makefiles still use
gcc (I tried with --with-cc=arm-elf-gcc also but same result).
Why configure doesn't create Makefiles with new compiler instead of
default gcc?

Any solution for this?

Soni


---
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
___
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


Re: implement snmpv3

2004-08-10 Thread Narinder Soni
Thanks Dave. It clears most of my doubts.

Dave Shield wrote:
> 
> > The Net-SNMP toolkit find it automatically but once I tried to use some
> > 3rd party SNMP manager. In order to configure it so that it could
> > query/set the values from agent, it asked me to provide the EngineID of
> > my UCD-SNMP agent. But I did not know where does agent store the value
> > of its EngineID. Is it in /var/uc-snmp/snmpd.conf file? If yes, then
> > what is the name of token?
> 
> Firstly, I would regard this a deficiency in the manager,
> which might be worth taking up with the developers of that software.
> 
> There are two ways in which you could determine the engineID of the
> agent.   One is indeed to look in the /var/ucd-snmp/snmpd.conf file,
> where this engineID is listed as "oldEngineID".
>[Wes - can you confirm that this remains constant
>   from one run of the agent to the next ?  ]
> I'm a little surprised that you didn't spot this as the most likely
> candidate.
> 
> The other is to make an SNMPv3 request using an empty engineID.
> It will fail, of course - but will return a Report PDU which includes
> the correct engineID.  That can then be used to repeat the request
> (hopefully successfully this time).
> 
> That's what the SNMPv3 specs describe and what the UCD- and Net-SNMP
> suites implement - just done manually.   It also has the advantage
> that it will work with *any* SNMPv3 agent, and isn't reliant on
> using a vendor-specific configuration file.
> 
> 
> 
> > For receiving traps in this 3rd party manager also, I had to give the
> > engine ID of Agent. Has this to be given as a param in 'trapsess'
> > derivative in snmpd.conf file? OR some other way is also there?
> 
> Please see
> http://www.net-snmp.org/tutorial-5/commands/snmptrap-v3.html
> which discusses how SNMPv3 engines relate to traps.
> 
> Dave


---
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
___
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


Re: implement snmpv3

2004-08-10 Thread Narinder Soni
The Net-SNMP toolkit find it automatically but once I tried to use some
3rd party SNMP manager. In order to configure it so that it could
query/set the values from agent, it asked me to provide the EngineID of
my UCD-SNMP agent. But I did not know where does agent store the value
of its EngineID. Is it in /var/uc-snmp/snmpd.conf file? If yes, then 
what is the name of token?

For receiving traps in this 3rd party manager also, I had to give the
engine ID of Agent. Has this to be given as a param in 'trapsess'
derivative in snmpd.conf file? OR some other way is also there?

Thanks 
Soni

Dave Shield wrote:
> 
> [ First - *please* don't mail me privately, without copying
>  any responses to the mailing list.  I don't have the time
>  or inclination to offer private, unpaid, SNMP consultancy.
>  Keep discussions to the list, where others can both learn
>  and offer advice.  Thanks.   ]
> 
> > How to discover engineID automatically. in SNMP V3 ? What is the way of
> > doing this?
> 
> Omit the '-e 80020109840310' option.
> The toolkit will handle this automatically.
> 
> Tina was asking about specifying this explicitly,
> but you don't normally need to bother.
> The Net-SNMP toolkit does the work for you.
> 
> Dave
> 
> ---
> SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
> 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
> Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
> http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
> ___
> 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


---
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
___
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


Re: EngineID

2004-08-03 Thread Narinder Soni
But when I start and stop snmptrapd application to receive v3 traps from
my agent, I see a file /var/ucd-snmp/snmptrapd.conf being created with
engineBoots and oldEngineID tokens in it and "createUser" replaced by
"usmUser". And I see engineBoots value getting incremented by 1 whnever
I start/stop snmptrapd app.
So it means this file is being generated by the Trap receiver app. and
these tokens are also used by it.

What is the meaning of oldEngineID? and what kind of value is stored in
it?
In which file does the Request Generator application e.g. snmpget will
store the engineID/Boots information(that will come from Agent being
queried)?


Dave Shield wrote:
> 
> > The thing is you shouldn't have those tokens [engineBoots and oldEngineID]
> > generally stored in a management app in the first place
> 
> That's certainly true for a Request Generator application, where the
> engineID/Boots information will come from the agent being queried.
> 
> But doesn't a Notification Receiver need to keep track of these values,
> in order to act as the authoritative engine for SNMPv3 Informs?
> 
> Dave


---
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
___
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


Re: EngineID

2004-08-03 Thread Narinder Soni
I don't create these tokens myself. I only write "createUser"(with
necessary parameters) in /var/ucd-snmp/snmptrapd.conf (for
ucd-snmp-0.4.2.5). After this once I start and then stop my application,
I see "createUser" replaced by three tokens:
usmUser
engineBoots
oldEngineID
And then after restarting my application it complains about the last two
tokens. 
I have tried the same by preparing a new application program, using the
code of snmpget/set, snmptrapd and using threads so that I can achieve
the functionality of both in parallel. Everything works fine here. So
now I am convinced that something is not in order in my previous
application. Thats what I am curious to find out so that I don't make
that mistake again.

Thanks for the help.

Wes Hardaker wrote:
> 
> >>>>> On Mon, 02 Aug 2004 14:26:22 +0200, Narinder Soni <[EMAIL PROTECTED]> said:
> 
> Narinder> Ya, I am also trying to find out the same i.e. why my
> Narinder> app. doesn't pick up these tokens automatically. May be -
> Narinder> while mixing up the code of snmpget and snmptrapd I have
> Narinder> eaten up something(I did this 2 years back) or I have called
> Narinder> the initialization routines in different order or this is
> Narinder> happening because of some of the Traditional API
> Narinder> functions(which I also don't think so) which I have used
> Narinder> instead of Single API (as mentioned in README.threads).
> 
> The thing is you shouldn't have those tokens generally stored in a
> management app in the first place, which is why it's confusing you're
> seeing them at all in a management application.
> 
> --
> Wes Hardaker
> Sparta


---
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
___
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


snmp_open_ex()

2004-08-02 Thread Narinder Soni
what is the difference between using snmp_open() and snmp_open_ex()
functions? 
Will it be fine if I use snmp_sess_open() instead of snmp_open_ex() for
the traphandler(in snmptrapd.c)?

Thanks
Soni


---
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
___
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


Re: EngineID

2004-08-02 Thread Narinder Soni
Ya, I am also trying to find out the same i.e. why my app. doesn't pick
up these tokens automatically. May be - while mixing up the code of
snmpget and snmptrapd I have eaten up something(I did this 2 years back)
or I have called the initialization routines in different order or this
is happening because of some of the Traditional API functions(which I
also don't think so) which I have used instead of Single API (as
mentioned in README.threads). 

Dave Shield wrote:
> 
> > I am sorry but still I didn't find
> > init_agent("snmptrapd") in snmptrapd.c of ucd-snmp-0.4.2.5
> 
> OK.
> Both Wes and I will have been looking at the v5 code.
> The v4 line is rather old now, and is no longer being developed.
> 
> > init_snmp("snmptrapd") is there.
> > And I am also calling this function. Does this routine also do same as
> > init_agent?? or should I explicitly use init_agent instead od init_snmp
> > or BOTH?
> 
> No - the two init routines are concerned with different things,
> and it isn't a matter of one or the other.   *All* SNMP applications
> will need to call "init_snmp",  and those acting as an agent would
> need to call "init_agent" as well.
> 
> However, I'm less convinced that this is actually the cause of the
> problem here.   Having looked at the code properly, the config handlers
> for the directives "engineBoots" and "oldEngineID" are part of the
> main library rather than the agent, so should be being picked up when
> you call "init_snmp" (which then calls "init_snmpv3", which is where
> these handlers are registered).
> 
> So bottom line is that I *don't* think you need to call "init_agent"
> for a trap handler.
> 
> What I don't understand is why your application doesn't pick up
> these config tokens?
> 
> Dave


---
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
___
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


Re: EngineID

2004-08-02 Thread Narinder Soni
I am sorry but still I didn't find 
init_agent("snmptrapd") in snmptrapd.c of ucd-snmp-0.4.2.5 rather
init_snmp("snmptrapd") is there. 
And I am also calling this function. Does this routine also do same as
init_agent?? or should I explicitly use init_agent instead od init_snmp
or BOTH?

Thanks 
Soni

Dave Shield wrote:
> 
> >  Why should I call init_agent() from
> > my management application i.e. the code which will either receive
> > traps or make snmpget/set commands only.
> 
> Because "init_agent" is the bit that handles some of the
> persistent configuration information.   You don't need that
> for a "run-once" application like 'snmpget' or 'snmpset'.
> But you *do* for a trap handler.
> 
> >Also, I didn't find init_agent being
> > called from the code of tools snmptrapd.c and snmpget.c
> 
> It's not present in snmpget.c, no.
> But it *is* there in snmptrapd.c - about line 840 or 850-ish:
> 
> /*
>  * initialize the agent library
>  */
> init_agent("snmptrapd");
> 
> 
> > Note: I am not calling the following(as in snmptrapd.conf file I mention
> > only "createUser"). Can this cause some problems?
> 
> No - that's fine.
> If you don't need to support those particular config settings,
> then you don't need to register handlers for them.
> 
> But you do need to initialise the agent library as well as the
> main snmp library.
> 
> Dave


---
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
___
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


Re: EngineID

2004-08-02 Thread Narinder Soni
I didn't get your point completely. Why should I call init_agent() from
my management application i.e. the code which will either receive traps
or make snmpget/set commands only. Also, I didn't find init_agent being
called from the code of tools snmptrapd.c and snmpget.c I saw the
following routines being called from snmptrapd.c

/* register our configuration handlers now so -H properly displays
them */
register_config_handler("snmptrapd", "createUser",
usm_parse_create_usmUser, NULL,
"username (MD5|SHA) passphrase [DES
passphrase]");
register_config_handler("snmptrapd", "usmUser",
usm_parse_config_usmUser, NULL, NULL);
  /* we need to be called back later */
  snmp_register_callback(SNMP_CALLBACK_LIBRARY,
SNMP_CALLBACK_STORE_DATA,
 usm_store_users, NULL);
/* Initialize the world. Create initial user */
init_snmp("snmptrapd");

which I am also calling from my application. Still I don't understand
why I get these "Unknown token" errors. 
Note: I am not calling the following(as in snmptrapd.conf file I mention
only "createUser"). Can this cause some problems?
register_config_handler("snmptrapd", "traphandle",
snmptrapd_traphandle, NULL,
"oid|\"default\" program [args ...] ");
register_config_handler("snmptrapd", "format1",
parse_trap1_fmt, free_trap1_fmt,
"format");
register_config_handler("snmptrapd", "format2",
    parse_trap2_fmt, free_trap2_fmt,
"format");

Thanks
Soni


Wes Hardaker wrote:
> 
> >>>>> On Wed, 28 Jul 2004 14:47:25 +0200, Narinder Soni <[EMAIL PROTECTED]> said:
> 
> Narinder> In my application the snmptrapd's code and snmpget/set's code work in
> Narinder> parallel. Evevrything used to work fine till v2c. But when I start my
> Narinder> application I get error as :
> Narinder> Unknown token: engineBoots
> Narinder> Unknown token: oldEngineId
> 
> Ah, thats because it's trying to read configuration tokens you haven't
> told it about.  Generally, this is done automatically for you if you
> had called the right init routines.  My guess is that you never called
> init_agent()?
> 
> --
> Wes Hardaker
> Sparta
> 
> ---
> This SF.Net email is sponsored by OSTG. Have you noticed the changes on
> Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
> one more big change to announce. We are now OSTG- Open Source Technology
> Group. Come see the changes on the new OSTG site. www.ostg.com
> ___
> 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


---
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
___
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


Re: EngineID

2004-07-30 Thread Narinder Soni
Thanks Dave. This I will read.

The reason why I asked this was because I am using the Single API
functions equivalent to the Traditional API functions used in
ucd-snmp-0.4.2.5 's snmpget application. Till now I was using only
v2c(and everything worked fine), but now I wanted to get it running for
v3 also.

In my application the snmptrapd's code and snmpget/set's code work in
parallel. Evevrything used to work fine till v2c. But when I start my
application I get error as :
Unknown token: engineBoots
Unknown token: oldEngineId

I am not able to understand why it gives this error message in the
beginning. I am trying to dig out more. But if someone can pinpoint then
it will be fast for me.

Dave Shield wrote:
> 
> > How and where does snmpget application discover the engine ID of agent's
> > machine?
> 
> It uses the approach outlined in RFC 3414, section 4 "Discovery".
> 
> It actually sends the same request two or three times, in the
> sure and certain expectation that the first one(s) will fail.
> But the error reports that are returned from such failures will
> include the missing information (engineID and boot time/count)
> 
> Try running
> 
> snmpget -d 
> or
> snmpget -Ddump 
> 
> to watch what goes on.
> 
> Dave


---
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
___
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


EngineID

2004-07-28 Thread Narinder Soni
Hi,

How and where does snmpget application discover the engine ID of agent's
machine? 

Thanks
Soni


---
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
___
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


Re: Snmp Agent as a thread

2004-07-28 Thread Narinder Soni
I have tried my application's code as a separate thread from within the
ucd-snmp agent's code. It works fine. And within my application's code I
am further creating multiple threads using mutex etc. This way
everything works.

Soni

Wes Hardaker wrote:
> 
> > On Wed, 21 Jul 2004 13:53:57 -0400, "Reitberger, Susan" <[EMAIL PROTECTED]> 
> > said:
> 
> Susan> I am trying to start the snmp agent as a thread under another
> Susan> application. Has anyone done this before? What function do I
> Susan> tell the thread to run?
> 
> The agent doesn't work in a threaded environment at this point.
> 
> --
> Wes Hardaker
> Sparta
> 
> ---
> This SF.Net email is sponsored by BEA Weblogic Workshop
> FREE Java Enterprise J2EE developer tools!
> Get your free copy of BEA WebLogic Workshop 8.1 today.
> http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
> ___
> 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


---
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
___
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


Re: few more questions related to SNMPv3

2004-07-26 Thread Narinder Soni
Thanks Dave. 
I have one more question - If I try to access UCD-SNMP-4.2.5 agent v3
with any other 3rd party SNMP Manager then it is required to mention the
EngineId of agent into the configuration files of some of these SNMP
Managers. Where do I find the value of EngineId of agent?
Please note that I don't write the createUser line in
/var/ucd-snmp/snmpd.conf file. I write it in the same snmpd.conf file
where the access control stuff is mentioned.

Soni

Dave Shield wrote:
> 
> > > >  Are these entries not
> > > > mandatory to be specified in snmpd.conf for using SNMPv3 ??
> > >
> > > Nope.
> > >
> > But if I don't define these entries in snmpd.conf file then, it gives
> > 'authorizationError'. I try as:
> >
> > ###In snmpd.conf
> > createUser userSoni MD5 lightlight DES
> > rouser userSoni
> 
> But the "rouser" and "rwuser" settings default to authenticated access.
> (i.e. authNoPriv or authPriv).   This won't allow noAuthNoPriv access:
> >
> > and then
> > snmpget -v 3 -l noAuthNoPriv -u userSoni 192.168.1.189:9000 ...OID...
> > Error in packet
> > Reason: authorizationError
> 
> as you see.
> Try
> rouser userSoni noauth
> 
> instead.
> 
> Dave
> 
> ---
> This SF.Net email is sponsored by BEA Weblogic Workshop
> FREE Java Enterprise J2EE developer tools!
> Get your free copy of BEA WebLogic Workshop 8.1 today.
> http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
> ___
> 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


---
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
___
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


Re: few more questions related to SNMPv3

2004-07-14 Thread Narinder Soni
Thanks dave. Please read my explanation after your remarks

Dave Shield wrote:
> 
> >
> > 1) I create the following entries:
> >
> > ---in /var/ucd-snmp/snmpd.conf
> > createUser userSoni MD5 lightlight DES
> 
> Which version of the code are you using?
> The v5 line would normally look in /var/net-snmp/snmpd.conf instead
> 
> [Minor point - don't repeat a phrase like that.  The way
>  that SNMP authentication works means that the password
>  "light" would be accepted as well!]
> 
> > ---in snmpd.conf(where SNMPCONFPATH is set)
> > rouser userSoni
> >
> > This is how its mentioned in README.snmpv3 file and then I do
> >
> > snmpget -v 3 -l noAuthNoPriv -u userSoni 192.168.1.189:9000 ..OID..
> >
> > But i get the message
> > snmpget: Unknown user name
> 
> Did you restart the agent?   How?
> What was the exact command used?
> Where exactly is the (SNMPCONFPATH) file?

Yes. I restarted the agent as --non-root-- user like:
./snmpd -c Config_agent.txt -p 9000 -f
and the SNMPCONFPATH I set to same folder where my agent's executable
and snmpd.conf are
Note: Config_agent.txt is a separate config file which I need for my own
purpose. Within snmpd.c file, I parse this config file accordingly. And
for snmpd.conf file agent read the path from SNMPCONFPATH env variable.
With these settings I have been working since few months. Agent read
both snmpd.conf and Config_agent.txt files separately and behaves
accordingly and works absolutely fine. And I hope that for the SNMPv3
also reading of snmpd.conf this way should not affect any thing else.
But what I observed was that if I run agent as --non-root-- user then it
is not able to access the /var/ucd-snmp/snmpd.conf file. I think that's
why it is not able to know about the 'createUser' also. But I am
restricted at this point that I cannot run my agent as root and also
doesn't want to use ports 161 and 162.


> 
> It's probably worth stopping the agent, and running it with
> 
> snmpd -f -L -Dread_config .
> 
> so you can watch it as it reads in the config files.
> 
No. agent works fine. I can see the traps in snmptrapd because I have
defined trapsess also in snmpd.conf as:
trapsess -v 3 -l noAuthNoPriv -u userSoni 192.168.1.210:9001
Only using snmpget it complains about the above mentioned problem i.e.
Unknown sser name

> > Also, I have seen that /var/ucd-snmp/snmpd.conf file gets read and
> > updated by agent only if it is running as root. But I don't want to run
> > my agent as root(as I don't use the defalut ports 161 and 162 for
> > communication) and for some other reasons also. Same problem I face on
> > the other side with 'snmptrapd' accessing /var/ucd-snmp/snmptrapd.conf
> > file for the user entries. Can anybody suggest an alternative to this??
> > How can I make agent and trap daemon access the respective files without
> > running as root.
> 
> >From the FAQ:
> 
> When I run the agent it runs and then quits without staying around. Why?
> ---
> 
> 
>   If you're starting the agent as a non-root user, then this may also
>   fail with the very same error.  By default, the agent (and trap handler)
>   will attempt to listen on the standard SNMP port 161 (or 162 for the
>   trap handler).  These are defined as "privileged ports", and processes
>   will need to be running as root in order to open them.
> 
> 
>   One way to tackle this is to start the agent as root, but use the -u
>   option to switch to run as another user once the port has been opened.
>   Alternatively, you can specify a different port to use instead.
>   Anything greater than 1024 is available to non-root users.  In this case,
>   you'll also need to specify the same port when issuing client commands.
> 
> 
> > 3) In README.snmpv3 file, the entries related to com2sec, group, view
> > and access derivatives are not explained.
> 
> No - but there is an exhaustive explanation in the FAQ.   We have this
> naive hope that people might consult *all* the documentation :-)
> 
Ya, I read it from there only :)

> >  Are these entries not
> > mandatory to be specified in snmpd.conf for using SNMPv3 ??
> 
> Nope.
> 
But if I don't define these entries in snmpd.conf file then, it gives
'authorizationError'. I try as:

###In snmpd.conf
createUser userSoni MD5 lightlight DES
rouser userSoni

and then
snmpget -v 3 -l noAuthNoPriv -u userSoni 192.168.1.189:9000 ...OID...
Error in packet
Reason: authorizationError

and when I do as following then it works:

###In snmpd.conf
createUser userSoni MD5 lightlight DES
#rouser userSoni
 
#com2sec   userSoni192.168.1.210   public
group grpNamePublicusm  userSoni
view  all  included  .1
accessgrpNamePublic""   any  noAuthexact all  none none

and then  
snmpget -v 3 -l noAuthNoPriv -u userSoni 192.168.1.189:9000 ...OID...
enterprises.. = value


> >  OR the
> 

Re: few more questions related to SNMPv3

2004-07-14 Thread Narinder Soni
Sorry, forgot to tell in my last mailI am using ucd-snmp-0.4.2.5

Dave Shield wrote:
> 
> >
> > 1) I create the following entries:
> >
> > ---in /var/ucd-snmp/snmpd.conf
> > createUser userSoni MD5 lightlight DES
> 
> Which version of the code are you using?
> The v5 line would normally look in /var/net-snmp/snmpd.conf instead
> 
> [Minor point - don't repeat a phrase like that.  The way
>  that SNMP authentication works means that the password
>  "light" would be accepted as well!]
> 
> > ---in snmpd.conf(where SNMPCONFPATH is set)
> > rouser userSoni
> >
> > This is how its mentioned in README.snmpv3 file and then I do
> >
> > snmpget -v 3 -l noAuthNoPriv -u userSoni 192.168.1.189:9000 ..OID..
> >
> > But i get the message
> > snmpget: Unknown user name
> 
> Did you restart the agent?   How?
> What was the exact command used?
> Where exactly is the (SNMPCONFPATH) file?
> 
> It's probably worth stopping the agent, and running it with
> 
> snmpd -f -L -Dread_config .
> 
> so you can watch it as it reads in the config files.
> 
> > Also, I have seen that /var/ucd-snmp/snmpd.conf file gets read and
> > updated by agent only if it is running as root. But I don't want to run
> > my agent as root(as I don't use the defalut ports 161 and 162 for
> > communication) and for some other reasons also. Same problem I face on
> > the other side with 'snmptrapd' accessing /var/ucd-snmp/snmptrapd.conf
> > file for the user entries. Can anybody suggest an alternative to this??
> > How can I make agent and trap daemon access the respective files without
> > running as root.
> 
> >From the FAQ:
> 
> When I run the agent it runs and then quits without staying around. Why?
> ---
> 
> 
>   If you're starting the agent as a non-root user, then this may also
>   fail with the very same error.  By default, the agent (and trap handler)
>   will attempt to listen on the standard SNMP port 161 (or 162 for the
>   trap handler).  These are defined as "privileged ports", and processes
>   will need to be running as root in order to open them.
> 
> 
>   One way to tackle this is to start the agent as root, but use the -u
>   option to switch to run as another user once the port has been opened.
>   Alternatively, you can specify a different port to use instead.
>   Anything greater than 1024 is available to non-root users.  In this case,
>   you'll also need to specify the same port when issuing client commands.
> 
> 
> > 3) In README.snmpv3 file, the entries related to com2sec, group, view
> > and access derivatives are not explained.
> 
> No - but there is an exhaustive explanation in the FAQ.   We have this
> naive hope that people might consult *all* the documentation :-)
> 
> >  Are these entries not
> > mandatory to be specified in snmpd.conf for using SNMPv3 ??
> 
> Nope.
> 
> >  OR the
> > combination of 'rouser/rwuser' and 'createUser' is sufficient(at least
> > for the first step) for configuring agent for SNMPv3??
> 
> Yup.
> See the FAQ entries:
> 
> How do I configure access control?
> &   I don't understand the new access control stuff - what does it mean?
> 
> In particular:
> 
>   These directives [rouser/rwuser] are effectively wrappers round the
>   core access control mechanism, which uses the four directives 'com2sec',
>   'group', 'view' and 'access' to provide a more efficient and flexible
>   control over who can access which portions of the tree.
> 
> Dave
> 
> ---
> This SF.Net email sponsored by Black Hat Briefings & Training.
> Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
> digital self defense, top technical experts, no vendor pitches,
> unmatched networking opportunities. Visit www.blackhat.com
> ___
> 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


---
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
___
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


few more questions related to SNMPv3

2004-07-14 Thread Narinder Soni

1) I create the following entries:

---in /var/ucd-snmp/snmpd.conf
createUser userSoni MD5 lightlight DES

---in snmpd.conf(where SNMPCONFPATH is set)
rouser userSoni

This is how its mentioned in README.snmpv3 file and then I do 

snmpget -v 3 -l noAuthNoPriv -u userSoni 192.168.1.189:9000 ..OID..

But i get the message 
snmpget: Unknown user name

2) What can be the wrong?

Also, I have seen that /var/ucd-snmp/snmpd.conf file gets read and
updated by agent only if it is running as root. But I don't want to run
my agent as root(as I don't use the defalut ports 161 and 162 for
communication) and for some other reasons also. Same problem I face on
the other side with 'snmptrapd' accessing /var/ucd-snmp/snmptrapd.conf
file for the user entries. Can anybody suggest an alternative to this??
How can I make agent and trap daemon access the respective files without
running as root.

3) In README.snmpv3 file, the entries related to com2sec, group, view
and access derivatives are not explained. Are these entries not
mandatory to be specified in snmpd.conf for using SNMPv3 ?? OR the
combination of 'rouser/rwuser' and 'createUser' is sufficient(at least
for the first step) for configuring agent for SNMPv3??

Thanks
Soni


---
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
___
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


Re: problem in configuring agent for SNMPv3 protocol

2004-07-14 Thread Narinder Soni
Yes, you are right. 
SNMPv2 traps I could receive with HP Openview but not SNMPv3 traps. The
reason was same as stated by you..I found that the HP Openview's
version which I was using for testing doesnot support SNMPv3.

Thanks Dave.


Dave Shield wrote:
> 
> > One more question. What does this *all* list of parameters include for
> > 'trapsess' derivative? I have include security level and username.
> 
> Yes - that should be enough.
> 
> > Here are my settings in snmpd.conf file for v3:
> [snip]
> > trapsess -v 3 -l noAuthNoPriv -u public 192.168.1.210:9001 public
> 
> That looks fine...
> 
> > With these settings, I can receive the traps using apps/snmptrapd,
> 
>  and that show that it works properly.
> 
> > but when I try to receive the traps in any other 3rd party SNMP
> > Manager e.g. HP Openview etc. then it doesn't receive.
> 
> That sounds like a problem with configuring the 3rd party manager,
> or an incompatability between the two sides.
> 
> If you send a v3 trap "manually" (i.e. using 'snmptrap') to the
> remote manager, does it arrive safely?   What about an inform?
> Does a v1 or v2 trap arrive OK?
> 
> Is the remote manager configured to know about the user "public" ?
> (That shouldn't be necessary for unauthenticated traps, but it's
> a possibility - see
>http://www.net-snmp.org/tutorial-5/commands/snmptrap-v3.html
>   for a discussion of the issues involved).
> 
> What does the documentation for the remote manager say?
> Is it logging anything?   Can it be persuaded to?
> 
> Dave


---
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
___
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


Re: problem in understanding role of engineID for SNMPv3 protocol

2004-07-14 Thread Narinder Soni
Hi Dave and others, Few more doubts..

I read the following about SNMPv3:
---The user database in a SNMPv3 application is referenced by a
combination of the user's name("security name") and an identifier
for the given SNMP application you are talking to("engineID").---
 
My question:
Let's say A(SNMP Agent) and B(SNMP Manager) are my two applications. So
if I have to make a get request from B->A, then on B's user database
three things will be stored i.e. "user name" and "password"(provided as
param to snmpget) and "engineID of A"(as mentioned in above statement).
 
* How does B fetches the engineID of A and what it is composed of?
* Will the same procedure be followed if I use any other SNMP Manager
application(other than ucd-snnmp's 'snmpget' app.)
 
and I read this also:
---The SNMPv3 TRAPs use the engineID of the 'local' application(sending
the traps) rather than the engineID of the 'remote' application---
 
My question:
If I send traps from A->B, lets say using 'snmptrap' application like:
snmptrap -v 3 -u myuser -a MD5 -A mypass -l authNoPriv B's_address 42
coldStart.0
Now, where does the engineID play a role here and how does the trap
receiver compare this engineID send by A?
 
Any help would clear my doubts.
 
Thanks
Soni

Dave Shield wrote:
> 
> > when I give the version as --
> > trapsess -v 2c localhost:9001
> > then the snmptrapd receive all the traps, but with -v 3 it doesn't
> > receive anythingnot even the Cold Start trap from agent.
> 
> You need to specify *all* the SNMPv3 settings in the "trapsess" line -
> i.e. the username, security level and (for anything other than
> noAuthNoPriv) the authentication/privacy passwords.
> 
> It's nothing to do with snmptrapd - the problem is that the agent
> doesn't have enough information to actually send the trap in the
> first place.   Unlike the command-line tools (such as "snmptrap")
> it doesn't use the settings from snmp.conf files.
> 
> Dave
>


---
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
___
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


Re: problem in configuring agent for SNMPv3 protocol

2004-07-13 Thread Narinder Soni
Hi Dave,
One more question. What does this *all* list of parameters include for
'trapsess' derivative? I have include security level and username.

Here are my settings in snmpd.conf file for v3:


createUser public MD5 my_password DES

com2sec   public192.168.1.210   public
group publicv2c  public
group publicusm  public
view  all  included  .1
#accesspublic""   any  authexact all  none none 
accesspublic""   any  noAuthNoPrivexact all  none none

trapsess -v 3 -l noAuthNoPriv -u public 192.168.1.210:9001 public
###

With these settings, I can receive the traps using apps/snmptrapd, but
when I try to receive the traps in any other 3rd party SNMP Manager e.g.
HP Openview etc. then it doesn't receive. 

* Am I providing all necessary parameters in snmpd.conf with respect to
configuring agent for SNMPv3 protocol?
* Or Is there something to be configured on the Manager side for SNMPv3?
* Or can there be a problem in my MIB file also which these Managers
use?

Thanks
Soni

Dave Shield wrote:
> 
> > when I give the version as --
> > trapsess -v 2c localhost:9001
> > then the snmptrapd receive all the traps, but with -v 3 it doesn't
> > receive anythingnot even the Cold Start trap from agent.
> 
> You need to specify *all* the SNMPv3 settings in the "trapsess" line -
> i.e. the username, security level and (for anything other than
> noAuthNoPriv) the authentication/privacy passwords.
> 
> It's nothing to do with snmptrapd - the problem is that the agent
> doesn't have enough information to actually send the trap in the
> first place.   Unlike the command-line tools (such as "snmptrap")
> it doesn't use the settings from snmp.conf files.
> 
> Dave
> 
> ---
> This SF.Net email sponsored by Black Hat Briefings & Training.
> Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
> digital self defense, top technical experts, no vendor pitches,
> unmatched networking opportunities. Visit www.blackhat.com
> ___
> 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


---
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
___
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


Re: What if Mgr. dies!!

2004-07-13 Thread Narinder Soni
In addition to this, you can create a cron job in the backgroud which
will check for your manager regulary(at some particular interval of
time) and in case it finds the manager dead then with help of this cron
job you can start it very next moment. And with the next start you can
check for those missed(logged) traps also.

I would also like to know about any other better option.

Soni


"Fernández Piñas, David" wrote:
> 
> One option would be to implement a trap history table at your snmp agent, so if the 
> manager dies, when it resurrects can check if the agent has sent any trap.
> 
> -Original Message-
> From: Tina Agarwal
> Sent: Tuesday, July 13, 2004 11:00 AM
> To: net-snmp-users
> Subject: What if Mgr. dies!!
> 
> Hi All,
> 
> I have a general query. What can be the efficient way of handling traps in the agent 
> if there is either no Manager or the Manager dies. No trap should be missed and 
> action should be taken in response to each and every trap.
> 
> Thsnx
> Tina
> ---
> Este correo electrónico y, en su caso, cualquier fichero anexo al mismo, contiene 
> información de carácter confidencial exclusivamente dirigida a su destinatario o 
> destinatarios. Queda prohibida su divulgación, copia o distribución a terceros sin 
> la previa autorización escrita de Indra. En el caso de haber recibido este correo 
> electrónico por error, se ruega notificar inmediatamente esta circunstancia mediante 
> reenvío a la dirección electrónica del remitente.
> 
> The information in this e-mail and in any attachments is confidential and solely for 
> the attention and use of the named addressee(s). You are hereby notified that any 
> dissemination, distribution or copy of this communication is prohibited without the 
> prior written consent of Indra. If you have received this communication in error, 
> please, notify the sender by reply e-mail
> 
> ---
> This SF.Net email sponsored by Black Hat Briefings & Training.
> Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
> digital self defense, top technical experts, no vendor pitches,
> unmatched networking opportunities. Visit www.blackhat.com
> ___
> 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


---
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
digital self defense, top technical experts, no vendor pitches,
unmatched networking opportunities. Visit www.blackhat.com
___
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


Re: problem in configuring agent for SNMPv3 protocol

2004-07-13 Thread Narinder Soni
Thanks Dave. It works now :)

Soni

Dave Shield wrote:
> 
> > when I give the version as --
> > trapsess -v 2c localhost:9001
> > then the snmptrapd receive all the traps, but with -v 3 it doesn't
> > receive anythingnot even the Cold Start trap from agent.
> 
> You need to specify *all* the SNMPv3 settings in the "trapsess" line -
> i.e. the username, security level and (for anything other than
> noAuthNoPriv) the authentication/privacy passwords.
> 
> It's nothing to do with snmptrapd - the problem is that the agent
> doesn't have enough information to actually send the trap in the
> first place.   Unlike the command-line tools (such as "snmptrap")
> it doesn't use the settings from snmp.conf files.
> 
> Dave
> 
> ---
> This SF.Net email sponsored by Black Hat Briefings & Training.
> Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
> digital self defense, top technical experts, no vendor pitches,
> unmatched networking opportunities. Visit www.blackhat.com
> ___
> 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


---
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
___
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


Re: problem in configuring agent for SNMPv3 protocol

2004-07-13 Thread Narinder Soni
when I give the version as --
trapsess -v 2c localhost:9001
then the snmptrapd receive all the traps, but with -v 3 it doesn't
receive anythingnot even the Cold Start trap from agent. How can I
make apps/snmptrapd receive traps with the following statement in
snmpd.conf file of agent? 
trapsess -v 3 localhost:9001
Do I have to set anything else somewhere OR Do I have to provide
'version number' command line parameter while running snmptrapd??

Thanks 
Soni

narinder soni wrote:
> 
> Hi all,
> I am using UCD-SNMP-0.4.2.5 Everything used to work with SNMPv2 -
> snmpget, snmpset and traps also. Now I want to configure the same
> agent
> for SNMPv3 protocol. I just changed the snmpd.conf file in the
> following
> way(replacing the previous entries for SNMPv2):
> 
> ##
> 
> ## for get/set requests
> createUser public MD5 my_password DES
> 
> com2sec   public192.168.1.210   public
> group publicv2c  public
> group publicusm  public
> view  all  included  .1
> accesspublic""   any  noauthexact all  none nonea
> 
> 
> ## for traps
> #trapcommunity  public
> 
> # trapsink: A SNMPv1 trap receiver
> #   arguments: host [community] [portnum]
> #trapsink  localhost:9001
> #trapsink  192.168.1.210:9001
> 
> # trap2sink: A SNMPv2c trap receiver
> #   arguments: host [community] [portnum]
> #trap2sink  localhost:9001
> #trap2sink  192.168.1.210:9001
> trapsess 192.168.1.210:9001 public
> #trapsess 192.168.1.210:162 public
> 
> ##
> 
> With the above changes in snmpd.conf The snmpset and snmpget works.
> But
> the traps are not working properly. After running
> ./snmptrapd -P -p 9001 -F "%02.2h:%02.2j TRAP%w.%q from %A\n
> Trap-Type:
> %W\n"
> I only get two traps: 1st "Cold Start" when agent is started and 2nd
> when agent is stopped. I am not able to receive other traps.
> 
> I was using send_v2trap() in my mib.c with SNMPv2 when everything used
> to work. Do I have to change this for SNMPv3(Documentation doesn't say
> so)? OR anything else anywhere? OR if anyone can point out what I am
> doing wrong.
> 
> Any comments please.
> Regards
> Soni
> 
> 
> --
> Do you Yahoo!?
> Yahoo! Mail - 50x more storage than other providers!


---
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
___
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


problem in configuring agent for SNMPv3 protocol

2004-07-12 Thread narinder soni
Hi all,
I am using UCD-SNMP-0.4.2.5 Everything used to work with SNMPv2 -snmpget, snmpset and traps also. Now I want to configure the same agentfor SNMPv3 protocol. I just changed the snmpd.conf file in the followingway(replacing the previous entries for SNMPv2): ## ## for get/set requestscreateUser public MD5 my_password DES com2sec   public    192.168.1.210   publicgroup public    v2c  publicgroup public    usm  publicview  all  included  .1access    public    ""   any  noauth    exact all  none nonea  ## for traps
#trapcommunity  public # trapsink: A SNMPv1 trap receiver#   arguments: host [community] [portnum]#trapsink  localhost:9001#trapsink  192.168.1.210:9001 # trap2sink: A SNMPv2c trap receiver#   arguments: host [community] [portnum]#trap2sink  localhost:9001#trap2sink  192.168.1.210:9001
trapsess 192.168.1.210:9001 public#trapsess 192.168.1.210:162 public ## With the above changes in snmpd.conf The snmpset and snmpget works. Butthe traps are not working properly. After running./snmptrapd -P -p 9001 -F "%02.2h:%02.2j TRAP%w.%q from %A\n Trap-Type:%W\n"I only get two traps: 1st "Cold Start" when agent is started and 2ndwhen agent is stopped. I am not able to receive other traps. I was using send_v2trap() in my mib.c with SNMPv2 when everything usedto work. Do I have to change this for SNMPv3(Documentation doesn't sayso)? OR anything else anywhere? OR if anyone can point out what I amdoing wrong. Any comments please.
RegardsSoni
   
		Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!