Re: which variable type to use when extending a unsigned32 or gauge32

2011-05-10 Thread Leo Lin
ect: Re: which variable type to use when extending a unsigned32 or gauge32 To: "Leo Lin" Cc: net-snmp-users@lists.sourceforge.net Date: Tuesday, May 10, 2011, 12:55 AM On 10 May 2011 03:08, Leo Lin wrote: > I have a scalar OID of unsigned32.  On my mib module, I declare a vari

which variable type to use when extending a unsigned32 or gauge32

2011-05-09 Thread Leo Lin
Hi,   I have a scalar OID of unsigned32.  On my mib module, I declare a variable that hold an unsigned int, like so,   unsigned int my_oid;   when I issue an snmpget, I get the following error   "Wrong type (should be Gauge32 or Unsigned32) INTEGER:30"   How can I declare a Unsigned32 or Gauge32

Re: sending an IPC for incoming snmpset commands

2011-04-18 Thread Leo Lin
Understood, thanks so much Dave   Leo; --- On Mon, 4/18/11, Dave Shield wrote: From: Dave Shield Subject: Re: sending an IPC for incoming snmpset commands To: "Leo Lin" Cc: net-snmp-users@lists.sourceforge.net Date: Monday, April 18, 2011, 6:42 AM On 18 April 2011 14:10, Leo

Re: sending an IPC for incoming snmpset commands

2011-04-18 Thread Leo Lin
ng snmpset commands To: "Leo Lin" Cc: net-snmp-users@lists.sourceforge.net Date: Monday, April 18, 2011, 1:40 AM On 17 April 2011 03:02, Leo Lin wrote: > I would like to send an interprocess communicatio message whenever > an snmpset command is received by the snmpd. Regardless of

sending an IPC for incoming snmpset commands

2011-04-16 Thread Leo Lin
Hi,   I would like to send an interprocess communicatio message whenever an snmpset command is received by the snmpd.  I checked the snmpd source code, and seems that my custom code should be place in the receive() function, however, I cannot find where the requests are handled beside my custom

Re: snmpset gives an gen Error message

2010-11-29 Thread Leo Lin
snmpget, it will not create this error, as it does not go through the several SET modes as in snmpset.   Hope it helps,   Leo; --- On Mon, 11/29/10, jack n wrote: From: jack n Subject: Re: snmpset gives an gen Error message To: "Leo Lin" Cc: "Net-snmp-users" Date: Monday,

Study net-snmp source code

2010-11-04 Thread Leo Lin
Hi,   I would like to study net-snmp source code, where can I get started?   Thanks!   Leo; -- The Next 800 Companies to Lead America's Growth: New Video Whitepaper David G. Thomson, author of the best-selling book

Re: Understanding snmpwalk

2010-10-19 Thread Leo Lin
Hi Dave,   I've found the source of the bug.  As all bug, it was a silly mistake.   Initially, I've set the RowIndex on Table2 to OctetString while studying the data_set.c source code.  I've decided to change it to Integer32 which is more practical.   by DEBUGMSGTL, the code ends while executin

Re: Understanding snmpwalk

2010-10-19 Thread Leo Lin
while executing   switch (table_info->colnum){ case } --- On Tue, 10/19/10, Dave Shield wrote: From: Dave Shield Subject: Re: Understanding snmpwalk To: "Leo Lin" Cc: "Net-snmp-users" Date: Tuesday, October 19, 2010, 8:53 AM On 19 October 2010 16:42, Leo Lin wr

Re: Understanding snmpwalk

2010-10-19 Thread Leo Lin
hanks!   Leo; --- On Tue, 10/19/10, Dave Shield wrote: From: Dave Shield Subject: Re: Understanding snmpwalk To: "Leo Lin" Cc: "Net-snmp-users" Date: Tuesday, October 19, 2010, 8:16 AM On 19 October 2010 16:07, Leo Lin wrote: > snmpwalk –v1 –cprivate localhost AlarmDat

Re: Understanding snmpwalk

