Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1646)

Unified Diff: net/android/java/src/org/chromium/net/AndroidNetworkLibrary.java

Issue 100703002: Added net::NetworkInterface::interface_index. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/local_discovery/privet_traffic_detector.cc ('k') | net/base/net_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/android/java/src/org/chromium/net/AndroidNetworkLibrary.java
diff --git a/net/android/java/src/org/chromium/net/AndroidNetworkLibrary.java b/net/android/java/src/org/chromium/net/AndroidNetworkLibrary.java
index 49b66345c7a355da6cbba811cac3b9a34109aa1d..b7aec32c059441ffeaacd72bfa9bed3462afccf3 100644
--- a/net/android/java/src/org/chromium/net/AndroidNetworkLibrary.java
+++ b/net/android/java/src/org/chromium/net/AndroidNetworkLibrary.java
@@ -143,11 +143,12 @@ class AndroidNetworkLibrary {
/**
* @return the network interfaces list (if any) string. The items in
- * the list string are delimited by a semicolon ";", each item
- * is a network interface name and address pair and formatted
- * as "name,address". e.g.
- * eth0,10.0.0.2;eth0,fe80::5054:ff:fe12:3456
- * represents a network list string which containts two items.
+ * the list string are delimited by a new line, each item
+ * is tab separated network interface name, address with network
+ * prefix length and network interface index.
+ * as "name\taddress/prefix\tindex". e.g.
+ * eth0\t10.0.0.2/8\t5\neth0\tfe80::5054:ff:fe12:3456/16\t5
+ * represents a network list string with two items.
*/
@CalledByNative
static public String getNetworkList() {
@@ -183,6 +184,10 @@ class AndroidNetworkLibrary {
addressString.append(ipAddress);
addressString.append("/");
addressString.append(interfaceAddress.getNetworkPrefixLength());
+ addressString.append("\t");
+
+ // TODO(vitalybuka): use netIf.getIndex() when API level 19 is availible.
+ addressString.append("0");
if (result.length() != 0)
result.append("\n");
« no previous file with comments | « chrome/browser/local_discovery/privet_traffic_detector.cc ('k') | net/base/net_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698