[SNMP4J] SNMP4J on SDK 1.3.x

Sharma Saurabh Saurabh.Sharma at uk.fujitsu.com
Fri Jul 8 15:58:47 CEST 2005


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



-----Original Message-----
From: Frank Fock [mailto:fock at agentpp.com] 
Sent: Friday, July 08, 2005 7:45 AM
To: Sharma Saurabh
Cc: snmp4j at agentpp.org
Subject: Re: [SNMP4J] SNMP4J on SDK 1.3.x

Hi Sharma,

SNMP4J needs JDK 1.4 or later. If you want to use the UDP transport mapping
only, you might have some chance to reimplement java.nio.ByteBuffer and some
other 1.4 stuff that has been used in order to be able to use SNMP4J with
Java 1.3 too.

Best regards,
Frank

Sharma Saurabh wrote:

>hi,
>
>I am working on a solution which needs to incorporate an SNMP4J agent. The
>code of this solution is strictly on Java 2 SDK, Standard Edition Version
>1.3.x.
>I like to understand the about availability of the SNMP4J source on Version
>1.3.x compliant APIs whether open source or a commercial package. 
>
>It would of much help if any body can list source sites where any such
>source is available.
>Regards,
>Saurabh Sharma
>---------------------------------------------------------
>Saurabh Sharma
>Interfaces Development Team
>Fujitsu Alliance
>Mail: Saurabh.Sharma at uk.fujitsu.com
>
>
>
>_______________________________________________
>SNMP4J mailing list
>SNMP4J at agentpp.org
>http://lists.agentpp.org/mailman/listinfo/snmp4j
>
>
>  
>




More information about the SNMP4J mailing list