2010-10-19 Thread Leo Lin
helper, I will try with my own module (snmpd –agent.c table.c) and see if there’s any errors.   Leo; --- On Tue, 10/19/10, Dave Shield wrote: From: Dave Shield Subject: Re: Understanding snmpwalk To: "Leo Lin" Cc: "Net-snmp-users" Date: Tuesday, October 19, 2010, 5:29 AM O

Re: Understanding snmpwalk

2010-10-19 Thread Leo Lin
nstead, to check if this happens with the helper as well.  Then, I will DEBUGMSGTL to check where it hangs...   Leo; --- On Tue, 10/19/10, Dave Shield wrote: From: Dave Shield Subject: Re: Understanding snmpwalk To: "Leo Lin" Cc: "Net-snmp-users" Date: Tuesday, October 19,

Re: Understanding snmpwalk

2010-10-18 Thread Leo Lin
Hi,   I'm using net-snmp-5.6.rc1, and I've implemented scalars and table oids modules on my agent.   Everything works fine, I can issue snmpget, snmpgetnext, snmpset,   one of the tables is as following:   MyTable (1) |--TableEntry (1)    |    Index: RowIndex    |- Integer32 Row

Understanding snmpwalk

2010-10-18 Thread Leo Lin
Hi,   I'm using net-snmp-5.6.rc1, and I've implemented scalars and table oids modules on my agent.   Everything works fine, I can issue snmpget, snmpgetnext, snmpset,   one of the tables is as following:   MyTable (1) |--TableEntry (1)     RowIndex Integer32 AlarmType OctetString AlarmDescripti

Re: problem encountered while issuing multiple snmpset on octetstring oids

2010-10-18 Thread Leo Lin
: From: Dave Shield Subject: Re: problem encountered while issuing multiple snmpset on octetstring oids To: "Leo Lin" Cc: "Net-snmp-users" Date: Monday, October 18, 2010, 7:31 AM On 18 October 2010 15:13, Leo Lin wrote: > Then, I issue an snmpset and modify the contents

problem encountered while issuing multiple snmpset on octetstring oids

2010-10-18 Thread Leo Lin
Hi,   I'm using net-snmp-5.6.rc1, and I just encontered a strange behavior while issuing multiple snmpset on octet string oids.   I have an oid that holds an octet string.  When my module is initialized, the contents of the oid is initialized to "private".   Then, I issue an snmpget to check if

Re: Can string overruns overwrite snmpd.c?

2010-10-17 Thread Leo Lin
Thanks Dave,   I've located the source of the problem.  And yes, string overruns does not corrupt the source files.   Leo; --- On Sun, 10/17/10, Dave Shield wrote: From: Dave Shield Subject: Re: Can string overruns overwrite snmpd.c? To: "Leo Lin" Cc: "Net-snmp-users&quo

Re: snmpset gives an gen Error message

2010-10-16 Thread Leo Lin
I've found the bug, now it's working fine.   Thanks!   Leo; --- On Sat, 10/16/10, Leo Lin wrote: From: Leo Lin Subject: snmpset gives an gen Error message To: "Net-snmp-users" Date: Saturday, October 16, 2010, 2:38 PM Hi,   I've been extending the snmpd wit

snmpset gives an gen Error message

2010-10-16 Thread Leo Lin
Hi,   I've been extending the snmpd with my own modules.  I made sure that each module is working properly before adding another one.   Suddendly, on one of the latest modules, netsnmp builds ok, but I get an error while using snmpset command.   I also tested the snmpset with a library in c# sep

Can string overruns overwrite snmpd.c?

2010-10-16 Thread Leo Lin
Hi,   if the mib2c extension custom code create string overruns, and it overwrite snmpd.c source code?   the reason I ask, it that I had some seg-fault when I included a new module.   I reverted to the module that was tested and worked, and now, snmpd does not respond to snmpset commands.  I thi

Re: Extending snmp agent: compile extension source and header files faster

