Hi you kind soul out there,
I am working on a port of net-snmp 5.1.1 to Lynxos 4.0.0 on a x86 platform
(yes I realize 5.1.2 just came out but I've spent enough time on 5.1.1). Now
I'm testing out one of the executable snmptrapd and I've found the following
strange behavior:
the command "snmptrapd -d -p /tmp/snmptrapd.pid -Lf /tmp/snmptrapd.log -C -c
/tmp/snmptrapd.conf" simply quits without creating a daemon process!
with just the following line in /tmp/snmptrapd.conf
CONFIGTRAPD createUser testuser MD5 TESTPASSPHRASE
with some debugging I found that inside snmptrapd.c:main() there is a block
of code that checks:
if (optind < argc)
{
...
// make the pointer variable listen_ports point to somehting
}
in my debug session the condition satifies so list_ports becomes non-null
and later on in the same file
if (listen_ports)
cp = listen_ports;
else
cp = default_port;
then cp points to "/tmp/snmptrapd.log:162" instead of the correct "udp:162"
!! obviously cp points to some erroneous logging place and later on the code
exits.
Of course with the exact same invokation method on a Linux executable the
same problem never occurs.
This sounds like there's something wrong with the way the arguments are
counted on Lynxos so if some kind soul can give me some pointer/insight as
to where to get me unstuck, I'd really appreciate and I'd share my
experience too.
Thanks, Gilbert.
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
_______________________________________________
Net-snmp-coders mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders