Hi,
I need some advice for compiling and using net-snmp 5.2.1.2 on
HP-UX 11.0/11i in 64 Bit mode. (I need to link libnetsnmp with
my 64 Bit applications. We currently have development environments
for HP-UX 11.0 and 11i)
Because I found no 64 Bit binaries for net-snmp I tried to
compile net-snmp using aCC (version A.03.55 on HP-UX 11.0 and
version A.03.65 on HP-UX 11i).
I used the following configure options:
---------------------------------------------------------------------------------------------------
./configure --prefix=/home/gebauer/snmp/install64 --with-cc=aCC --with-ar=ar\
--with-cflags="-D_THREAD_SAFE -D_REENTRANT -DSS_64BIT_SERVER -DRW_MULTI_THREAD
+DA2.0w +DChpux -D_LARGEFILE64_SOURCE"\
--with-ldflags="+DA2.0w" --with-sys-location=Unknown --disable-developer
--with-libs=-lnm\
--with-sys-contact="System Administrator" --with-defaults
--with-mib-modules="host disman/event-mib smux"
---------------------------------------------------------------------------------------------------
Both configure and make report some warnings, but all seems to build well.
But when I try to run my applications or use the command line utilities of
net-snmp I run into some trouble.
I have to update the ipRouteTable in an bintec X8500 router. snmpwalk/snmpget
works
on this table, but it's impossible to add a new entry with snmpset:
---------------------------------------------------------------------------------------------------
[EMAIL PROTECTED]/home/gebauer/snmp/install64/bin]>./snmpset -v 1 -c bintec
172.16.0.2 .1.3.6.1.2.1.4.21.1.1 a 172.16.0.0 \
.1.3.6.1.2.1.4.21.1.2 i 100 .1.3.6.1.2.1.4.21.1.7 a 172.16.1.1
.1.3.6.1.2.1.4.21.1.8 i 3 .1.3.6.1.2.1.4.21.1.11 a 255.255.0.0
Error in packet.
Reason: (badValue) The value given has the wrong type or length.
Failed object: RFC1213-MIB::ipRouteDest
---------------------------------------------------------------------------------------------------
The badValue error is reported by the router, as it is also logged in the router
console.
If I remove the "+DA2.0w" flag from the configure options and build a 32-Bit
version of the libraries and utilities, the same snmpset commando works fine.
In order to analyse the problem I dumped the snmp-PDUs sent by snmpset via
the "-d" option and analysed them with ethereal.
Analysis of the package sent by the 32-Bit version:
---------------------------------------------------------------------------------------------------
Simple Network Management Protocol
Version: 1 (0)
Community: bintec
PDU type: SET (3)
Request Id: 0x12d2a9ea
Error Status: NO ERROR (0)
Error Index: 0
Object identifier 1: 1.3.6.1.2.1.4.21.1.1 (iso.3.6.1.2.1.4.21.1.1)
Value: IpAddress: 172.16.0.0
Object identifier 2: 1.3.6.1.2.1.4.21.1.2 (iso.3.6.1.2.1.4.21.1.2)
Value: INTEGER: 100
Object identifier 3: 1.3.6.1.2.1.4.21.1.7 (iso.3.6.1.2.1.4.21.1.7)
Value: IpAddress: 172.16.1.1
Object identifier 4: 1.3.6.1.2.1.4.21.1.8 (iso.3.6.1.2.1.4.21.1.8)
Value: INTEGER: 3
Object identifier 5: 1.3.6.1.2.1.4.21.1.11 (iso.3.6.1.2.1.4.21.1.11)
Value: IpAddress: 255.255.0.0
0000 02 02 02 02 02 02 01 01 01 01 01 01 08 00 45 00 ..............E.
0010 00 9e 12 34 00 00 ff 06 a3 20 01 01 01 01 02 02 ...4..... ......
0020 02 02 00 64 00 c8 00 00 00 00 00 00 00 00 50 00 ...d..........P.
0030 20 00 d4 c2 00 00 30 74 02 01 00 04 06 62 69 6e .....0t.....bin
0040 74 65 63 a3 67 02 04 12 d2 a9 ea 02 01 00 02 01 tec.g...........
0050 00 30 59 30 11 06 09 2b 06 01 02 01 04 15 01 01 .0Y0...+........
0060 40 04 ac 10 00 00 30 0e 06 09 2b 06 01 02 01 04 @.....0...+.....
0070 15 01 02 02 01 64 30 11 06 09 2b 06 01 02 01 04 .....d0...+.....
0080 15 01 07 40 04 ac 10 01 01 30 0e 06 09 2b 06 01 [EMAIL PROTECTED]
0090 02 01 04 15 01 08 02 01 03 30 11 06 09 2b 06 01 .........0...+..
00a0 02 01 04 15 01 0b 40 04 ff ff 00 00 [EMAIL PROTECTED]
---------------------------------------------------------------------------------------------------
Analysis of the package sent by the 64-Bit version:
---------------------------------------------------------------------------------------------------
Simple Network Management Protocol
Version: 1 (0)
Community: bintec
PDU type: SET (3)
Request Id: 0x416d81db
Error Status: NO ERROR (0)
Error Index: 0
Object identifier 1: 1.3.6.1.2.1.4.21.1.1 (iso.3.6.1.2.1.4.21.1.1)
Value: Length is 8, should be 4
Object identifier 2: 1.3.6.1.2.1.4.21.1.2 (iso.3.6.1.2.1.4.21.1.2)
Value: INTEGER: 100
Object identifier 3: 1.3.6.1.2.1.4.21.1.7 (iso.3.6.1.2.1.4.21.1.7)
Value: Length is 8, should be 4
Object identifier 4: 1.3.6.1.2.1.4.21.1.8 (iso.3.6.1.2.1.4.21.1.8)
Value: INTEGER: 3
Object identifier 5: 1.3.6.1.2.1.4.21.1.11 (iso.3.6.1.2.1.4.21.1.11)
Value: Length is 8, should be 4
0000 02 02 02 02 02 02 01 01 01 01 01 01 08 00 45 00 ..............E.
0010 00 ab 12 34 00 00 ff 06 a3 13 01 01 01 01 02 02 ...4............
0020 02 02 00 64 00 c8 00 00 00 00 00 00 00 00 50 00 ...d..........P.
0030 20 00 be 7b 00 00 30 81 80 02 01 00 04 06 62 69 ..{..0.......bi
0040 6e 74 65 63 a3 73 02 04 41 6d 81 db 02 01 00 02 ntec.s..Am......
0050 01 00 30 65 30 15 06 09 2b 06 01 02 01 04 15 01 ..0e0...+.......
0060 01 40 08 00 00 00 00 ac 10 00 00 30 0e 06 09 2b [EMAIL PROTECTED]
0070 06 01 02 01 04 15 01 02 02 01 64 30 15 06 09 2b ..........d0...+
0080 06 01 02 01 04 15 01 07 40 08 00 00 00 00 ac 10 [EMAIL PROTECTED]
0090 01 01 30 0e 06 09 2b 06 01 02 01 04 15 01 08 02 ..0...+.........
00a0 01 03 30 15 06 09 2b 06 01 02 01 04 15 01 0b 40 ..0...+........@
00b0 08 00 00 00 00 ff ff 00 00 .........
---------------------------------------------------------------------------------------------------
Judging from the ethereal output I think that the 64-Bit build doesn't encode
the ip-address values correctly (it sends a 64-Bit value, the router and
ethereal
expects 32-Bit).
What can I do about this problem? Do I use the correct configure options?
Are there precompiled packages for HP-UX/64Bit available?
Thanks,
Christian
--
Christian Gebauer mailto:[EMAIL PROTECTED]
sd&m AG http://www.sdm.de
software design & management
Carl-Wery-Straße 42, D-81739 Muenchen, Germany
Tel +49 89 63812-763 Fax -444
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users