Home
last modified time | relevance | path

Searched refs:netId (Results 1 – 25 of 78) sorted by relevance

1234

/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/
DWifiNetworkSelectorTestUtil.java164 int netId = 0; in generateWifiConfigurations() local
173 id = new Integer(netId); in generateWifiConfigurations()
175 netId++; in generateWifiConfigurations()
201 public WifiConfiguration answer(int netId) { in prepareConfigStore()
203 if (netId == config.networkId) { in prepareConfigStore()
225 for (int netId = 0; netId < configs.length; netId++) { in prepareConfigStore()
226 savedNetworks.add(new WifiConfiguration(configs[netId])); in prepareConfigStore()
233 public boolean answer(int netId) { in prepareConfigStore()
234 if (netId >= 0 && netId < configs.length) { in prepareConfigStore()
235 configs[netId].getNetworkSelectionStatus().setCandidate(null); in prepareConfigStore()
[all …]
/frameworks/base/core/java/android/net/
DNetwork.java69 public final int netId; field in Network
114 public Network(int netId) { in Network() argument
115 this(netId, false); in Network()
121 public Network(int netId, boolean privateDnsBypass) { in Network() argument
122 this.netId = netId; in Network()
132 this(that.netId, that.mPrivateDnsBypass); in Network()
170 return new Network(netId, true); in getPrivateDnsBypassingCopy()
181 return netId; in getNetId()
194 ? (int) (0x80000000L | (long) netId) // Non-portable DNS resolution flag. in getNetIdForResolv()
195 : netId; in getNetIdForResolv()
[all …]
DConnectivityMetricsEvent.java36 public int netId; field in ConnectivityMetricsEvent
48 netId = in.readInt(); in ConnectivityMetricsEvent()
74 dest.writeInt(netId); in writeToParcel()
83 if (netId != 0) { in toString()
84 buffer.append(", ").append("netId=").append(netId); in toString()
DINetdEventCallback.aidl44 void onDnsEvent(int netId, int eventType, int returnCode, String hostname, in onDnsEvent() argument
58 void onNat64PrefixEvent(int netId, boolean added, @utf8InCpp String prefixString, in onNat64PrefixEvent() argument
70 void onPrivateDnsValidationEvent(int netId, String ipAddress, String hostname, in onPrivateDnsValidationEvent() argument
DNetworkUtils.java70 public native static boolean bindProcessToNetwork(int netId); in bindProcessToNetwork() argument
86 public native static boolean bindProcessToNetworkForHostResolution(int netId); in bindProcessToNetworkForHostResolution() argument
93 public native static int bindSocketToNetwork(int socketfd, int netId); in bindSocketToNetwork() argument
116 public native static boolean queryUserAccess(int uid, int netId); in queryUserAccess() argument
125 int netId, byte[] msg, int msglen, int flags) throws ErrnoException; in resNetworkSend() argument
135 int netId, String dname, int nsClass, int nsType, int flags) throws ErrnoException; in resNetworkQuery() argument
/frameworks/base/core/java/android/net/metrics/
DNetworkMetrics.java41 public final int netId; field in NetworkMetrics
55 public NetworkMetrics(int netId, long transports, TokenBucket tb) { in NetworkMetrics() argument
56 this.netId = netId; in NetworkMetrics()
59 new ConnectStats(netId, transports, tb, CONNECT_LATENCY_MAXIMUM_RECORDS); in NetworkMetrics()
60 this.dnsMetrics = new DnsEvent(netId, transports, INITIAL_DNS_BATCH_SIZE); in NetworkMetrics()
61 this.summary = new Summary(netId, transports); in NetworkMetrics()
80 pendingSummary = new Summary(netId, transports); in addDnsResult()
90 pendingSummary = new Summary(netId, transports); in addConnectResult()
102 pendingSummary = new Summary(netId, transports); in addTcpStatsResult()
112 public final int netId; field in NetworkMetrics.Summary
[all …]
DDnsEvent.java34 public final int netId; field in DnsEvent
53 public DnsEvent(int netId, long transports, int initialCapacity) { in DnsEvent() argument
54 this.netId = netId; in DnsEvent()
89 new StringBuilder("DnsEvent(").append("netId=").append(netId).append(", "); in toString()
DConnectStats.java36 public final int netId; field in ConnectStats
56 public ConnectStats(int netId, long transports, TokenBucket tb, int maxLatencyRecords) { in ConnectStats() argument
57 this.netId = netId; in ConnectStats()
123 new StringBuilder("ConnectStats(").append("netId=").append(netId).append(", "); in toString()
DDefaultNetworkEvent.java36 public int netId = NETID_UNSET; field in DefaultNetworkEvent
65 j.add("netId=" + netId); in toString()
/frameworks/base/services/core/java/com/android/server/connectivity/
DDnsManager.java151 final public int netId; field in DnsManager.PrivateDnsValidationUpdate
156 public PrivateDnsValidationUpdate(int netId, InetAddress ipAddress, in PrivateDnsValidationUpdate() argument
158 this.netId = netId; in PrivateDnsValidationUpdate()
273 mPrivateDnsMap.remove(network.netId); in removeNetwork()
274 mPrivateDnsValidationMap.remove(network.netId); in removeNetwork()
275 mTransportsMap.remove(network.netId); in removeNetwork()
276 mLinkPropertiesMap.remove(network.netId); in removeNetwork()
282 return mPrivateDnsMap.getOrDefault(network.netId, PRIVATE_DNS_OFF); in getPrivateDnsConfig()
288 ? mPrivateDnsMap.put(network.netId, cfg) in updatePrivateDns()
289 : mPrivateDnsMap.remove(network.netId); in updatePrivateDns()
[all …]
DNetdEventListenerService.java167 private NetworkMetrics getMetricsForNetwork(long timeMs, int netId) { in getMetricsForNetwork() argument
169 NetworkMetrics metrics = mNetworkMetrics.get(netId); in getMetricsForNetwork()
172 metrics = new NetworkMetrics(netId, getTransports(netId), mConnectTb); in getMetricsForNetwork()
173 mNetworkMetrics.put(netId, metrics); in getMetricsForNetwork()
201 public synchronized void onDnsEvent(int netId, int eventType, int returnCode, int latencyMs, in onDnsEvent() argument
205 getMetricsForNetwork(timestamp, netId).addDnsResult(eventType, returnCode, latencyMs); in onDnsEvent()
209 callback.onDnsEvent(netId, eventType, returnCode, hostname, ipAddresses, in onDnsEvent()
218 public synchronized void onNat64PrefixEvent(int netId, in onNat64PrefixEvent() argument
223 callback.onNat64PrefixEvent(netId, added, prefixString, prefixLength); in onNat64PrefixEvent()
231 public synchronized void onPrivateDnsValidationEvent(int netId, in onPrivateDnsValidationEvent() argument
[all …]
DLingerMonitor.java117 if (mNotifications.valueAt(i) == toNai.network.netId) { in getNotificationSource()
125 return mEverNotified.get(nai.network.netId, false); in everNotified()
156 mNotifier.showNotification(fromNai.network.netId, NotificationType.NETWORK_SWITCH, in showNotification()
208 mNotifications.put(fromNai.network.netId, toNai.network.netId); in notify()
209 mEverNotified.put(fromNai.network.netId, true); in notify()
295 mNotifications.delete(nai.network.netId); in noteDisconnect()
296 mEverNotified.delete(nai.network.netId); in noteDisconnect()
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/
DNetworkUpdateResult.java22 int netId; field in NetworkUpdateResult
29 netId = id; in NetworkUpdateResult()
36 netId = INVALID_NETWORK_ID; in NetworkUpdateResult()
43 netId = id; in setNetworkId()
47 return netId; in getNetworkId()
71 return netId != INVALID_NETWORK_ID; in isSuccess()
DWifiScoreReport.java104 int netId = 0; in calculateAndReportScore() local
109 netId = network.netId; in calculateAndReportScore()
163 logLinkMetrics(wifiInfo, millis, netId, s1, s2, score); in calculateAndReportScore()
249 private void logLinkMetrics(WifiInfo wifiInfo, long now, int netId, in logLinkMetrics() argument
267 timestamp, mSessionNumber, netId, in logLinkMetrics()
/frameworks/base/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/unit/
DWifiClientTest.java121 int netId = mWifiManager.addNetwork(config); in testAddRemoveNetwork() local
122 assertTrue(netId != -1); in testAddRemoveNetwork()
128 if (c.networkId == netId && c.SSID.equals(config.SSID)) { in testAddRemoveNetwork()
135 boolean ret = mWifiManager.removeNetwork(netId); in testAddRemoveNetwork()
142 if (c.networkId == netId) { in testAddRemoveNetwork()
158 int netId = mWifiManager.addNetwork(config); in testEnableDisableNetwork() local
159 assertTrue(netId != -1); in testEnableDisableNetwork()
162 boolean ret = mWifiManager.enableNetwork(netId, true); in testEnableDisableNetwork()
168 if (c.networkId == netId) { in testEnableDisableNetwork()
176 ret = mWifiManager.disableNetwork(netId); in testEnableDisableNetwork()
[all …]
/frameworks/base/services/core/java/com/android/server/
DNetIdManager.java58 int netId = lastId; in getNextAvailableNetIdLocked() local
60 netId = netId < mMaxNetId ? netId + 1 : MIN_NET_ID; in getNextAvailableNetIdLocked()
61 if (!netIdInUse.get(netId)) { in getNextAvailableNetIdLocked()
62 return netId; in getNextAvailableNetIdLocked()
DConnectivityService.java919 public boolean queryUserAccess(int uid, int netId) { in queryUserAccess() argument
920 return NetworkUtils.queryUserAccess(uid, netId); in queryUserAccess()
1289 return getNetworkAgentInfoForNetId(network.netId); in getNetworkAgentInfoForNetwork()
1292 private NetworkAgentInfo getNetworkAgentInfoForNetId(int netId) { in getNetworkAgentInfoForNetId() argument
1294 return mNetworkForNetId.get(netId); in getNetworkAgentInfoForNetId()
1380 "%s %d(%d) on netId %d", action, nri.mUid, nri.request.requestId, net.netId)); in maybeLogBlockedStatusChanged()
1889 int netId; in requestRouteToHostAddress() local
1892 netId = nai.network.netId; in requestRouteToHostAddress()
1894 boolean ok = addLegacyRouteToHost(lp, addr, netId, uid); in requestRouteToHostAddress()
1902 private boolean addLegacyRouteToHost(LinkProperties lp, InetAddress addr, int netId, int uid) { in addLegacyRouteToHost() argument
[all …]
/frameworks/base/core/java/android/os/
DINetworkManagementService.aidl112 void addRoute(int netId, in RouteInfo route); in addRoute() argument
117 void removeRoute(int netId, in RouteInfo route); in removeRoute() argument
331 void addVpnUidRanges(int netId, in UidRange[] ranges); in addVpnUidRanges() argument
336 void removeVpnUidRanges(int netId, in UidRange[] ranges); in removeVpnUidRanges() argument
356 void addInterfaceToNetwork(String iface, int netId); in addInterfaceToNetwork() argument
361 void removeInterfaceFromNetwork(String iface, int netId); in removeInterfaceFromNetwork() argument
363 void addLegacyRouteForNetId(int netId, in RouteInfo routeInfo, int uid); in addLegacyRouteForNetId() argument
365 void setDefaultNetId(int netId); in setDefaultNetId() argument
373 void setNetworkPermission(int netId, int permission); in setNetworkPermission() argument
/frameworks/base/core/jni/
Dandroid_net_NetUtils.cpp105 static jboolean android_net_utils_bindProcessToNetwork(JNIEnv *env, jobject thiz, jint netId) in android_net_utils_bindProcessToNetwork() argument
107 return (jboolean) !setNetworkForProcess(netId); in android_net_utils_bindProcessToNetwork()
116 jint netId) in android_net_utils_bindProcessToNetworkForHostResolution() argument
118 return (jboolean) !setNetworkForResolv(netId); in android_net_utils_bindProcessToNetworkForHostResolution()
122 jint netId) in android_net_utils_bindSocketToNetwork() argument
124 return setNetworkForSocket(netId, socket); in android_net_utils_bindSocketToNetwork()
132 static jboolean android_net_utils_queryUserAccess(JNIEnv *env, jobject thiz, jint uid, jint netId) in android_net_utils_queryUserAccess() argument
134 return (jboolean) !queryUserAccess(uid, netId); in android_net_utils_queryUserAccess()
146 static jobject android_net_utils_resNetworkQuery(JNIEnv *env, jobject thiz, jint netId, in android_net_utils_resNetworkQuery() argument
156 int fd = resNetworkQuery(netId, queryname.data(), ns_class, ns_type, flags); in android_net_utils_resNetworkQuery()
[all …]
/frameworks/base/wifi/java/android/net/wifi/p2p/
DWifiP2pGroupList.java44 public void onDeleteGroup(int netId); in onDeleteGroup() argument
58 protected void entryRemoved(boolean evicted, Integer netId, in WifiP2pGroupList()
99 public void remove(int netId) { in remove() argument
100 mGroups.remove(netId); in remove()
182 public String getOwnerAddr(int netId) { in getOwnerAddr() argument
183 WifiP2pGroup grp = mGroups.get(netId); in getOwnerAddr()
199 public boolean contains(int netId) { in contains() argument
202 if (netId == grp.getNetworkId()) { in contains()
DWifiP2pConfig.java108 public int netId = WifiP2pGroup.PERSISTENT_NET_ID; field in WifiP2pConfig
167 sbuf.append("\n persist: ").append(netId); in toString()
186 netId = source.netId; in WifiP2pConfig()
198 dest.writeInt(netId); in writeToParcel()
212 config.netId = in.readInt();
458 config.netId = mNetId; in build()
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/p2p/
DWifiP2pNative.java338 public boolean removeP2pNetwork(int netId) { in removeP2pNetwork() argument
339 return mSupplicantP2pIfaceHal.removeNetwork(netId); in removeP2pNetwork()
576 public boolean p2pGroupAdd(int netId) { in p2pGroupAdd() argument
577 return mSupplicantP2pIfaceHal.groupAdd(netId, true); in p2pGroupAdd()
603 (config.netId == WifiP2pGroup.PERSISTENT_NET_ID), in p2pGroupAdd()
658 public boolean p2pReinvoke(int netId, String deviceAddress) { in p2pReinvoke() argument
659 return mSupplicantP2pIfaceHal.reinvoke(netId, deviceAddress); in p2pReinvoke()
805 public String getP2pClientList(int netId) { in getP2pClientList() argument
806 return mSupplicantP2pIfaceHal.getClientList(netId); in getP2pClientList()
816 public boolean setP2pClientList(int netId, String list) { in setP2pClientList() argument
[all …]
/frameworks/base/core/java/com/android/server/net/
DBaseNetdEventCallback.java29 public void onDnsEvent(int netId, int eventType, int returnCode, String hostname, in onDnsEvent() argument
35 public void onNat64PrefixEvent(int netId, boolean added, String prefixString, in onNat64PrefixEvent() argument
41 public void onPrivateDnsValidationEvent(int netId, String ipAddress, in onPrivateDnsValidationEvent() argument
/frameworks/base/tests/net/common/java/android/net/metrics/
DIpConnectivityLogTest.java138 private ConnectivityMetricsEvent makeExpectedEvent(long timestamp, int netId, long transports, in makeExpectedEvent() argument
143 ev.netId = netId; in makeExpectedEvent()
154 assertEquals(expected.netId, got.netId); in assertEventsEqual()
/frameworks/base/tests/net/java/com/android/server/connectivity/
DLingerMonitorTest.java347 verify(mNotifier, times(1)).showNotification(eq(from.network.netId), in verifyNotification()
351 NetworkAgentInfo nai(int netId, int transport, int networkType, String networkTypeName) { in nai() argument
356 NetworkAgentInfo nai = new NetworkAgentInfo(null, null, new Network(netId), info, null, in nai()
363 NetworkAgentInfo wifiNai(int netId) { in wifiNai() argument
364 return nai(netId, NetworkCapabilities.TRANSPORT_WIFI, in wifiNai()
368 NetworkAgentInfo cellNai(int netId) { in cellNai() argument
369 return nai(netId, NetworkCapabilities.TRANSPORT_CELLULAR, in cellNai()

1234