2010-10-16 Thread Leo Lin
Thanks! very much,   Leo; --- On Sat, 10/16/10, Dave Shield wrote: From: Dave Shield Subject: Re: Extending snmp agent: compile extension source and header files faster To: "Abraham Varricatt" Cc: "Leo Lin" , "Net-snmp-users" Date: Saturday, October 16, 2010,

Extending snmp agent: compile extension source and header files faster

2010-10-15 Thread Leo Lin
Hi,   just wondering if there's a way to compile my source and header files generated by mib2c without having to go through the   ./configure, make, make install process.   I don't want to install the extension, but just to see if it can be compile successfully and there's no sintax errors.   fo

Extending snmp agent

2010-10-11 Thread Leo Lin
Hi,   If I have compiled a '.o' file such as utilities.o; how can I specify the ./configure to compile with .o file when making the Make file?  I put the '.o' file in same directory as /net-snmp/agent/mibgroup   Thanks!   Leo; -

Re: snmpset table values using oid instead of textual MIB description

2010-10-07 Thread Leo Lin
value of the column given a index,   the syntax is   snmpset -v1 -cprivate localhost ..   my index field is an ASN_OCTET_STR,   ps/ sorry to double-post, hit the wrong key in yahoo mail editor... --- On Thu, 10/7/10, Leo Lin wrote: From: Leo Lin Subject: Re: snmpset table values using oid inst

Re: snmpset table values using oid instead of textual MIB description

2010-10-07 Thread Leo Lin
I added the following code to snmpset.c to display the parsed oid   int oid_count = 0; prinft("\noid = "); for (oid_count = 0; oid_count < name_length; oid_count++){   } --- On Wed, 10/6/10, Leo Lin wrote: From: Leo Lin Subject: snmpset table values using oid instead o

snmpset table values using oid instead of textual MIB description

2010-10-06 Thread Leo Lin
Hi,   Is it possible to add a new data row to a table described in data_set.c, but instead of using textual MIB description, use only oid?   "% snmptranslate -m NET-SNMP-EXAMPLES-MIB -Tp -IR netSnmpIETFWGTable     |+--netSnmpIETFWGTable(1)     |   |     |   +--netSnmpIETFWGEntry(1)     |  |

Re: Crosscompiling Netsnmp-5.6.rc1 for arm-unknown-linux under Cgywin

2010-09-30 Thread Leo Lin
, pThread is under my cross-toolchain.  I'm assuming that since I specify ./configure to use my cross-toolchain, it uses the pThread since it is there.   I'll ask my embedded system provider about the consecuences of not having pthread in the cross-toolchain, so I can delete (rm) them. 

Re: Crosscompiling Netsnmp-5.6.rc1 for arm-unknown-linux under Cgywin

2010-09-30 Thread Leo Lin
Hi Bart,   Do you know if net-snmp-5.2 also has dependency on pthread?   thanks!   Leo; --- On Fri, 9/24/10, Bart Van Assche wrote: From: Bart Van Assche Subject: Re: Crosscompiling Netsnmp-5.6.rc1 for arm-unknown-linux under Cgywin To: "Leo Lin" Cc: "Net-snmp-users" Dat

Re: Crosscompiling Netsnmp-5.6.rc1 for arm-unknown-linux under Cgywin

2010-09-29 Thread Leo Lin
Thanks!!   Leo;    --- On Wed, 9/29/10, Bart Van Assche wrote: From: Bart Van Assche Subject: Re: Crosscompiling Netsnmp-5.6.rc1 for arm-unknown-linux under Cgywin To: "Leo Lin" Cc: "Net-snmp-users" Date: Wednesday, September 29, 2010, 3:35 AM On Tue, Sep 28, 2010 at 6:34

Re: Crosscompiling Netsnmp-5.6.rc1 for arm-unknown-linux under Cgywin

