private static void collectIpv6Addresses(String interfaceName, int interfaceIndex, List<InetAddress> addresses, List<InterfaceAddress> interfaceAddresses) throws SocketException { // RoboVM note: This method used to read from /proc/net/if_inet6 which isn't available on // Darwin. byte[] bytes = getIpv6Addresses(interfaceName); if (bytes != null) { for (int i = 0; i < bytes.length; i += 32) { byte[] addressBytes = new byte[16]; byte[] netmaskBytes = new byte[16]; System.arraycopy(bytes, i, addressBytes, 0, 16); System.arraycopy(bytes, i + 16, netmaskBytes, 0, 16); Inet6Address inet6Address = new Inet6Address(addressBytes, null, interfaceIndex); addresses.add(inet6Address); interfaceAddresses.add(new InterfaceAddress(inet6Address, (short) ipv6NetmaskToPrefixLength(netmaskBytes))); } } }
private static void collectIpv6Addresses(String interfaceName, int interfaceIndex, List<InetAddress> addresses, List<InterfaceAddress> interfaceAddresses) throws SocketException { // RoboVM note: This method used to read from /proc/net/if_inet6 which isn't available on // Darwin. byte[] bytes = getIpv6Addresses(interfaceName); if (bytes != null) { for (int i = 0; i < bytes.length; i += 32) { byte[] addressBytes = new byte[16]; byte[] netmaskBytes = new byte[16]; System.arraycopy(bytes, i, addressBytes, 0, 16); System.arraycopy(bytes, i + 16, netmaskBytes, 0, 16); Inet6Address inet6Address = new Inet6Address(addressBytes, null, interfaceIndex); addresses.add(inet6Address); interfaceAddresses.add(new InterfaceAddress(inet6Address, (short) ipv6NetmaskToPrefixLength(netmaskBytes))); } } }
private static void collectIpv6Addresses(String interfaceName, int interfaceIndex, List<InetAddress> addresses, List<InterfaceAddress> interfaceAddresses) throws SocketException { // RoboVM note: This method used to read from /proc/net/if_inet6 which isn't available on // Darwin. byte[] bytes = getIpv6Addresses(interfaceName); if (bytes != null) { for (int i = 0; i < bytes.length; i += 32) { byte[] addressBytes = new byte[16]; byte[] netmaskBytes = new byte[16]; System.arraycopy(bytes, i, addressBytes, 0, 16); System.arraycopy(bytes, i + 16, netmaskBytes, 0, 16); Inet6Address inet6Address = new Inet6Address(addressBytes, null, interfaceIndex); addresses.add(inet6Address); interfaceAddresses.add(new InterfaceAddress(inet6Address, (short) ipv6NetmaskToPrefixLength(netmaskBytes))); } } }
private static void collectIpv6Addresses(String interfaceName, int interfaceIndex, List<InetAddress> addresses, List<InterfaceAddress> interfaceAddresses) throws SocketException { // BugVM note: This method used to read from /proc/net/if_inet6 which isn't available on // Darwin. byte[] bytes = getIpv6Addresses(interfaceName); if (bytes != null) { for (int i = 0; i < bytes.length; i += 32) { byte[] addressBytes = new byte[16]; byte[] netmaskBytes = new byte[16]; System.arraycopy(bytes, i, addressBytes, 0, 16); System.arraycopy(bytes, i + 16, netmaskBytes, 0, 16); Inet6Address inet6Address = new Inet6Address(addressBytes, null, interfaceIndex); addresses.add(inet6Address); interfaceAddresses.add(new InterfaceAddress(inet6Address, (short) ipv6NetmaskToPrefixLength(netmaskBytes))); } } }
private static void collectIpv6Addresses(String interfaceName, int interfaceIndex, List<InetAddress> addresses, List<InterfaceAddress> interfaceAddresses) throws SocketException { // BugVM note: This method used to read from /proc/net/if_inet6 which isn't available on // Darwin. byte[] bytes = getIpv6Addresses(interfaceName); if (bytes != null) { for (int i = 0; i < bytes.length; i += 32) { byte[] addressBytes = new byte[16]; byte[] netmaskBytes = new byte[16]; System.arraycopy(bytes, i, addressBytes, 0, 16); System.arraycopy(bytes, i + 16, netmaskBytes, 0, 16); Inet6Address inet6Address = new Inet6Address(addressBytes, null, interfaceIndex); addresses.add(inet6Address); interfaceAddresses.add(new InterfaceAddress(inet6Address, (short) ipv6NetmaskToPrefixLength(netmaskBytes))); } } }
private static void collectIpv6Addresses(String interfaceName, int interfaceIndex, List<InetAddress> addresses, List<InterfaceAddress> interfaceAddresses) throws SocketException { // RoboVM note: This method used to read from /proc/net/if_inet6 which isn't available on // Darwin. byte[] bytes = getIpv6Addresses(interfaceName); if (bytes != null) { for (int i = 0; i < bytes.length; i += 32) { byte[] addressBytes = new byte[16]; byte[] netmaskBytes = new byte[16]; System.arraycopy(bytes, i, addressBytes, 0, 16); System.arraycopy(bytes, i + 16, netmaskBytes, 0, 16); Inet6Address inet6Address = new Inet6Address(addressBytes, null, interfaceIndex); addresses.add(inet6Address); interfaceAddresses.add(new InterfaceAddress(inet6Address, (short) ipv6NetmaskToPrefixLength(netmaskBytes))); } } }
private static void collectIpv6Addresses(String interfaceName, int interfaceIndex, List<InetAddress> addresses, List<InterfaceAddress> interfaceAddresses) throws SocketException { // RoboVM note: This method used to read from /proc/net/if_inet6 which isn't available on // Darwin. byte[] bytes = getIpv6Addresses(interfaceName); if (bytes != null) { for (int i = 0; i < bytes.length; i += 32) { byte[] addressBytes = new byte[16]; byte[] netmaskBytes = new byte[16]; System.arraycopy(bytes, i, addressBytes, 0, 16); System.arraycopy(bytes, i + 16, netmaskBytes, 0, 16); Inet6Address inet6Address = new Inet6Address(addressBytes, null, interfaceIndex); addresses.add(inet6Address); interfaceAddresses.add(new InterfaceAddress(inet6Address, (short) ipv6NetmaskToPrefixLength(netmaskBytes))); } } }