Re: netsnmp_register_service_handlers ?

2007-01-07 Thread Thomas Anders
Magnus Fromreide wrote: > I wasn't aware that we should write the implementations in the common > subset of C and C++ but if that is the case then I could do so. > > All of the reports below are the result of code like > > aType* foo = malloc(sizeof(aType)); > > and that is perfectly valid C, bu

Re: netsnmp_register_service_handlers ?

2007-01-07 Thread Magnus Fromreide
On sön, 2007-01-07 at 20:55 +0100, Thomas Anders wrote: > Thomas Anders wrote: > > Thanks for the quick response. Committed. > > However, g++ (4.1.0) still doesn't seem to like snmp_service.c too much: g++? I wasn't aware that we should write the implementations in the common subset of C and C++

Re: a problem of how to debug codes

2007-01-07 Thread Dave Shield
On 26/12/06, Clement Hsu <[EMAIL PROTECTED]> wrote: > I meet a problem of how to debug snmp codes > the following is my code... > void > init_ustScalarSet(void) > { > > DEBUGMSGTL(("ustScalarSet", "Initializing\n")); > > REGISTER_MIB("ustScalarSet", ustScalarSet_variables, variable4, >

Re: HOST-RESOURCES-MIB::hrSWRunParameters - truncation - Solaris 9 - NetSNMP 5.4

2007-01-07 Thread Dave Shield
On 07/01/07, Thomas Anders <[EMAIL PROTECTED]> wrote: > Dave Shield wrote: > > If you try > > cat /proc/05026/psinfo > > > > how much does this report? Everything, or is this truncated too? > > None of that, just binary data, I fear. :-) > Unlike Linux /proc, Solaris /proc is designed for C, n

Re: HOST-RESOURCES-MIB::hrSWRunParameters - truncation - Solaris 9 - NetSNMP 5.4

2007-01-07 Thread Thomas Anders
Dave Shield wrote: > If you try > cat /proc/05026/psinfo > > how much does this report? Everything, or is this truncated too? None of that, just binary data, I fear. :-) Unlike Linux /proc, Solaris /proc is designed for C, not cat. +Thomas -- Thomas Anders (thomas.anders at blue-cable.de

Re: Can I ship net-snmp libraries in my product?

2007-01-07 Thread Dave Shield
On 27/12/06, Alexi Zuo <[EMAIL PROTECTED]> wrote: > Since the our target platform may use a different version of net-snmp, I > wonder if it is legal to chip net-snmp libraries with our product. >From the FAQ: --- Can I reuse the code in my commercial application? The details of the COPYRIGH

Re: SNMP Subagent crash

2007-01-07 Thread Dave Shield
On 05/01/07, Venkata Guddeti <[EMAIL PROTECTED]> wrote: > 1. Could any one please let me know how can I create two subagent processes. > a. What configuration changes are needed in the snmpd.conf to add two > subagents None. > (right now I have a line 'master agentx' for one subagent) No. Yo

Re: SNMP Subagent crash

2007-01-07 Thread Dave Shield
On 04/01/07, Venkata Guddeti <[EMAIL PROTECTED]> wrote: > 1. Can I create two subagent processes on the same machine. One for > processing get/set and the other for sending the traps. That is likely to be the safest approach. As explained in README.thread, the agent code is not thread-safe, s

Re: Problems with snmp getbulk

2007-01-07 Thread Dave Shield
On 07/01/07, Lilach Givaty <[EMAIL PROTECTED]> wrote: > I found one bug with get bulk - in table_array_ext_data.c Errr where exactly is this file? I've checked the source tree, and can't immediately spot it. This code doesn't seem to apply to 'agent/helpers/table_data.c' Dave ---

Re: HOST-RESOURCES-MIB::hrSWRunParameters - truncation - Solaris 9 - NetSNMP 5.4

2007-01-07 Thread Dave Shield
On 04/01/07, John Clinton <[EMAIL PROTECTED]> wrote: > I noticed on Solaris 9 with NetSNMP 5.4 that: > HOST-RESOURCES-MIB::hrSWRunParameters is getting truncated and is > equivalent to the ps -ef output. > So, my question is, is this way the implementation on Sun was designed > to work? The first

Re: Problems with snmp getbulk

2007-01-07 Thread Thomas Anders
Lilach Givaty wrote: > My name is Lilach, I work in GO Networks as an embedded programmer. > I found one bug with get bulk - in table_array_ext_data.c, when getting > a new parameter in get bulk the counter doesn't reset. > This is a patch for resetting the counter in find_next_row. Please post to

Re: netsnmp_register_service_handlers ?

2007-01-07 Thread Thomas Anders
Thomas Anders wrote: > Thanks for the quick response. Committed. However, g++ (4.1.0) still doesn't seem to like snmp_service.c too much: snmp_service.c: In function 'int netsnmp_register_default_domain(const char*, const char*)': snmp_service.c:35: error: invalid conversion from 'void*' to 'nets

Re: netsnmp_register_service_handlers ?

2007-01-07 Thread Thomas Anders
Magnus Fromreide wrote: > Index: include/net-snmp/library/snmp_service.h [...] > +extern void > +netsnmp_register_service_handlers(void); Thanks for the quick response. Committed. +Thomas -- Thomas Anders (thomas.anders at blue-cable.de) ---

Re: Some primary questions on implementing trap

2007-01-07 Thread Dave Shield
On 07/01/07, Zhang Chuan <[EMAIL PROTECTED]> wrote: >In > "http://net-snmp.sourceforge.net/docs/FAQ.html# > How_can_I_get_the_agent_to_generate_a_trap__or_inform__", > I can find there are two ways to determine *when* to generate the trap: > i):use DisMan Event MIB >Since there are no MIB

