2014-01-29 15:38:50 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
|
|
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
/**
|
2016-02-19 11:06:21 +03:00
|
|
|
* This dictionary holds the parameters sent to the network worker.
|
2014-01-29 15:38:50 +04:00
|
|
|
*/
|
|
|
|
dictionary NetworkCommandOptions
|
|
|
|
{
|
|
|
|
long id = 0; // opaque id.
|
|
|
|
DOMString cmd = ""; // the command name.
|
|
|
|
DOMString ifname; // for "removeNetworkRoute", "setDNS",
|
|
|
|
// "setDefaultRouteAndDNS", "removeDefaultRoute"
|
|
|
|
// "addHostRoute", "removeHostRoute"
|
|
|
|
// "removeHostRoutes".
|
|
|
|
DOMString ip; // for "removeNetworkRoute", "setWifiTethering".
|
2014-02-26 14:08:46 +04:00
|
|
|
unsigned long prefixLength; // for "removeNetworkRoute".
|
2014-02-20 15:04:51 +04:00
|
|
|
DOMString domain; // for "setDNS"
|
2014-03-29 11:18:19 +04:00
|
|
|
sequence<DOMString> dnses; // for "setDNS", "setDefaultRouteAndDNS".
|
|
|
|
DOMString gateway; // for "addSecondaryRoute", "removeSecondaryRoute".
|
2014-08-08 10:30:00 +04:00
|
|
|
sequence<DOMString> gateways; // for "setDefaultRouteAndDNS", "removeDefaultRoute".
|
2014-01-29 15:38:50 +04:00
|
|
|
DOMString mode; // for "setWifiOperationMode".
|
|
|
|
boolean report; // for "setWifiOperationMode".
|
|
|
|
boolean enabled; // for "setDhcpServer".
|
|
|
|
DOMString wifictrlinterfacename; // for "setWifiTethering".
|
|
|
|
DOMString internalIfname; // for "setWifiTethering".
|
|
|
|
DOMString externalIfname; // for "setWifiTethering".
|
|
|
|
boolean enable; // for "setWifiTethering".
|
|
|
|
DOMString ssid; // for "setWifiTethering".
|
|
|
|
DOMString security; // for "setWifiTethering".
|
|
|
|
DOMString key; // for "setWifiTethering".
|
|
|
|
DOMString prefix; // for "setWifiTethering", "setDhcpServer".
|
|
|
|
DOMString link; // for "setWifiTethering", "setDhcpServer".
|
|
|
|
sequence<DOMString> interfaceList; // for "setWifiTethering".
|
|
|
|
DOMString wifiStartIp; // for "setWifiTethering".
|
|
|
|
DOMString wifiEndIp; // for "setWifiTethering".
|
|
|
|
DOMString usbStartIp; // for "setWifiTethering".
|
|
|
|
DOMString usbEndIp; // for "setWifiTethering".
|
|
|
|
DOMString dns1; // for "setWifiTethering".
|
|
|
|
DOMString dns2; // for "setWifiTethering".
|
2015-11-12 21:01:00 +03:00
|
|
|
long long threshold; // for "setNetworkInterfaceAlarm",
|
2014-01-29 15:38:50 +04:00
|
|
|
// "enableNetworkInterfaceAlarm".
|
|
|
|
DOMString startIp; // for "setDhcpServer".
|
|
|
|
DOMString endIp; // for "setDhcpServer".
|
|
|
|
DOMString serverIp; // for "setDhcpServer".
|
|
|
|
DOMString maskLength; // for "setDhcpServer".
|
|
|
|
DOMString preInternalIfname; // for "updateUpStream".
|
|
|
|
DOMString preExternalIfname; // for "updateUpStream".
|
|
|
|
DOMString curInternalIfname; // for "updateUpStream".
|
|
|
|
DOMString curExternalIfname; // for "updateUpStream".
|
2014-08-18 07:02:56 +04:00
|
|
|
|
|
|
|
long ipaddr; // for "ifc_configure".
|
|
|
|
long mask; // for "ifc_configure".
|
|
|
|
long gateway_long; // for "ifc_configure".
|
|
|
|
long dns1_long; // for "ifc_configure".
|
|
|
|
long dns2_long; // for "ifc_configure".
|
2015-09-23 10:35:29 +03:00
|
|
|
|
|
|
|
long mtu; // for "setMtu".
|
2014-01-29 15:38:50 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* This dictionary holds the parameters sent back to NetworkService.js.
|
|
|
|
*/
|
|
|
|
dictionary NetworkResultOptions
|
|
|
|
{
|
|
|
|
long id = 0; // opaque id.
|
|
|
|
boolean ret = false; // for sync command.
|
|
|
|
boolean broadcast = false; // for netd broadcast message.
|
|
|
|
DOMString topic = ""; // for netd broadcast message.
|
|
|
|
DOMString reason = ""; // for netd broadcast message.
|
|
|
|
|
|
|
|
long resultCode = 0; // for all commands.
|
|
|
|
DOMString resultReason = ""; // for all commands.
|
|
|
|
boolean error = false; // for all commands.
|
|
|
|
|
|
|
|
boolean enable = false; // for "setWifiTethering", "setUSBTethering"
|
|
|
|
// "enableUsbRndis".
|
|
|
|
boolean result = false; // for "enableUsbRndis".
|
|
|
|
boolean success = false; // for "setDhcpServer".
|
|
|
|
DOMString curExternalIfname = ""; // for "updateUpStream".
|
|
|
|
DOMString curInternalIfname = ""; // for "updateUpStream".
|
2014-08-18 07:02:56 +04:00
|
|
|
|
|
|
|
DOMString reply = ""; // for "command".
|
|
|
|
DOMString route = ""; // for "ifc_get_default_route".
|
|
|
|
DOMString ipaddr_str = ""; // The following are for the result of
|
|
|
|
// dhcp_do_request.
|
|
|
|
DOMString gateway_str = "";
|
|
|
|
DOMString dns1_str = "";
|
|
|
|
DOMString dns2_str = "";
|
|
|
|
DOMString mask_str = "";
|
|
|
|
DOMString server_str = "";
|
|
|
|
DOMString vendor_str = "";
|
|
|
|
long lease = 0;
|
2016-02-19 11:06:21 +03:00
|
|
|
long prefixLength = 0;
|
2014-08-18 07:02:56 +04:00
|
|
|
long mask = 0;
|
|
|
|
long ipaddr = 0;
|
|
|
|
long gateway = 0;
|
|
|
|
long dns1 = 0;
|
|
|
|
long dns2 = 0;
|
|
|
|
long server = 0;
|
2015-04-09 14:09:37 +03:00
|
|
|
|
2016-02-19 11:06:21 +03:00
|
|
|
DOMString netId = ""; // for "getNetId".
|
|
|
|
|
|
|
|
sequence<DOMString> interfaceList; // for "getInterfaceList".
|
|
|
|
|
|
|
|
DOMString flag = "down"; // for "getInterfaceConfig".
|
|
|
|
DOMString macAddr = ""; // for "getInterfaceConfig".
|
|
|
|
DOMString ipAddr = ""; // for "getInterfaceConfig".
|
2014-01-29 15:38:50 +04:00
|
|
|
};
|