1 /** 2 * Copyright (c) 2019, The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing perNmissions and 14 * limitations under the License. 15 */ 16 package android.net.ip; 17 18 import android.net.Layer2InformationParcelable; 19 import android.net.ProxyInfo; 20 import android.net.ProvisioningConfigurationParcelable; 21 import android.net.NattKeepalivePacketDataParcelable; 22 import android.net.TcpKeepalivePacketDataParcelable; 23 import android.net.apf.ApfCapabilities; 24 25 /** @hide */ 26 oneway interface IIpClient { 27 /** 28 * Disable IPv4 provisioning. 29 */ 30 const int PROV_IPV4_DISABLED = 0x00; 31 32 /** 33 * Enable IPv4 provisioning using static IP addresses. 34 */ 35 const int PROV_IPV4_STATIC = 0x01; 36 37 /** 38 * Enable IPv4 provisioning using DHCP. 39 */ 40 const int PROV_IPV4_DHCP = 0x02; 41 42 /** 43 * Disable IPv6 provisioning. 44 */ 45 const int PROV_IPV6_DISABLED = 0x00; 46 47 /** 48 * Enable IPv6 provisioning via SLAAC. 49 */ 50 const int PROV_IPV6_SLAAC = 0x01; 51 52 /** 53 * Enable IPv6 Link-local only. 54 */ 55 const int PROV_IPV6_LINKLOCAL = 0x02; 56 57 /** 58 * Unset hostname setting. 59 */ 60 const int HOSTNAME_SETTING_UNSET = 0x00; 61 62 /** 63 * Send hostname to IP provisioning server. 64 */ 65 const int HOSTNAME_SETTING_SEND = 0x01; 66 67 /** 68 * Do not send hostname to IP provisioning server. 69 */ 70 const int HOSTNAME_SETTING_DO_NOT_SEND = 0x02; 71 completedPreDhcpAction()72 void completedPreDhcpAction(); confirmConfiguration()73 void confirmConfiguration(); readPacketFilterComplete(in byte[] data)74 void readPacketFilterComplete(in byte[] data); shutdown()75 void shutdown(); startProvisioning(in ProvisioningConfigurationParcelable req)76 void startProvisioning(in ProvisioningConfigurationParcelable req); stop()77 void stop(); setTcpBufferSizes(in String tcpBufferSizes)78 void setTcpBufferSizes(in String tcpBufferSizes); setHttpProxy(in ProxyInfo proxyInfo)79 void setHttpProxy(in ProxyInfo proxyInfo); setMulticastFilter(boolean enabled)80 void setMulticastFilter(boolean enabled); addKeepalivePacketFilter(int slot, in TcpKeepalivePacketDataParcelable pkt)81 void addKeepalivePacketFilter(int slot, in TcpKeepalivePacketDataParcelable pkt); removeKeepalivePacketFilter(int slot)82 void removeKeepalivePacketFilter(int slot); 83 /* Group hint is the old name for cluster */ setL2KeyAndGroupHint(in String l2Key, in String cluster)84 void setL2KeyAndGroupHint(in String l2Key, in String cluster); addNattKeepalivePacketFilter(int slot, in NattKeepalivePacketDataParcelable pkt)85 void addNattKeepalivePacketFilter(int slot, in NattKeepalivePacketDataParcelable pkt); notifyPreconnectionComplete(boolean success)86 void notifyPreconnectionComplete(boolean success); updateLayer2Information(in Layer2InformationParcelable info)87 void updateLayer2Information(in Layer2InformationParcelable info); 88 /** 89 * Update the APF capabilities. 90 * 91 * This method will update the APF capabilities used in IpClient and decide if a new APF 92 * program should be installed to filter the incoming packets based on that. So far this 93 * method only allows for the APF capabilities to go from null to non-null, and no other 94 * changes are allowed. One use case is when WiFi interface switches from secondary to 95 * primary in STA+STA mode. 96 * 97 * @param apfCapabilities the APF capabilities to update, should be non-null. 98 */ updateApfCapabilities(in ApfCapabilities apfCapabilities)99 void updateApfCapabilities(in ApfCapabilities apfCapabilities); 100 } 101