[SNMP4J] SNMP4J on SDK 1.3.x

Frank Fock fock at agentpp.com
Mon Jul 11 22:02:47 CEST 2005


Hi Sharma,

Why do you think that this problem affects using SNMP4J with JDK 1.3?

Thanks,
Frank

Sharma Saurabh wrote:

>Hi ,
>
>Thanks for the prompt reply. Going with your suggestion I am working on the
>reimplementing of the some of the classes for 1.3.
>
>One of the 1.4 classes "InetAddress.java" has binary incompatible with 1.3.
>The details of the problem are available on bugs.sun.com.
>The text description says:-
>A DESCRIPTION OF THE PROBLEM:
>The implementations of InetAddress in Java 1.3 and Java 1.4
>are binary incompatible. You can't pass a serialized
>InetAddress from a Java 1.4 implementation to a Java 1.3
>implementation, because the semantics of InetAddress.family
>have changed. In Java 1.3, the only acceptable
>InetAddress.family is 2, which is correct. That's AF_INET.
>Looking at a disassembly of the native method for
>InetAddressImpl.getFamily(), it always just returns 2.
>
>In Java 1.4, the implementation has changed. For the IPv4
>implementation, the constructor of Inet4Address() sets
>family to 1:
>
>    Inet4Address()
>    {
>        hostName = null;
>        address = 0;
>        family = 1;
>    }
>
>and InetAddress incorrectly defines the constants IPv4 and
>IPv6 to be:
>
>    static final int IPv4 = 1;
>    static final int IPv6 = 2;
>
>That's just plain wrong. AF_INET is still 2, and AF_INET6
>is 10.
>****************End Text***********************************
>
>Any thoughts on a workaround for this problem.
>
>Thanks,
>
>Regards,
>Saurabh Sharma
>---------------------------------------------------------
>Saurabh Sharma
>Interfaces Development Team
>Fujitsu Alliance
>Tata Consultancy Services
>Mail: Saurabh.Sharma at uk.fujitsu.com
>
>  
>





More information about the SNMP4J mailing list