Loading cmds/dumpstate/dumpstate.c +6 −0 Original line number Original line Diff line number Diff line Loading @@ -120,6 +120,12 @@ static void dumpstate() { dump_file("NETWORK ROUTES", "/proc/net/route"); dump_file("NETWORK ROUTES", "/proc/net/route"); dump_file("NETWORK ROUTES IPV6", "/proc/net/ipv6_route"); dump_file("NETWORK ROUTES IPV6", "/proc/net/ipv6_route"); run_command("IP RULES", 10, "ip", "rule", "show", NULL); run_command("IP RULES v6", 10, "ip", "-6", "rule", "show", NULL); run_command("ROUTE TABLE 60", 10, "ip", "route", "show", "table", "60", NULL); run_command("ROUTE TABLE 61 v6", 10, "ip", "-6", "route", "show", "table", "60", NULL); run_command("ROUTE TABLE 61", 10, "ip", "route", "show", "table", "61", NULL); run_command("ROUTE TABLE 61 v6", 10, "ip", "-6", "route", "show", "table", "61", NULL); dump_file("ARP CACHE", "/proc/net/arp"); dump_file("ARP CACHE", "/proc/net/arp"); run_command("IPTABLES", 10, "su", "root", "iptables", "-L", "-nvx", NULL); run_command("IPTABLES", 10, "su", "root", "iptables", "-L", "-nvx", NULL); run_command("IP6TABLES", 10, "su", "root", "ip6tables", "-L", "-nvx", NULL); run_command("IP6TABLES", 10, "su", "root", "ip6tables", "-L", "-nvx", NULL); Loading services/java/com/android/server/NetworkManagementService.java +11 −7 Original line number Original line Diff line number Diff line Loading @@ -856,6 +856,9 @@ public class NetworkManagementService extends INetworkManagementService.Stub NetworkInterface internalNetworkInterface = NetworkInterface internalNetworkInterface = NetworkInterface.getByName(internalInterface); NetworkInterface.getByName(internalInterface); if (internalNetworkInterface == null) { cmd += " 0"; } else { Collection<InterfaceAddress>interfaceAddresses = Collection<InterfaceAddress>interfaceAddresses = internalNetworkInterface.getInterfaceAddresses(); internalNetworkInterface.getInterfaceAddresses(); cmd += " " + interfaceAddresses.size(); cmd += " " + interfaceAddresses.size(); Loading @@ -864,6 +867,7 @@ public class NetworkManagementService extends INetworkManagementService.Stub ia.getNetworkPrefixLength()); ia.getNetworkPrefixLength()); cmd = cmd + " " + addr.getHostAddress() + "/" + ia.getNetworkPrefixLength(); cmd = cmd + " " + addr.getHostAddress() + "/" + ia.getNetworkPrefixLength(); } } } mConnector.doCommand(cmd); mConnector.doCommand(cmd); } } Loading telephony/java/com/android/internal/telephony/DataCallState.java +8 −0 Original line number Original line Diff line number Diff line Loading @@ -126,6 +126,8 @@ public class DataCallState { // set link addresses // set link addresses if (addresses != null && addresses.length > 0) { if (addresses != null && addresses.length > 0) { for (String addr : addresses) { for (String addr : addresses) { addr = addr.trim(); if (addr.isEmpty()) continue; LinkAddress la; LinkAddress la; int addrPrefixLen; int addrPrefixLen; Loading Loading @@ -159,6 +161,8 @@ public class DataCallState { // set dns servers // set dns servers if (dnses != null && dnses.length > 0) { if (dnses != null && dnses.length > 0) { for (String addr : dnses) { for (String addr : dnses) { addr = addr.trim(); if (addr.isEmpty()) continue; InetAddress ia; InetAddress ia; try { try { ia = NetworkUtils.numericToInetAddress(addr); ia = NetworkUtils.numericToInetAddress(addr); Loading @@ -174,6 +178,8 @@ public class DataCallState { dnsServers[0] = SystemProperties.get(propertyPrefix + "dns1"); dnsServers[0] = SystemProperties.get(propertyPrefix + "dns1"); dnsServers[1] = SystemProperties.get(propertyPrefix + "dns2"); dnsServers[1] = SystemProperties.get(propertyPrefix + "dns2"); for (String dnsAddr : dnsServers) { for (String dnsAddr : dnsServers) { dnsAddr = dnsAddr.trim(); if (dnsAddr.isEmpty()) continue; InetAddress ia; InetAddress ia; try { try { ia = NetworkUtils.numericToInetAddress(dnsAddr); ia = NetworkUtils.numericToInetAddress(dnsAddr); Loading @@ -198,6 +204,8 @@ public class DataCallState { } } } } for (String addr : gateways) { for (String addr : gateways) { addr = addr.trim(); if (addr.isEmpty()) continue; InetAddress ia; InetAddress ia; try { try { ia = NetworkUtils.numericToInetAddress(addr); ia = NetworkUtils.numericToInetAddress(addr); Loading Loading
cmds/dumpstate/dumpstate.c +6 −0 Original line number Original line Diff line number Diff line Loading @@ -120,6 +120,12 @@ static void dumpstate() { dump_file("NETWORK ROUTES", "/proc/net/route"); dump_file("NETWORK ROUTES", "/proc/net/route"); dump_file("NETWORK ROUTES IPV6", "/proc/net/ipv6_route"); dump_file("NETWORK ROUTES IPV6", "/proc/net/ipv6_route"); run_command("IP RULES", 10, "ip", "rule", "show", NULL); run_command("IP RULES v6", 10, "ip", "-6", "rule", "show", NULL); run_command("ROUTE TABLE 60", 10, "ip", "route", "show", "table", "60", NULL); run_command("ROUTE TABLE 61 v6", 10, "ip", "-6", "route", "show", "table", "60", NULL); run_command("ROUTE TABLE 61", 10, "ip", "route", "show", "table", "61", NULL); run_command("ROUTE TABLE 61 v6", 10, "ip", "-6", "route", "show", "table", "61", NULL); dump_file("ARP CACHE", "/proc/net/arp"); dump_file("ARP CACHE", "/proc/net/arp"); run_command("IPTABLES", 10, "su", "root", "iptables", "-L", "-nvx", NULL); run_command("IPTABLES", 10, "su", "root", "iptables", "-L", "-nvx", NULL); run_command("IP6TABLES", 10, "su", "root", "ip6tables", "-L", "-nvx", NULL); run_command("IP6TABLES", 10, "su", "root", "ip6tables", "-L", "-nvx", NULL); Loading
services/java/com/android/server/NetworkManagementService.java +11 −7 Original line number Original line Diff line number Diff line Loading @@ -856,6 +856,9 @@ public class NetworkManagementService extends INetworkManagementService.Stub NetworkInterface internalNetworkInterface = NetworkInterface internalNetworkInterface = NetworkInterface.getByName(internalInterface); NetworkInterface.getByName(internalInterface); if (internalNetworkInterface == null) { cmd += " 0"; } else { Collection<InterfaceAddress>interfaceAddresses = Collection<InterfaceAddress>interfaceAddresses = internalNetworkInterface.getInterfaceAddresses(); internalNetworkInterface.getInterfaceAddresses(); cmd += " " + interfaceAddresses.size(); cmd += " " + interfaceAddresses.size(); Loading @@ -864,6 +867,7 @@ public class NetworkManagementService extends INetworkManagementService.Stub ia.getNetworkPrefixLength()); ia.getNetworkPrefixLength()); cmd = cmd + " " + addr.getHostAddress() + "/" + ia.getNetworkPrefixLength(); cmd = cmd + " " + addr.getHostAddress() + "/" + ia.getNetworkPrefixLength(); } } } mConnector.doCommand(cmd); mConnector.doCommand(cmd); } } Loading
telephony/java/com/android/internal/telephony/DataCallState.java +8 −0 Original line number Original line Diff line number Diff line Loading @@ -126,6 +126,8 @@ public class DataCallState { // set link addresses // set link addresses if (addresses != null && addresses.length > 0) { if (addresses != null && addresses.length > 0) { for (String addr : addresses) { for (String addr : addresses) { addr = addr.trim(); if (addr.isEmpty()) continue; LinkAddress la; LinkAddress la; int addrPrefixLen; int addrPrefixLen; Loading Loading @@ -159,6 +161,8 @@ public class DataCallState { // set dns servers // set dns servers if (dnses != null && dnses.length > 0) { if (dnses != null && dnses.length > 0) { for (String addr : dnses) { for (String addr : dnses) { addr = addr.trim(); if (addr.isEmpty()) continue; InetAddress ia; InetAddress ia; try { try { ia = NetworkUtils.numericToInetAddress(addr); ia = NetworkUtils.numericToInetAddress(addr); Loading @@ -174,6 +178,8 @@ public class DataCallState { dnsServers[0] = SystemProperties.get(propertyPrefix + "dns1"); dnsServers[0] = SystemProperties.get(propertyPrefix + "dns1"); dnsServers[1] = SystemProperties.get(propertyPrefix + "dns2"); dnsServers[1] = SystemProperties.get(propertyPrefix + "dns2"); for (String dnsAddr : dnsServers) { for (String dnsAddr : dnsServers) { dnsAddr = dnsAddr.trim(); if (dnsAddr.isEmpty()) continue; InetAddress ia; InetAddress ia; try { try { ia = NetworkUtils.numericToInetAddress(dnsAddr); ia = NetworkUtils.numericToInetAddress(dnsAddr); Loading @@ -198,6 +204,8 @@ public class DataCallState { } } } } for (String addr : gateways) { for (String addr : gateways) { addr = addr.trim(); if (addr.isEmpty()) continue; InetAddress ia; InetAddress ia; try { try { ia = NetworkUtils.numericToInetAddress(addr); ia = NetworkUtils.numericToInetAddress(addr); Loading