2010-09-28 Thread Leo Lin
snmpd.exe.stackdump snmptrapd.exe   only snmptrapd.exe works on my i686-pc-cygwin, but snmpd.exe gave me a `segmentation fault (core dumped)` error.   --- On Mon, 9/27/10, Leo Lin wrote: From: Leo Lin Subject: Re: Crosscompiling Netsnmp-5.6.rc1 for arm-unknown-linux under Cgywin To: "Bar

Re: Crosscompiling Netsnmp-5.6.rc1 for arm-unknown-linux under Cgywin

2010-09-27 Thread Leo Lin
Sorry, I forgot to mention that I downloaded and installed m4. 1.4.15 via Cygwin update, and it is still giving me the same error... --- On Mon, 9/27/10, Leo Lin wrote: From: Leo Lin Subject: Re: Crosscompiling Netsnmp-5.6.rc1 for arm-unknown-linux under Cgywin To: "Bart Van Assche

Re: Crosscompiling Netsnmp-5.6.rc1 for arm-unknown-linux under Cgywin

2010-09-27 Thread Leo Lin
Cgywin To: "Leo Lin" Cc: "Net-snmp-users" Date: Friday, September 24, 2010, 3:43 AM On Thu, Sep 23, 2010 at 8:00 PM, Leo Lin wrote: Someone know which libraries needs pthread? Hello Leo, You can get rid of the libpthread dependency as follows: * Apply the patc

Apply Patch

2010-09-27 Thread Leo Lin
Hi,   Someone knows how to apply a patch?  I googled it, and found that it must use the script `patch` like so,   patch -p0 < /path/to/patch.file>   the problem is that I cannot find the `patch` script,   Leo;   -

Re: Crosscompiling Netsnmp-5.6.rc1 for arm-unknown-linux under Cgywin

2010-09-24 Thread Leo Lin
generated.  Is this normal?   Thanks so much for your help,   Leo; --- On Fri, 9/24/10, Bart Van Assche wrote: From: Bart Van Assche Subject: Re: Crosscompiling Netsnmp-5.6.rc1 for arm-unknown-linux under Cgywin To: "Leo Lin" Cc: "Net-snmp-users" Date: Friday, September 24, 2

Re: Crosscompiling Netsnmp-5.6.rc1 for arm-unknown-linux under Cgywin

2010-09-23 Thread Leo Lin
Someone know which libraries needs pthread?   Thanks! --- On Wed, 9/22/10, Leo Lin wrote: From: Leo Lin Subject: Re: Crosscompiling Netsnmp-5.6.rc1 for arm-unknown-linux under Cgywin To: "Net-snmp-users" Date: Wednesday, September 22, 2010, 5:18 PM Hi,   Following up with m

Re: Crosscompiling Netsnmp-5.6.rc1 for arm-unknown-linux under Cgywin

2010-09-22 Thread Leo Lin
braries: libpthread.so.0: cannot open share object file: No such file or directory`.  Notice that I tried to compile the agent statically, but still asking for share libraries.   Should I modify the agent Makefile?   Thanks!   Leo; --- On Tue, 9/21/10, Leo Lin wrote: From: Leo Lin Subject:

Re: ./configure conftest.c permission denied

2010-09-21 Thread Leo Lin
--- On Tue, 9/21/10, Bart Van Assche wrote: From: Bart Van Assche Subject: Re: ./configure conftest.c permission denied To: "Leo Lin" Cc: "Abraham Varricatt" , "Net-snmp-users" Date: Tuesday, September 21, 2010, 3:08 AM On Tue, Sep 21, 2010 at 10:06 AM, Leo

Crosscompiling Netsnmp-5.6.rc1 for arm-unknown-linux under Cgywin

2010-09-21 Thread Leo Lin
Hi,   I've installed Netsnmp-5.6.rc1 on my PC runing Cgywin.  I was also be able to extend the agent with my own mib (LLC-MIB.txt), with source file `llc_snmpagent.c` and `llc_snmpagent.h`.   Everthing works fine on my PC, snmpget, snmpset, and trap generation.  Now, I am trying to cross-comp

Re: ./configure conftest.c permission denied

2010-09-21 Thread Leo Lin
disable it?   Thanks!   Leo;         --- On Mon, 9/20/10, Abraham Varricatt wrote: From: Abraham Varricatt Subject: Re: ./configure conftest.c permission denied To: "Leo Lin" Cc: "Net-snmp-users" Date: Monday, September 20, 2010, 10:06 PM On Tue, Sep 21, 2010 at 6:44 AM

Re: ./configure conftest.c permission denied

2010-09-20 Thread Leo Lin
but it still giving me errors.  Everytime, the error is different.   Should I run `make uninstall'   then ./configure again?   Thanks!   Leo; --- On Mon, 9/20/10, Leo Lin wrote: From: Leo Lin Subject: ./configure conftest.c permission denied To: "Net-snmp-users" Date: Monday, Se

