United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-4639861 : API to test reachability of a host

Details
Type:
Enhancement
Submit Date:
2002-02-19
Status:
Resolved
Updated Date:
2003-08-17
Project Name:
JDK
Resolved Date:
2003-08-17
Component:
core-libs
OS:
windows_nt,solaris_2.5.1,generic
Sub-Component:
java.net
CPU:
x86,sparc,generic
Priority:
P4
Resolution:
Fixed
Affected Versions:
1.1.4,1.1.6,1.2.0,1.2.2,5.0
Fixed Versions:
5.0 (tiger)

Related Reports
Duplicate:

Sub Tasks

Description
This RFE is submitted to track the requirement to test the reachability 
of a host (or more likely an InetAddress). This RFE stems from the 
feedback to 4093850 "ICMP protocol support a.k.a. PING applets" where
it clear that many developers have a basic requirement to test if a
host was reachable (something akin to the ping utility).

In its simplest form it we could test if a host is reachable 
within a specified timeout. Another variant could be to test if
a host is reachable from a specified java.net.NetworkInterface.

Implementation-wise there needs to be flexibility to choose how
reachability is determined. If we can create an ICMP socket then
we can send/receive an echo request/reply ala classic ping.
Alternatively if we can't create an ICMP socket then a UDP or TCP
approach might be used (for example we could send a UDP packet to
the echo port and handle timeout/port unreachable).  

                                    

Comments
CONVERTED DATA

BugTraq+ Release Management Values

COMMIT TO FIX:
tiger

FIXED IN:
tiger

INTEGRATED IN:
tiger
tiger-b16


                                     
2004-06-14
WORK AROUND


Send UDP packet to echo port. Wait for reply with timeout. If a 
reply is received or java.net.PortUnreachableException is thrown
then you know that the host is reachable.

###@###.### 2002-08-08
                                     
2002-08-08
EVALUATION



Name: jc17350			Date: 02/19/2002


This feature has been added for Tiger release

======================================================================




A note to developers on the JDC :-

4093850 "ICMP protocol support a.k.a. PING applets" was a long
standing RFE seeking ICMP/raw sockets support. It attracted approximately
250 votes on the JDC. It became clear from the feedback to the RFE
that there were broadly two requirements :-

- Advanced & Raw Socket support - needed by those developing network
tools (such as ping & traceroute), and networking daemons (such as
in.ndpd).

- "ping" support where an application needs to determine if a 
host is reachable or not. 

Accordingly we have split 4093850 into 2 RFEs :-

4727550 is tracking the requirement for complete raw socket support
4639861 is tracking the requirement to test reachability of a host.

4093850 was closed as a duplicate of 4639861 and hence the JDC votes
& customer records were automatically transfered to 4639861.

###@###.### 2002-08-08
                                     
2002-08-08



Hardware and Software, Engineered to Work Together