Methods Summary |
---|
public void | addIdleTimer(java.lang.String iface, int timeout, int type)Sets idletimer for an interface.
This either initializes a new idletimer or increases its
reference-counting if an idletimer already exists for given
{@code iface}.
{@code type} is the type of the interface, such as TYPE_MOBILE.
Every {@code addIdleTimer} should be paired with a
{@link removeIdleTimer} to cleanup when the network disconnects.
|
public void | addInterfaceToLocalNetwork(java.lang.String iface, java.util.List routes)
|
public void | addInterfaceToNetwork(java.lang.String iface, int netId)Add an interface to a network.
|
public void | addLegacyRouteForNetId(int netId, android.net.RouteInfo routeInfo, int uid)
|
public void | addRoute(int netId, android.net.RouteInfo route)Add the specified route to the interface.
|
public void | addVpnUidRanges(int netId, android.net.UidRange[] ranges)Set all packets from users in ranges to go through VPN specified by netId.
|
public void | allowProtect(int uid)Allow UID to call protect().
|
public void | attachPppd(java.lang.String tty, java.lang.String localAddr, java.lang.String remoteAddr, java.lang.String dns1Addr, java.lang.String dns2Addr)Attaches a PPP server daemon to the specified TTY with the specified
local/remote addresses.
|
public void | clearDefaultNetId()
|
public void | clearInterfaceAddresses(java.lang.String iface)Clear all IP addresses on the specified interface
|
public void | clearPermission(int[] uids)
|
public void | createPhysicalNetwork(int netId)Setup a new physical network.
|
public void | createVirtualNetwork(int netId, boolean hasDNS, boolean secure)Setup a new VPN.
|
public void | denyProtect(int uid)Deny UID from calling protect().
|
public void | detachPppd(java.lang.String tty)Detaches a PPP server daemon from the specified TTY.
|
public void | disableIpv6(java.lang.String iface)Disable IPv6 on an interface
|
public void | disableNat(java.lang.String internalInterface, java.lang.String externalInterface)Disables Network Address Translation between two interfaces.
|
public void | enableIpv6(java.lang.String iface)Enable IPv6 on an interface
|
public void | enableNat(java.lang.String internalInterface, java.lang.String externalInterface)Enables Network Address Translation between two interfaces.
The address and netmask of the external interface is used for
the NAT'ed network.
|
public void | flushNetworkDnsCache(int netId)Flush the DNS cache associated with the specified network.
|
public java.lang.String[] | getDnsForwarders()Returns the list of DNS forwarders (in order of priority)
|
public android.net.InterfaceConfiguration | getInterfaceConfig(java.lang.String iface)Retrieves the specified interface config
|
public boolean | getIpForwardingEnabled()Returns true if IP forwarding is enabled
|
public android.net.NetworkStats | getNetworkStatsDetail()Return detailed network statistics with UID-level granularity,
including interface and tag details.
|
public android.net.NetworkStats | getNetworkStatsSummaryDev()Return global network statistics summarized at an interface level,
without any UID-level granularity.
|
public android.net.NetworkStats | getNetworkStatsSummaryXt()
|
public android.net.NetworkStats | getNetworkStatsTethering()Return summary of network statistics all tethering interfaces.
|
public android.net.NetworkStats | getNetworkStatsUidDetail(int uid)Return detailed network statistics for the requested UID,
including interface and tag details.
|
public android.net.RouteInfo[] | getRoutes(java.lang.String iface)Retrieves the network routes currently configured on the specified
interface
|
public boolean | isBandwidthControlEnabled()Return status of bandwidth control module.
|
public boolean | isClatdStarted(java.lang.String interfaceName)Determine whether the clatd (464xlat) service has been started on the given interface.
|
public boolean | isFirewallEnabled()
|
public boolean | isNetworkActive()Check whether the mobile radio is currently active.
|
public boolean | isTetheringStarted()Returns true if tethering services are started
|
public java.lang.String[] | listInterfaces()Returns a list of currently known network interfaces
|
public java.lang.String[] | listTetheredInterfaces()Returns a list of currently tethered interfaces
|
public java.lang.String[] | listTtys()Returns the list of currently known TTY devices on the system
|
public void | registerNetworkActivityListener(android.os.INetworkActivityListener listener)Start listening for mobile activity state changes.
|
public void | registerObserver(android.net.INetworkManagementEventObserver obs)Register an observer to receive events
|
public void | removeIdleTimer(java.lang.String iface)Removes idletimer for an interface.
|
public void | removeInterfaceAlert(java.lang.String iface)Remove alert for an interface.
|
public void | removeInterfaceFromLocalNetwork(java.lang.String iface)
|
public void | removeInterfaceFromNetwork(java.lang.String iface, int netId)Remove an Interface from a network.
|
public void | removeInterfaceQuota(java.lang.String iface)Remove quota for an interface.
|
public void | removeNetwork(int netId)Remove a network.
|
public void | removeRoute(int netId, android.net.RouteInfo route)Remove the specified route from the interface.
|
public void | removeVpnUidRanges(int netId, android.net.UidRange[] ranges)Clears the special VPN rules for users in ranges and VPN specified by netId.
|
public void | setAccessPoint(android.net.wifi.WifiConfiguration wifiConfig, java.lang.String iface)Set Access Point config
|
public void | setDefaultNetId(int netId)
|
public void | setDnsForwarders(android.net.Network network, java.lang.String[] dns)Sets the list of DNS forwarders (in order of priority)
|
public void | setDnsServersForNetwork(int netId, java.lang.String[] servers, java.lang.String domains)Bind name servers to a network in the DNS resolver.
|
public void | setFirewallEgressDestRule(java.lang.String addr, int port, boolean allow)
|
public void | setFirewallEgressSourceRule(java.lang.String addr, boolean allow)
|
public void | setFirewallEnabled(boolean enabled)
|
public void | setFirewallInterfaceRule(java.lang.String iface, boolean allow)
|
public void | setFirewallUidRule(int uid, boolean allow)
|
public void | setGlobalAlert(long alertBytes)Set alert across all interfaces.
|
public void | setInterfaceAlert(java.lang.String iface, long alertBytes)Set alert for an interface; requires that iface already has quota.
|
public void | setInterfaceConfig(java.lang.String iface, android.net.InterfaceConfiguration cfg)Sets the configuration of the specified interface
|
public void | setInterfaceDown(java.lang.String iface)Set interface down
|
public void | setInterfaceIpv6NdOffload(java.lang.String iface, boolean enable)Enables or enables IPv6 ND offload.
|
public void | setInterfaceIpv6PrivacyExtensions(java.lang.String iface, boolean enable)Set interface IPv6 privacy extensions
|
public void | setInterfaceQuota(java.lang.String iface, long quotaBytes)Set quota for an interface.
|
public void | setInterfaceUp(java.lang.String iface)Set interface up
|
public void | setIpForwardingEnabled(boolean enabled)Enables/Disables IP Forwarding
|
public void | setMtu(java.lang.String iface, int mtu)Set the specified MTU size
|
public void | setPermission(java.lang.String permission, int[] uids)
|
public void | setUidNetworkRules(int uid, boolean rejectOnQuotaInterfaces)Control network activity of a UID over interfaces with a quota limit.
|
public void | shutdown()Shuts down the service
|
public void | startAccessPoint(android.net.wifi.WifiConfiguration wifiConfig, java.lang.String iface)Start Wifi Access Point
|
public void | startClatd(java.lang.String interfaceName)Start the clatd (464xlat) service on the given interface.
|
public void | startTethering(java.lang.String[] dhcpRanges)Start tethering services with the specified dhcp server range
arg is a set of start end pairs defining the ranges.
|
public void | stopAccessPoint(java.lang.String iface)Stop Wifi Access Point
|
public void | stopClatd(java.lang.String interfaceName)Stop the clatd (464xlat) service on the given interface.
|
public void | stopTethering()Stop currently running tethering services
|
public void | tetherInterface(java.lang.String iface)Tethers the specified interface
|
public void | unregisterNetworkActivityListener(android.os.INetworkActivityListener listener)Stop listening for mobile activity state changes.
|
public void | unregisterObserver(android.net.INetworkManagementEventObserver obs)Unregister an observer from receiving events.
|
public void | untetherInterface(java.lang.String iface)Untethers the specified interface
|
public void | wifiFirmwareReload(java.lang.String wlanIface, java.lang.String mode)Load firmware for operation in the given mode. Currently the three
modes supported are "AP", "STA" and "P2P".
|