./configure conftest.c permission denied

2010-09-20 Thread Leo Lin
Hi,   While installing net-snmp-5.6.rc1, there's an error during ./configure   seems that configure script is not able to find the source file conftest.c   Anyone know what is the purpose of this sourcefile? test configuration?  Where can I download it, and where (directory) I need to place it so

Re: Cross-compiling Net-SNMP

2010-09-20 Thread Leo Lin
Assche Subject: Re: Cross-compiling Net-SNMP To: "Leo Lin" Cc: "Net-snmp-users" Date: Saturday, September 4, 2010, 6:50 AM On Thu, Sep 2, 2010 at 4:32 PM, Leo Lin wrote: I have Net-SNMP installed in my PC / Cygwin.  I would like to implement the agent portion

Re: about snmp_alarm_register

2010-09-20 Thread Leo Lin
It worked great!!  Thanks!! --- On Sun, 9/12/10, Bart Van Assche wrote: From: Bart Van Assche Subject: Re: about snmp_alarm_register To: "Leo Lin" Cc: "Net-snmp-users" Date: Sunday, September 12, 2010, 11:05 PM On Mon, Sep 13, 2010 at 3:10 AM, Leo Lin wrote:

Re: about snmp_alarm_register

2010-09-19 Thread Leo Lin
Thanks!  Do you know where can I find the source code where it implements the snmp_alarm_register()?? --- On Sun, 9/12/10, Bart Van Assche wrote: From: Bart Van Assche Subject: Re: about snmp_alarm_register To: "Leo Lin" Cc: "Net-snmp-users" Date: Sunday, September 12,

Re: about snmp_alarm_register

2010-09-13 Thread Leo Lin
Thanks!  Is there any other way for the agent to invoke a callback function every period of time?   Leo; --- On Sun, 9/12/10, Bart Van Assche wrote: From: Bart Van Assche Subject: Re: about snmp_alarm_register To: "Leo Lin" Cc: "Net-snmp-users" Date: Sunday, Septembe

about snmp_alarm_register

2010-09-12 Thread Leo Lin
Hi,   I use the snmp_alarm_register() along with the notification.c example to generate a trap every 30 sec.   I also created a function that generates the same trap everytime an OID value is changed by snmpset.   When testing it, the traps are seen by my manager (snmptrapd), however, it seems

Re: trapsink2 - example\notification.c

2010-09-12 Thread Leo Lin
ndler is called every single time without errors.   Is there any configuration that I'm missing?   Thanks!   Leo;   /usr/local/sbin/snmptrapd -f -Lo   --- On Fri, 9/10/10, Dave Shield wrote: From: Dave Shield Subject: Re: trapsink2 - example\notification.c To: "Leo Lin" Cc: &q

Re: trapsink2 - example\notification.c

2010-09-10 Thread Leo Lin
e I didn't provide the handlers for heartbeatRate, and heartbeatName oids.  I'm writting the handlers, and will re-compile to check.   Leo; --- On Fri, 9/10/10, Dave Shield wrote: From: Dave Shield Subject: Re: trapsink2 - example\notification.c To: "Leo Lin" Cc:

Re: trapsink2 - example\notification.c

