Re: rfc: library layering

2007-01-08 Thread Thomas Anders
Dave Shield wrote: > There's nothing inherently agent-like in creating a temporary file. > This could potentially be useful for an application too. > > +1 for moving it to the core library. How about the attached patch? I must admit that I'm not fully convinced the temporary file handling in mib

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

2007-01-08 Thread Anders Persson
Dave Shield wrote: > > #if _SLASH_PROC_METHOD_ > #include > #endif > > add the line > > #undef _SLASH_PROC_METHOD_ > > > Then recompile the agent, re-run it and try retrieving the hrSWRunParameters > value again. > > What does that display? Anything different? > > Unfortunately I do not think

Re: netsnmp_register_service_handlers ?

2007-01-08 Thread Thomas Anders
Magnus Fromreide wrote: > The attached patch makes it possible to build snmplib/ with a c++ > compiler as well as a c89 compiler. Much appreciated. I'll check it in, unless specific objections are raised. +Thomas -- Thomas Anders (thomas.anders at blue-cable.de) --

Re: netsnmp_register_service_handlers ?

2007-01-08 Thread Magnus Fromreide
On mån, 2007-01-08 at 08:15 +0100, Thomas Anders wrote: > 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 > > > > aTyp

Legacy code. Can send V1 traps. V2 traps result in "Invalid notification format"

2007-01-08 Thread Kapil Sharma
Hello, I have some legacy code that I worked on a bit, and I am able to get it to send SNMPv1 traps. I want it to send SNMPv2c traps, and that's not happening (The SNMP trap receiver gets the varbinds, community string, timestamps and everything allright, but says "Invalid Notification Format")

Re: rfc: library layering

2007-01-08 Thread Thomas Anders
Dave Shield wrote: > The distinction between libagent and libhelpers doesn't feel as useful > as that between these two and libmibs Merging them is significant work, too. So if it's *possible* to separate them cleanly, why not do it? Who knows what use cases might be out there. +Thomas -- Thom

Re: rfc: library layering

2007-01-08 Thread Dave Shield
On 08/01/07, Robert Story <[EMAIL PROTECTED]> wrote: > > agent -> mibs > > - make_tempfile mibgroup/util_funcs.c > > mibgroup/utilities/execute.c:run_shell_command() > > -Move to agent lib? Duplicate? > > I agree that moving it to the agent library should work. I'd even be ok with > moving it to

Re: rfc: library layering

2007-01-08 Thread Robert Story
On Mon, 08 Jan 2007 10:40:51 +0100 Thomas wrote: TA> Starting with the 5.4 release cycle there have been some (more) spurious TA> discussions about library layering and dependencies. I've been trying to TA> summarize the issue(s) here: TA> TA> http://www.net-snmp.org/wiki/index.php/Library_layer

Re: How to restore my subagent

2007-01-08 Thread Robert Story
On Wed, 3 Jan 2007 17:31:26 +0100 Stefan wrote: SN(> Is it good practice to send an explicit coldstart trap from the subagent when it comes up after the restart? Or is there a better way? No, because the trap would come from the master agent, causing confusion with the trap receiver(s). If you nee

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

2007-01-08 Thread Thomas Anders
Dave Shield wrote: > Hmmm That ought to be picked up from agent/kernel.c, I think. > > I'm slightly out of my depth here - can one of the Solaris experts help? > > All I can suggest is to check the file 'include/net-snmp/net-snmp-config.h', > look for mention of SLASH_PROC (if any) and make

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

2007-01-08 Thread Dave Shield
On 08/01/07, John Clinton <[EMAIL PROTECTED]> wrote: > Hi Dave, > > Just tried that and got errors on compiling: > gcc -g -O2 -Usolaris2 -Dsolaris2=solaris2 -o .libs/snmpd .libs/snmpd.o > -L/usr/local/ssl/lib ./.libs/libnetsnmpmibs.so ./.libs/libnetsnmpagent.so > helpers/.libs/libnetsnmphelpers.s

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

2007-01-08 Thread John Clinton
Hi Dave, Just tried that and got errors on compiling: /bin/sh ../libtool --mode=compile gcc -I../include -I. -I../agent -I../agent/mibgroup -I../snmplib -I/usr/local/ssl/include -g -O2 -Usolaris2 -Dsolaris2=solaris2 -c -o snmpd.lo snmpd.c gcc -I../include -I. -I../agent -I../agent/mibgroup -I

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

2007-01-08 Thread Dave Shield
On 08/01/07, John Clinton <[EMAIL PROTECTED]> wrote: > od and strings output below. strings is truncated like native ps > command. Not sure about od command. Looks the same: > [EMAIL PROTECTED]:/root# od -c /proc/5026/psinfo [snip] > 140 \0 \0 \0 \0 \0 \0 \0 \0 / u s r

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

2007-01-08 Thread John Clinton
Thomas/Davie, od and strings output below. strings is truncated like native ps command. Not sure about od command. [EMAIL PROTECTED]:/root# od -c /proc/5026/psinfo 000 \b \0 @ \b \0 \0 \0 ' \0 \0 023 � \0 \0 023 ~ 020 \0 \0 022 � \0 \0 002 \f \0 \0 \0 \0 \0

rfc: library layering

2007-01-08 Thread Thomas Anders
Starting with the 5.4 release cycle there have been some (more) spurious discussions about library layering and dependencies. I've been trying to summarize the issue(s) here: http://www.net-snmp.org/wiki/index.php/Library_layering I'm hereby calling for comments, especially on how to deal with

Re: a problem of how to debug codes

2007-01-08 Thread Dave Shield
On 08/01/07, Clement Hsu <[EMAIL PROTECTED]> wrote: > But I don't realize how to use DEBUGMSG( ) correct. Please see the existing code for examples. E.g. $ cd agent $ grep DEBUGMSG *.c snmp_perl.c:DEBUGMSGTL(("perl", "calling perl\n")); snmpd.c:DEBUGMSGTL(("snmpd/main", "Bye...\n

Re: a problem of how to debug codes

2007-01-08 Thread Clement Hsu
Dear Dave: Thanks a lot. But I don't realize how to use DEBUGMSG( ) correct. For example: #include #include #include #include #include "ucdSnmpTutorialMIB.h" #include #include void init_ucdSnmpTutorialMIB(void) { static oid ustSSSimpleString_oid[] = { 1, 3, 6, 1, 4, 1, 2021,