From owner-freebsd-emulation@FreeBSD.ORG Fri Jul 27 23:45:54 2007 Return-Path: Delivered-To: freebsd-emulation@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 34EEE16A41F for ; Fri, 27 Jul 2007 23:45:54 +0000 (UTC) (envelope-from kpeter@melbpc.org.au) Received: from vscan01.westnet.com.au (vscan01.westnet.com.au [203.10.1.131]) by mx1.freebsd.org (Postfix) with ESMTP id A27E513C45E for ; Fri, 27 Jul 2007 23:45:53 +0000 (UTC) (envelope-from kpeter@melbpc.org.au) Received: from localhost (localhost.localdomain [127.0.0.1]) by localhost (Postfix) with ESMTP id BE09D7611E1 for ; Sat, 28 Jul 2007 07:18:58 +0800 (WST) Received: from vscan01.westnet.com.au ([127.0.0.1]) by localhost (vscan01.westnet.com.au [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 26482-14 for ; Sat, 28 Jul 2007 07:18:58 +0800 (WST) Received: from baron.from.hell (dsl-124-150-121-3.vic.westnet.com.au [124.150.121.3]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by vscan01.westnet.com.au (Postfix) with ESMTP id 31719762170 for ; Sat, 28 Jul 2007 07:18:58 +0800 (WST) Message-ID: <46AA7D4B.2000202@melbpc.org.au> Date: Sat, 28 Jul 2007 09:18:35 +1000 From: Peter Kostouros Organization: Melbourne PC User Group User-Agent: Thunderbird 2.0.0.0 (X11/20070326) MIME-Version: 1.0 To: freebsd-emulation@FreeBSD.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: re: [PATCH]: linux ioctls not implemented - advice? X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: kpeter@melbpc.org.au List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Jul 2007 23:45:54 -0000 Hi I applied the patch on a recent current (27JUL2007) but unfortunately I still see the ioctl is not implemented message on the console. A simple java application that identifies the problem is: package hell.from.baron.test; import java.net.InetAddress; import java.net.NetworkInterface; import java.util.ArrayList; import java.util.Enumeration; import java.util.List; public class TestUtil { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub try { String[] ips = TestUtil.getHostAddresses(); for (int i = 0; i < ips.length; i++) System.out.println("IP[" + Integer.toString(i) + "]" + " : " + ips[i]); } catch (Exception ex) { ex.printStackTrace(); } } public static String[] getHostAddresses() throws Exception { List hostIps = new ArrayList(); Enumeration nifs = NetworkInterface.getNetworkInterfaces(); while (nifs.hasMoreElements()) { NetworkInterface nif = (NetworkInterface)nifs.nextElement(); Enumeration ips = nif.getInetAddresses(); while (ips.hasMoreElements()) { InetAddress ip = (InetAddress)ips.nextElement(); hostIps.add(ip.getHostAddress()); } } return (String[])hostIps.toArray(new String[0]); } } Running this application under (Linux) Java SE Runtime Environment (build 1.6.0_02-b05) I get the following output: java.net.SocketException: Cannot assign requested address at java.net.NetworkInterface.getAll(Native Method) at java.net.NetworkInterface.getNetworkInterfaces(NetworkInterface.java:281) at hell.from.baron.test.TestUtil.getHostAddresses(TestUtil.java:29) at hell.from.baron.test.TestUtil.main(TestUtil.java:17) and on the console linux: pid 1497 (java): ioctl fd=5, cmd=0x8933 ('\M^I',51) is not implemented whereas under Java 2 Runtime Environment (build 1.5.0_11-p5_15_jun_2007_15_10) I get: IP[0] : 127.0.0.1 IP[1] : 192.168.0.2 I grep'ed through the JDK source code and found SIOCGIFINDEX referenced in file jdk/j2se/src/solaris/native/java/net/NetworkInterface.c. I am trying to locate where the error is raised to provide further information, but thus far have been unsuccessful. Note I am running with compat.linux.osrelease=2.4.2. -- Regards Peter As always the organisation disavows knowledge of this email