2010-09-09 Thread Leo Lin
trap sent.  I also check that snmpd and snmptrapd are still runing.   Am I missing something here?   Thanks!!   Leo; --- On Thu, 9/9/10, Dave Shield wrote: From: Dave Shield Subject: Re: trapsink2 - example\notification.c To: "Leo Lin" Cc: "Net-snmp-users" Date: Thursday, Se

trapsink2 - example\notification.c

2010-09-08 Thread Leo Lin
Hi All,   I was able to compile the notification.c example.  I ran the snmpd and snmptrapd on my local machine and I don't get any traps.   the trapsink2 on my snmpd.conf file is:   trapsink2 192.168.255.140 secret 161   the authCommunity on my snmptrapd.conf file is:   authCommunity log, execute,

Cross-compiling Net-SNMP

2010-09-02 Thread Leo Lin
Hi All, I have Net-SNMP installed in my PC / Cygwin.  I would like to implement the agent portion and deployed to an ARM9 CPU.    I figured, in order to cross-compile it, I simply need to change the --CC options on the ./configure() script when building the agent.   My question is: when the age

Re: Unable to Extend snmpd: There is not such variable name in this MIB

2010-09-01 Thread Leo Lin
Hi All,   I found what was the problem.  Do not use "public" as community name for read-write access.  Use "private" instead.   Thanks everybody to your support!   Leo; --- On Wed, 9/1/10, Leo Lin wrote: From: Leo Lin Subject: Re: Unable to Extend snmpd: There is not s

Re: Unable to Extend snmpd: There is not such variable name in this MIB

2010-09-01 Thread Leo Lin
if I don't give the parameters --with-mib-modules, the script runs fine.   Is this normal?   Thanks!   Leo; --- On Tue, 8/31/10, Mishustin Kirill wrote: From: Mishustin Kirill Subject: Re: Unable to Extend snmpd: There is not such variable name in this MIB To: "Net-snmp-users" Cc:

Re: Unable to Extend snmpd: There is not such variable name in this MIB

2010-09-01 Thread Leo Lin
revision 5.xxx and above, could that be the problem?   Thanks!   Leo; --- On Tue, 8/31/10, Mishustin Kirill wrote: From: Mishustin Kirill Subject: Re: Unable to Extend snmpd: There is not such variable name in this MIB To: "Net-snmp-users" Cc: "Leo Lin" Date: Tuesday, Aug

Unable to Extend snmpd: There is not such variable name in this MIB

2010-08-31 Thread Leo Lin
Hi All,   I created a small MIB file with 2 scalar variables, var1, and var2.  I was able to add this MIB file into the snmp.conf file.  and when run snmptranslate -Tp -IR var1 or snmptranslate -Tp IR var2 it was able to interpreted the OID.   I configured the snmpd.conf community name to 'public

snmpdemoapp Makefile

2010-08-25 Thread Leo Lin
Hi,   I was studying the snmpdemoapp.c from net-snmp wiki tutorial.    I was not able to compile the project because the make() program gave me some errors;   basically, it cannot find references in two source codes;   scapi.c keytools.c   I used the following command in make()   snmpdemoapp: $(

Re: Net-SNMP installation under XP Cygwin

2010-08-24 Thread Leo Lin
Thanks Bart,   I will give it a try.   Leo; --- On Tue, 8/24/10, Bart Van Assche wrote: From: Bart Van Assche Subject: Re: Net-SNMP installation under XP Cygwin To: "Leo Lin" Cc: net-snmp-users@lists.sourceforge.net Date: Tuesday, August 24, 2010, 3:14 AM On Tue, Aug 24, 2010 a

Net-SNMP installation under XP Cygwin

2010-08-24 Thread Leo Lin
Hi,   I downloaded the net-snmp-5.6.rc1 version and try to install it on my PC under Cygwin.   after decompressing it, I used ./configure   it went through a check-list and an extensive setup.   Then, I tried to issue the command $ make, and the system cannot recognized the command.  I believe, C