INetworkManagementService.aidl revision 9ab518ad793385f8405edf19363fe825fb64f5f8
1/* //device/java/android/android/os/INetworkManagementService.aidl 2** 3** Copyright 2007, The Android Open Source Project 4** 5** Licensed under the Apache License, Version 2.0 (the "License"); 6** you may not use this file except in compliance with the License. 7** You may obtain a copy of the License at 8** 9** http://www.apache.org/licenses/LICENSE-2.0 10** 11** Unless required by applicable law or agreed to in writing, software 12** distributed under the License is distributed on an "AS IS" BASIS, 13** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14** See the License for the specific language governing permissions and 15** limitations under the License. 16*/ 17 18package android.os; 19 20import android.net.InterfaceConfiguration; 21import android.net.INetworkManagementEventObserver; 22import android.net.wifi.WifiConfiguration; 23 24/** 25 * @hide 26 */ 27interface INetworkManagementService 28{ 29 /** 30 ** GENERAL 31 **/ 32 33 /** 34 * Register an observer to receive events 35 */ 36 void registerObserver(INetworkManagementEventObserver obs); 37 38 /** 39 * Unregister an observer from receiving events. 40 */ 41 void unregisterObserver(INetworkManagementEventObserver obs); 42 43 /** 44 * Returns a list of currently known network interfaces 45 */ 46 String[] listInterfaces(); 47 48 /** 49 * Retrieves the specified interface config 50 * 51 */ 52 InterfaceConfiguration getInterfaceConfig(String iface); 53 54 /** 55 * Sets the configuration of the specified interface 56 */ 57 void setInterfaceConfig(String iface, in InterfaceConfiguration cfg); 58 59 /** 60 * Shuts down the service 61 */ 62 void shutdown(); 63 64 /** 65 ** TETHERING RELATED 66 **/ 67 68 69 /** 70 * Returns true if IP forwarding is enabled 71 */ 72 boolean getIpForwardingEnabled(); 73 74 /** 75 * Enables/Disables IP Forwarding 76 */ 77 void setIpForwardingEnabled(boolean enabled); 78 79 /** 80 * Start tethering services with the specified dhcp server range 81 */ 82 void startTethering(String dhcpRangeStart, String dhcpRangeEnd); 83 84 /** 85 * Stop currently running tethering services 86 */ 87 void stopTethering(); 88 89 /** 90 * Returns true if tethering services are started 91 */ 92 boolean isTetheringStarted(); 93 94 /** 95 * Tethers the specified interface 96 */ 97 void tetherInterface(String iface); 98 99 /** 100 * Untethers the specified interface 101 */ 102 void untetherInterface(String iface); 103 104 /** 105 * Returns a list of currently tethered interfaces 106 */ 107 String[] listTetheredInterfaces(); 108 109 /** 110 * Sets the list of DNS forwarders (in order of priority) 111 */ 112 void setDnsForwarders(in String[] dns); 113 114 /** 115 * Returns the list of DNS fowarders (in order of priority) 116 */ 117 String[] getDnsForwarders(); 118 119 /** 120 * Enables Network Address Translation between two interfaces. 121 * The address and netmask of the external interface is used for 122 * the NAT'ed network. 123 */ 124 void enableNat(String internalInterface, String externalInterface); 125 126 /** 127 * Disables Network Address Translation between two interfaces. 128 */ 129 void disableNat(String internalInterface, String externalInterface); 130 131 /** 132 ** PPPD 133 **/ 134 135 /** 136 * Returns the list of currently known TTY devices on the system 137 */ 138 String[] listTtys(); 139 140 /** 141 * Attaches a PPP server daemon to the specified TTY with the specified 142 * local/remote addresses. 143 */ 144 void attachPppd(String tty, String localAddr, String remoteAddr, String dns1Addr, 145 String dns2Addr); 146 147 /** 148 * Detaches a PPP server daemon from the specified TTY. 149 */ 150 void detachPppd(String tty); 151 152 /** 153 * Turn on USB RNDIS support - this will turn off thinks like adb/mass-storage 154 */ 155 void startUsbRNDIS(); 156 157 /** 158 * Turn off USB RNDIS support 159 */ 160 void stopUsbRNDIS(); 161 162 /** 163 * Check the status of USB RNDIS support 164 */ 165 boolean isUsbRNDISStarted(); 166 167 /** 168 * Start Wifi Access Point 169 */ 170 void startAccessPoint(in WifiConfiguration wifiConfig, String intf); 171 172 /** 173 * Stop Wifi Access Point 174 */ 175 void stopAccessPoint(); 176 177} 178