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;

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, /* * bits

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

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: 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 = new

[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

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. FWIW, this

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. netsnmphelpers.a

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

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 Anders

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: my

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 difference.

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

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

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