Re: about snmp statistics

2007-01-07 Thread Dave Shield
On 04/01/07, Li Gan <[EMAIL PROTECTED]> wrote: > How can I get snmp packet statistics information? Such as "number of bad > community name received", "number of traps send out", "number of snmp packet > received" , "number of snmp packet send out" and so on. Are there api in > source code I can

Re: SNMP Subagent crash

2007-01-07 Thread Venkata Guddeti
Dear All I am really sorry to dump so many emails to you guys. I was reading the faqs on multi-threading, it says that there can be multiple agentx agents. 1. Could any one please let me know how can I create two subagent processes. a. What configuration changes are needed in the snmpd.conf (rig

Re: SNMP Subagent crash

2007-01-07 Thread Venkata Guddeti
Dear All I have not really understood how to do thread safe programming in this case. I have read the README.thread, but it is not very clear what do I need to do in which thread. I have main thread sending traps based on messages received from the other application and the other thread handles S

Re: SNMP Subagent crash

2007-01-07 Thread Venkata Guddeti
Dear All I have been all day today trying to avoid crash in the my snmp sub agent while sending a trap. As I have explained in my earlier mail, when there are tonnes of traps ( I do agree that this should not be the case, but this can happen based on some wroing input data in another process whi

Re: SNMP Subagent crash

2007-01-07 Thread Venkata Guddeti
Dear Robert, Dave, Thomas and Other Coders, I really appreciate the help you all have provided so far. My repsonse to Mr. Robert Story's email is as follows: 1. I have not tried the subagent running on the 32 bit system. 2. I have read the README.thread and implemented as per the example given the

How to restore my subagent

2007-01-07 Thread AS/EAB
Hi I have a subagent process that holds scalars, tables etc. I'm wondering on how to restore the data in the subagent after a restart of the subagent process. As far as I understand, only a master SNMP agent restart leads to an automatic coldstart trap being sent, but a subagent restart does _

Problems with snmp getbulk

2007-01-07 Thread Lilach Givaty
Hi, My name is Lilach, I work in GO Networks as an embedded programmer. I found one bug with get bulk - in table_array_ext_data.c, when getting a new parameter in get bulk the counter doesn't reset. This is a patch for resetting the counter in find_next_row. @@ -32,6 +32,15 @@ * snmp.h:#define

Re: netsnmp_register_service_handlers ?

2007-01-07 Thread Magnus Fromreide
On sön, 2007-01-07 at 14:11 +0100, Thomas Anders wrote: > Net-SNMP 5.4 and later happen to contain > > PATCH: 1282566: from magfr to rework transport creation to allow for > alternative > interpretations of the address and a more flexible transport registration > system > > which introduced a c

netsnmp_register_service_handlers ?

2007-01-07 Thread Thomas Anders
Net-SNMP 5.4 and later happen to contain PATCH: 1282566: from magfr to rework transport creation to allow for alternative interpretations of the address and a more flexible transport registration system which introduced a call to netsnmp_register_service_handlers() in snmplib/anmp_api.c. Unfortun