Re: Patch to net-snmp 5.2.3-7 (debian) to provide netlink-based link state trap generation

2007-06-26 Thread Wes Hardaker
ML> My apologies ahead of time for the vintage of net-snmp that I've ML> applied this to. The patch is relatively small, and should hopefully ML> be easily adaptable to more recent versions. We appreciate the submission none the less (we'd love a more recent patch, but we will take what we can ge

Re: solaris 10 x86 problem building snmptrapd 5.4.1-pre3

2007-06-26 Thread Thomas Anders
Ed Ravin wrote: > I tried it. It worked! Here's the edit I made to apps/Makefile: I've just applied a similar change to the 5.4.x SVN branch and trunk. It will be in 5.4.1.rc1 and later. +Thomas - This SF.net email is spo

SNMP canonical formats

2007-06-26 Thread Ajay Chenampara
from the link http://net-snmp.sourceforge.net/docs/perl-SNMP-README.html the canonical formats for snmp are as below: but how do i set a "STRING" in that case ( to pass the tftp file name info for eg) OBJECTID => dotted-decimal (e.g., .1.3.6.1.2.1.1.1) OCTETSTR => perl scalar containing o

Re: code to tftp download cisco configs.

2007-06-26 Thread Brian A. Seklecki
On Mon, 2007-06-25 at 14:37 -0700, Ajay Chenampara wrote: > Hi there, > I know im overlooking something here and i hope someone here will be > able to point it out... > Im writing a script to download our s/w and router configs via tftp > using snmp commands. It helps to load the MIB "CISCO-CONFI

netbsd 3.0 and net-snmp-5.4.1.pre3, walking UCD mib hangs snmpd

2007-06-26 Thread Ed Ravin
I just built net-snmp-5.4.1.pre3 on NetBSD 3.0. When I walk the UCD MIB, it hangs snmpd. In my MIB, are a couple of 'exec' extensions that run a few shell scripts. When I walk the UCD MIB, I get this: UCD-SNMP-MIB::extResult.1 = INTEGER: 0 UCD-SNMP-MIB::extResult.2 = INTEGER: 1 UCD-SNMP

Re: code to tftp download cisco configs.

2007-06-26 Thread Ajay Chenampara
Dave, I think it works now... I set the OID to $OID = "1.3.6.1.4.1.9.9.96.1.1.1.1.14"; and my $vb = new SNMP::Varbind([$OID,'1000','6','INTEGER']); my $var = $session->set($vb); and the output is clean. but now i need to know how to check for the response from the router and look for the "6

Re: code to tftp download cisco configs.

2007-06-26 Thread Ajay Chenampara
ah that makes sense...but still no luck router debug when using the snmpset : Jun 26 16:47:07.892: SNMP: Packet received via UDP from on FastEthernet0/0 Jun 26 16:47:07.892: Incoming SNMP packet Jun 26 16:47:07.892: v3 packet security model: v3 security level: noauth Jun 26 16:47:07.892: u

Re: solaris 10 x86 problem building snmptrapd 5.4.1-pre3

2007-06-26 Thread Mike Fisher
Thomas Anders wrote: > Mike Fisher wrote: >> For what it's worth, I just built on Solaris 10 x86 with no issues using >> gcc 3.3.2. What configure options are you using? > > Do you build static or shared libs or both? Ed's build was failing with > --enable-shared=no which *may* make a differen

Re: code to tftp download cisco configs.

2007-06-26 Thread Dave Shield
On 26/06/07, Ajay Chenampara <[EMAIL PROTECTED]> wrote: > I am assuming you meant me to set the $OID as 1.3.6.1.4.1.9.9.96.1.1.1.1.14 > (without the random index number). That's correct. The second parameter to the SNMP::Varbind call is the index value. So the first two parameters are combined to

Re: code to tftp download cisco configs.

2007-06-26 Thread Ajay Chenampara
that did not help... I am assuming you meant me to set the $OID as 1.3.6.1.4.1.9.9.96.1.1.1.1.14 (without the random index number). I got the same error [noCreation (that table does not support row creation)] Ajay Dave Shield <[EMAIL PROTECTED]> wrote: On 25/06/07, Ajay Chenampara wrote: > m

Re: solaris 10 x86 problem building snmptrapd 5.4.1-pre3

2007-06-26 Thread Thomas Anders
Mike Fisher wrote: > For what it's worth, I just built on Solaris 10 x86 with no issues using > gcc 3.3.2. What configure options are you using? Do you build static or shared libs or both? Ed's build was failing with --enable-shared=no which *may* make a difference. +Thomas -- Thomas Ander

RE: Conversation of seconds to DateAndTime

2007-06-26 Thread somenath.pal
Hi All, Thanks for your kind response. I would like to know if I there is any method which can convert DateAndTime to seconds . Regards, Somenath -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dave Shield Sent: Monday, June 25, 2007 2:10 PM To: Somena

annoying Net-SNMP nits

2007-06-26 Thread Ed Ravin
Why does http://net-snmp give me a 404? Only www.net-snmp.org works. Not such a big deal but it would be nice to fix. The natural thing to try when getting a 404 is to remove the hyphen, and which of course brings to that inexplicable pr0n site using a lookalike URL. ---

Re: solaris 10 x86 problem building snmptrapd 5.4.1-pre3

2007-06-26 Thread Ed Ravin
On Tue, Jun 26, 2007 at 08:36:54AM -0400, Mike Fisher wrote: > Ed Ravin wrote: > > On Tue, Jun 26, 2007 at 09:57:40AM +0200, Thomas Anders wrote: > >> Ed Ravin wrote: > >>> This is weird. I can't build snmptrapd on my Solaris 10 x86 box - see > >>> below. Had no such problems with 5.4. netsnmphe

Re: solaris 10 x86 problem building snmptrapd 5.4.1-pre3

2007-06-26 Thread Mike Fisher
Ed Ravin wrote: > On Tue, Jun 26, 2007 at 09:57:40AM +0200, Thomas Anders wrote: >> Ed Ravin wrote: >>> This is weird. I can't build snmptrapd on my Solaris 10 x86 box - see >>> below. Had no such problems with 5.4. netsnmphelpers.a exists >>> and has the entry points defined: ... >> Interesting

[no subject]

2007-06-26 Thread Bukovan Michal
Hi everyone. I have problem with net-snmp for windows. I dont know how I can launch some program, when my smnptrap catch some message. In linux a simple write in cnmptrapd.conf: traphandle default /dir/dir/myskript But when I write: traphandle default c:\myskript.bat (or c:/myskript.bat) so it

Re: code to tftp download cisco configs.

2007-06-26 Thread Dave Shield
On 25/06/07, Ajay Chenampara <[EMAIL PROTECTED]> wrote: > my $vb = new SNMP::Varbind([$OID,'0','6','INTEGER']); > oidvalue=[1.3.6.1.4.1.9.9.96.1.1.1.1.14.1000], errNo=[11], > errStr=[noCreation (that table does not support row creation)] Try oidvalue=[1.3.6.1.4.1.9.9.96.1.1.1.1.14] my $vb =

Re: Pthread Creation

2007-06-26 Thread Dave Shield
On 25/06/07, Rajesh Balasubramanian <[EMAIL PROTECTED]> wrote: > I would like to create a separate pthread in net-snmp due to my need. > But I am getting the following error, have the statement pthread_create in > snmpd.c > > net-snmp-5.2.3/agent/snmpd.c:1034: undefined reference to `pthread_create

Re: solaris 10 x86 problem building snmptrapd 5.4.1-pre3

2007-06-26 Thread Ed Ravin
On Tue, Jun 26, 2007 at 09:57:40AM +0200, Thomas Anders wrote: > Ed Ravin wrote: > > This is weird. I can't build snmptrapd on my Solaris 10 x86 box - see > > below. Had no such problems with 5.4. netsnmphelpers.a exists > > and has the entry points defined: > > > > # nm > > /build/SunOS/net

Re: solaris 10 x86 problem building snmptrapd 5.4.1-pre3

2007-06-26 Thread Thomas Anders
Ed Ravin wrote: > This is weird. I can't build snmptrapd on my Solaris 10 x86 box - see > below. Had no such problems with 5.4. netsnmphelpers.a exists > and has the entry points defined: > > # nm > /build/SunOS/netsnmp/net-snmp-5.4.1.pre3-SunOS-5.10/agent/helpers/.libs/libnetsnmphelpers.a >

RE: How to convert BITS data into OCTET String

2007-06-26 Thread Abhishek Mishra
Thanks JP. Functions you have provided are very useful. -Abhishek On Tue, 2007-06-26 at 12:30, Jayaprakasha Guddenahalli Naganna wrote: > Treat BITS as just OCTET STRING. > Example API's for processing bits from char* variable, > Call this function by passing *val* from set_handler, > /* > * bit

solaris 10 x86 problem building snmptrapd 5.4.1-pre3

2007-06-26 Thread Ed Ravin
This is weird. I can't build snmptrapd on my Solaris 10 x86 box - see below. Had no such problems with 5.4. netsnmphelpers.a exists and has the entry points defined: # nm /build/SunOS/netsnmp/net-snmp-5.4.1.pre3-SunOS-5.10/agent/helpers/.libs/libnetsnmphelpers.a | grep -i register_null_cont

RE: How to convert BITS data into OCTET String

2007-06-26 Thread Jayaprakasha Guddenahalli Naganna
Treat BITS as just OCTET STRING. Example API's for processing bits from char* variable, Call this function by passing *val* from set_handler, /* * bits -- set val * pos -- which bit you want to read from set val */ int bit_get(const unsigned char *bits, int pos) { unsigned intmask;