Hi all,

I'm working with Ata (see below) trying to build net-snmp on HP-UX.

HP are kind enough to provide a binary package of net-snmp in their
"internet express" suite, and
it used to be working quite well at v5.6.1.1. It logs the traps into a file
in the format we specify (see Ata's email). Recently, we had to upgrade to
5.7.2 to avoid an issue (which I posted about on the net-snmp-users list
earlier). Unfortunately, HP's build of 5.7.2 has the problem that Ata
describes below, where it logs the localhost address for sender, and
0.0.0.0 for receiver.

Now, I figured I would try to work around the logging format issue, by
building the older (working) net-snmp 5.6.1.1 on my own, and see if I can
patch our earlier problem some other way.
Imagine my surprise when my build of 5.6.1.1 exhibits the same problem as
Ata had with 5.7.2, where it logs 0.0.0.0 for both sender and receiver
address!

Ata was kind enough to provide some tracing from a received trap, where it
looks like the call to netsnmp_udpbase_recv() is returning the wrong
addresses.

trace: netsnmp_udpbase_recv(): transports/snmpUDPBaseDomain.c, 296:
netsnmp_udp: recvfrom fd 6 got 117 bytes (from UDP:
[0.0.0.0]:0->[0.0.0.0]:0)
transport:recv: 117 bytes from UDP: [0.0.0.0]:0->[0.0.0.0]:0
trace: _sess_process_packet(): snmp_api.c, 5171:

So, it must be an issue either with our build machine or deployment machine
(system libraries?), or HP have been clever enough to patch something
important in 5.6.1.1 (but not clever enough to do so in 5.7.2).

Please, if anyone is able to help, it would be much appreciated.

BR,
Joel Hansell


From: Ata Malik <ata.malik@gm...>
Attachments: Message as HTML

Hello,

I hope I am reaching the correct audience here. I am trying to build
net-snmp 5.7.2.1 (I am also tried to build 5.6).
I have downloaded and installed GNU C from HP site.

Problem:
After compiling, installing and running snmptrapd with %b in config file,
when I send the traps to that machine, I get [0.0.0.0]:0->[0.0.0.0]:0 as
source and destination ip:port for the trap.
When I install the depot file, it runs sort of fine. I am actually trying
to fix the problem where in version 5.7.2 the local IP address is printed
instead of the trap's source IP address and the destination IP (which may
be localhost) is 0.0.0.0.

My compilation or configuration options seems to have messed something up?

My .config file contains:
format2 %y-%02.2m-%02.2l %02.2h:%02.2j:%02.2k %b PDU:[%P]%V|#|%
VARS:\t%vEOR\n

The output for %b is as I told you is [0.0.0.0]:0->[0.0.0.0]:0 with my
compilation but when I install it using the .depot file it gives me
[localip]:port->[0.0.0.0]:0

I am running the configuration as following

# export CC=/opt/hp-gcc/bin/gcc
# export CXX=/opt/hp-gcc/bin/g++
# export CFLAGS="-w -mlp64 -D_MACHINE_SYS_GETPPDP_INCLUDED"
# export CXXFLAGS="-w -mlp64 D_HPUX_SOURCE"
# export LDFLAGS="-L/opt/hp-gcc/lib/hpux64/ -Wl,-ashared_archive"
# ./configure --enable-debugging (or without it)

The configuration works fine on the screen. When I check the log there are
many fatal errors. Most of them are failure to find.h files like
netinet/tcp_timer.h and sys/sockio.h etc. I can provide you with complete
list if you like.

After configure I can make (thats an issue in itself when I have to change
$(FEATUREFILE): $(FTOBJS) $(top_builddir)/include/net-snmp/feature-details.h
into
FEATUREFILE: $(FTOBJS) $(top_builddir)/include/net-snmp/feature-details.h
into 3-4 Makefile to fix the error and make it)
I can then install and receive traps).

My solution requires me to read these IP addresses correctly.
Thanks.
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to