JDK-4639861 : API to test reachability of a host
  • Type: Enhancement
  • Status: Resolved
  • Resolution: Fixed
  • Component: core-libs
  • Sub-Component: java.net
  • Priority: P4
  • Affected Version: 1.1.4,1.1.6,1.2.0,1.2.2,5.0
  • OS: generic,solaris_2.5.1,windows_nt
  • CPU: generic,x86,sparc
  • Submit Date: 2002-02-19
  • Updated Date: 2017-05-16
  • Resolved Date: 2003-08-17
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availabitlity Release.

To download the current JDK release, click here.
Other
5.0 tigerResolved
Related Reports
Duplicate :  
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

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

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