Add USB RNDIS enable/disable control

Also adding interface configuration to the tethering machine.
Also fixing netd bug that didn't send up/down portion of iface config command.
This commit is contained in:
Robert Greenwalt
2010-02-18 11:25:54 -08:00
parent 33285c37ab
commit 65ae29bd85
4 changed files with 238 additions and 32 deletions

View File

@@ -256,14 +256,14 @@ class NetworkManagementService extends INetworkManagementService.Stub {
Log.e(TAG, "Failed to parse netmask", uhe);
cfg.netmask = 0;
}
cfg.interfaceFlags = st.nextToken("]");
cfg.interfaceFlags = st.nextToken("]").trim() +"]";
Log.d(TAG, String.format("flags <%s>", cfg.interfaceFlags));
return cfg;
}
public void setInterfaceConfig(
String iface, InterfaceConfiguration cfg) throws IllegalStateException {
String cmd = String.format("interface setcfg %s %s %s", iface,
String cmd = String.format("interface setcfg %s %s %s %s", iface,
intToIpString(cfg.ipAddr), intToIpString(cfg.netmask), cfg.interfaceFlags);
mConnector.doCommand(cmd);
}