harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Xiao Shu (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-6588) [classlib][luni] InetAddress.isReachable(NetworkInterface netif,int ttl, int timeout) always return false when testing reachablity by sending TCP ECHO
Date Fri, 16 Jul 2010 05:55:51 GMT
[classlib][luni] InetAddress.isReachable(NetworkInterface netif,int ttl, int timeout) always
return false when testing reachablity by sending TCP ECHO
------------------------------------------------------------------------------------------------------------------------------------------------------

                 Key: HARMONY-6588
                 URL: https://issues.apache.org/jira/browse/HARMONY-6588
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
    Affects Versions: 5.0M14
            Reporter: Xiao Shu


Run below test case on Linux ppc with a user who's not administrator. (For Administrators,
will test reachability by sending ICMP ECHO REQUESTs )

import java.net.*;
import java.util.*;

public class Reachability {

    public static void main(String[] args) throws Exception {
        InetAddress ia = InetAddress.getByName("<IP_ADDRESS>");
        System.out.println("InetAddress: " + ia);
        Enumeration nis = NetworkInterface.getNetworkInterfaces();
        while (nis.hasMoreElements()) {
            NetworkInterface ni = (NetworkInterface) nis.nextElement();
            System.out.println("Network Interface: " + ni);
            boolean reachable = ia.isReachable(ni, 10, 60000);
            System.out.println(reachable);
        }
    }
}

The expected result is printing out at least one true.
But when running this test case, it will print all false.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message