Home
last modified time | relevance | path

Searched refs:ns (Results 1 – 25 of 75) sorted by relevance

123

/packages/modules/NetworkStack/tests/unit/src/com/android/networkstack/packets/
DNeighborSolicitationTest.java203 final ByteBuffer ns = NeighborSolicitation.build( in testNeighborSolicitation_build() local
207 assertArrayEquals(ns.array(), TEST_NEIGHBOR_SOLICITATION); in testNeighborSolicitation_build()
210 private void assertNeighborSolicitation(final NeighborSolicitation ns, boolean hasSllaOption) { in assertNeighborSolicitation() argument
211 assertArrayEquals(TEST_SOURCE_MAC_ADDR, ns.ethHdr.srcMac.toByteArray()); in assertNeighborSolicitation()
212 assertArrayEquals(TEST_DST_MAC_ADDR, ns.ethHdr.dstMac.toByteArray()); in assertNeighborSolicitation()
213 assertEquals(ETH_P_IPV6, ns.ethHdr.etherType); in assertNeighborSolicitation()
214 assertEquals(IPPROTO_ICMPV6, ns.ipv6Hdr.nextHeader); in assertNeighborSolicitation()
215 assertEquals(0xff, ns.ipv6Hdr.hopLimit); in assertNeighborSolicitation()
216 assertEquals(TEST_DST_ADDR, ns.ipv6Hdr.dstIp); in assertNeighborSolicitation()
217 assertEquals(TEST_SRC_ADDR, ns.ipv6Hdr.srcIp); in assertNeighborSolicitation()
[all …]
/packages/modules/Connectivity/Tethering/src/com/android/networkstack/tethering/
DUpstreamNetworkMonitor.java311 return typeStatePair.ns; in selectPreferredUpstreamType()
403 final UpstreamNetworkState ns = new UpstreamNetworkState(newLp, prev.networkCapabilities, in updateLinkProperties() local
405 mNetworkMap.put(network, ns); in updateLinkProperties()
406 return ns; in updateLinkProperties()
410 final UpstreamNetworkState ns = updateLinkProperties(network, newLp); in handleLinkProp() local
411 if (ns != null) { in handleLinkProp()
412 mEventListener.onUpstreamEvent(EVENT_ON_LINKPROPERTIES, ns); in handleLinkProp()
445 final UpstreamNetworkState ns = mNetworkMap.get(network); in maybeHandleNetworkSwitch()
446 if (ns == null) { in maybeHandleNetworkSwitch()
457 mEventListener.onUpstreamEvent(EVENT_DEFAULT_SWITCHED, ns); in maybeHandleNetworkSwitch()
[all …]
DTetheringInterfaceUtils.java46 public static @Nullable InterfaceSet getTetheringInterfaces(UpstreamNetworkState ns) { in getTetheringInterfaces() argument
47 if (ns == null) { in getTetheringInterfaces()
51 final LinkProperties lp = ns.linkProperties; in getTetheringInterfaces()
53 final String if6 = getIPv6Interface(ns); in getTetheringInterfaces()
62 public static @Nullable String getIPv6Interface(UpstreamNetworkState ns) { in getIPv6Interface() argument
78 (ns != null) && (ns.network != null) in getIPv6Interface()
79 && (ns.linkProperties != null) && (ns.networkCapabilities != null) in getIPv6Interface()
81 && ns.linkProperties.hasIpv6DnsServer() in getIPv6Interface()
83 && ns.linkProperties.hasGlobalIpv6Address() in getIPv6Interface()
85 && allowIpv6Tethering(ns.networkCapabilities); in getIPv6Interface()
[all …]
DIPv6TetheringCoordinator.java123 public void updateUpstreamNetworkState(UpstreamNetworkState ns) { in updateUpstreamNetworkState() argument
125 Log.d(TAG, "updateUpstreamNetworkState: " + toDebugString(ns)); in updateUpstreamNetworkState()
127 if (TetheringInterfaceUtils.getIPv6Interface(ns) == null) { in updateUpstreamNetworkState()
134 && !ns.network.equals(mUpstreamNetworkState.network)) { in updateUpstreamNetworkState()
138 setUpstreamNetworkState(ns); in updateUpstreamNetworkState()
148 private void setUpstreamNetworkState(UpstreamNetworkState ns) { in setUpstreamNetworkState() argument
149 if (ns == null) { in setUpstreamNetworkState()
154 new LinkProperties(ns.linkProperties), in setUpstreamNetworkState()
155 new NetworkCapabilities(ns.networkCapabilities), in setUpstreamNetworkState()
156 new Network(ns.network)); in setUpstreamNetworkState()
[all …]
DTethering.java1646 private boolean pertainsToCurrentUpstream(UpstreamNetworkState ns) { in pertainsToCurrentUpstream() argument
1647 if (ns != null && ns.linkProperties != null && mCurrentUpstreamIfaceSet != null) { in pertainsToCurrentUpstream()
1648 for (String ifname : ns.linkProperties.getAllInterfaceNames()) { in pertainsToCurrentUpstream()
1828 final UpstreamNetworkState ns = (config.chooseUpstreamAutomatically) in chooseUpstreamType() local
1833 if (ns == null) { in chooseUpstreamType()
1840 } else if (!isCellular(ns)) { in chooseUpstreamType()
1844 setUpstreamNetwork(ns); in chooseUpstreamType()
1845 final Network newUpstream = (ns != null) ? ns.network : null; in chooseUpstreamType()
1853 (ns != null) ? ns.networkCapabilities : null); in chooseUpstreamType()
1855 mTetheringMetrics.maybeUpdateUpstreamType(ns); in chooseUpstreamType()
[all …]
DPrivateAddressCoordinator.java107 public void updateUpstreamPrefix(final UpstreamNetworkState ns) { in updateUpstreamPrefix() argument
110 if (ns.networkCapabilities != null && ns.networkCapabilities.hasTransport(TRANSPORT_VPN)) { in updateUpstreamPrefix()
111 removeUpstreamPrefix(ns.network); in updateUpstreamPrefix()
116 ns.linkProperties.getAllLinkAddresses()); in updateUpstreamPrefix()
118 removeUpstreamPrefix(ns.network); in updateUpstreamPrefix()
122 mUpstreamPrefixMap.put(ns.network, ipv4Prefixes); in updateUpstreamPrefix()
/packages/modules/Wifi/framework/java/android/net/wifi/
DWifiNetworkAgentSpecifier.java122 public boolean satisfiesNetworkSpecifier(@NonNull WifiNetworkSpecifier ns) { in satisfiesNetworkSpecifier() argument
126 checkNotNull(ns); in satisfiesNetworkSpecifier()
127 checkNotNull(ns.ssidPatternMatcher); in satisfiesNetworkSpecifier()
128 checkNotNull(ns.bssidPatternMatcher); in satisfiesNetworkSpecifier()
129 checkNotNull(ns.wifiConfiguration.allowedKeyManagement); in satisfiesNetworkSpecifier()
137 return ns.getBand() == ScanResult.WIFI_BAND_5_GHZ_LOW in satisfiesNetworkSpecifier()
138 || ns.getBand() == ScanResult.WIFI_BAND_5_GHZ; in satisfiesNetworkSpecifier()
140 return ns.getBand() == ScanResult.WIFI_BAND_5_GHZ_HIGH in satisfiesNetworkSpecifier()
141 || ns.getBand() == ScanResult.WIFI_BAND_5_GHZ; in satisfiesNetworkSpecifier()
143 return ns.getBand() == mBand; in satisfiesNetworkSpecifier()
[all …]
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/permission/service/
DPermissionChangeStorageImpl.kt53 private val ns: String? = null constant
97 out.startTag(ns, TAG_PERMISSION_CHANGES) in serialize()
98 out.attribute(ns, ATTR_VERSION, DB_VERSION.toString()) in serialize()
100 out.attribute(ns, ATTR_STORE_EXACT_TIME, storesExactTime.toString()) in serialize()
103 out.startTag(ns, TAG_PERMISSION_CHANGE) in serialize()
104 out.attribute(ns, ATTR_PACKAGE_NAME, change.packageName) in serialize()
106 out.attribute(ns, ATTR_EVENT_TIME, date) in serialize()
107 out.endTag(ns, TAG_PERMISSION_CHANGE) in serialize()
109 out.endTag(ns, TAG_PERMISSION_CHANGES) in serialize()
127 parser.require(XmlPullParser.START_TAG, ns, TAG_PERMISSION_CHANGES) in readPermissionChanges()
[all …]
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/permission/service/v33/
DPermissionDecisionStorageImpl.kt55 private val ns: String? = null constant
117 out.startTag(ns, TAG_RECENT_PERMISSION_DECISIONS) in serialize()
120 out.startTag(ns, TAG_PERMISSION_DECISION) in serialize()
121 out.attribute(ns, ATTR_PACKAGE_NAME, decision.packageName) in serialize()
122 out.attribute(ns, ATTR_PERMISSION_GROUP, decision.permissionGroupName) in serialize()
124 out.attribute(ns, ATTR_DECISION_TIME, date) in serialize()
125 out.attribute(ns, ATTR_IS_GRANTED, decision.isGranted.toString()) in serialize()
126 out.endTag(ns, TAG_PERMISSION_DECISION) in serialize()
146 parser.require(XmlPullParser.START_TAG, ns, TAG_RECENT_PERMISSION_DECISIONS) in readRecentDecisions()
156 parser.require(XmlPullParser.START_TAG, ns, TAG_PERMISSION_DECISION) in readPermissionDecision()
[all …]
/packages/modules/DnsResolver/
Dres_stats.cpp149 for (int ns = 0; ns < nscount; ns++) { in android_net_res_stats_get_usable_servers() local
150 bool usable = res_stats_usable_server(params, &stats[ns]); in android_net_res_stats_get_usable_servers()
154 usable_servers[ns] = usable; in android_net_res_stats_get_usable_servers()
159 for (int ns = 0; ns < nscount; ns++) { in android_net_res_stats_get_usable_servers() local
160 usable_servers[ns] = true; in android_net_res_stats_get_usable_servers()
Dres_send.cpp159 int* terrno, size_t* ns, int* v_circuit, int* gotsomewhere, int* rcode);
161 int* terrno, size_t ns, int* rcode);
307 for (int ns = 0; ns < nscount; ns++) { in res_set_usable_server() local
308 if (usable_servers[ns]) ++usableIndex; in res_set_usable_server()
309 if (usableIndex != selectedServer) usable_servers[ns] = false; in res_set_usable_server()
317 int ns = 0; in res_ourserver_p() local
328 return ns; in res_ourserver_p()
329 ++ns; in res_ourserver_p()
343 return ns; in res_ourserver_p()
344 ++ns; in res_ourserver_p()
[all …]
/packages/modules/Wifi/service/java/com/android/server/wifi/aware/
DWifiAwareDataPathStateManager.java1377 void updateToSupportNewRequest(NetworkRequest ns) { in updateToSupportNewRequest() argument
1378 if (sVdbg) Log.v(TAG, "updateToSupportNewRequest: ns=" + ns); in updateToSupportNewRequest()
1379 if (equivalentRequests.add(ns) && state == STATE_CONFIRMED) { in updateToSupportNewRequest()
1389 void removeSupportForRequest(NetworkRequest ns) { in removeSupportForRequest() argument
1390 if (sVdbg) Log.v(TAG, "removeSupportForRequest: ns=" + ns); in removeSupportForRequest()
1391 equivalentRequests.remove(ns); in removeSupportForRequest()
1430 WifiAwareNetworkSpecifier ns, WifiAwareStateManager mgr, in processNetworkSpecifier() argument
1436 byte[] peerMac = ns.peerMac; in processNetworkSpecifier()
1439 Log.v(TAG, "processNetworkSpecifier: networkSpecifier=" + ns); in processNetworkSpecifier()
1443 if (ns.type < 0 in processNetworkSpecifier()
[all …]
/packages/modules/Connectivity/tests/unit/java/com/android/server/connectivity/
DFullScoreTest.kt118 val ns = FullScore(0L /* policy */, KEEP_CONNECTED_NONE) in <lambda>() constant
119 assertFalse(ns.hasPolicy(POLICY_IS_VALIDATED)) in <lambda>()
120 assertFalse(ns.hasPolicy(POLICY_IS_VPN)) in <lambda>()
121 assertFalse(ns.hasPolicy(POLICY_EVER_USER_SELECTED)) in <lambda>()
122 assertFalse(ns.hasPolicy(POLICY_ACCEPT_UNVALIDATED)) in <lambda>()
123 assertTrue(ns.withPolicies(validated = true).hasPolicy(POLICY_IS_VALIDATED)) in <lambda>()
124 assertTrue(ns.withPolicies(vpn = true).hasPolicy(POLICY_IS_VPN)) in <lambda>()
125 assertTrue(ns.withPolicies(onceChosen = true).hasPolicy(POLICY_EVER_USER_SELECTED)) in <lambda>()
126 assertTrue(ns.withPolicies(acceptUnvalidated = true).hasPolicy(POLICY_ACCEPT_UNVALIDATED)) in <lambda>()
127 assertTrue(ns.withPolicies(destroyed = true).hasPolicy(POLICY_IS_DESTROYED)) in <lambda>()
[all …]
/packages/modules/Wifi/framework/java/android/net/wifi/aware/
DWifiAwareAgentNetworkSpecifier.java53 public WifiAwareAgentNetworkSpecifier(WifiAwareNetworkSpecifier ns) { in WifiAwareAgentNetworkSpecifier() argument
55 mNetworkSpecifiers.add(convert(ns)); in WifiAwareAgentNetworkSpecifier()
60 for (WifiAwareNetworkSpecifier ns : nss) { in WifiAwareAgentNetworkSpecifier()
61 mNetworkSpecifiers.add(convert(ns)); in WifiAwareAgentNetworkSpecifier()
139 public boolean satisfiesAwareNetworkSpecifier(WifiAwareNetworkSpecifier ns) { in satisfiesAwareNetworkSpecifier() argument
140 if (VDBG) Log.v(TAG, "satisfiesAwareNetworkSpecifier: ns=" + ns); in satisfiesAwareNetworkSpecifier()
141 ByteArrayWrapper nsBytes = convert(ns); in satisfiesAwareNetworkSpecifier()
159 private ByteArrayWrapper convert(WifiAwareNetworkSpecifier ns) { in convert() argument
165 ns.writeToParcel(parcel, 0); in convert()
/packages/apps/LegacyCamera/jni/feature_stab/db_vlvm/
Ddb_utilities_poly.cpp100 double lz,ms,ns,mn,m,n,lz_through2; in db_SolveQuartic() local
144 ns=lz_through2*lz_through2-c0; in db_SolveQuartic()
147 if((ms>=0.0)&&(ns>=0.0)) in db_SolveQuartic()
150 n=sqrt(ns)*db_sign(mn); in db_SolveQuartic()
172 double lz,ms,ns,mn,m,n,lz_through2; in db_SolveQuarticForced() local
216 ns=lz_through2*lz_through2-c0; in db_SolveQuarticForced()
220 if(ns<0.0) ns=0.0; in db_SolveQuarticForced()
223 n=sqrt(ns)*db_sign(mn); in db_SolveQuarticForced()
/packages/providers/MediaProvider/src/com/android/providers/media/util/
DXmpDataParser.java119 final String ns = mParser.getNamespace(); in createXmpInterface() local
122 if (NS_RDF.equals(ns) && NAME_DESCRIPTION.equals(name)) { in createXmpInterface()
131 } else if (NS_DC.equals(ns) && NAME_FORMAT.equals(name)) { in createXmpInterface()
133 } else if (NS_XMPMM.equals(ns) && NAME_DOCUMENT_ID.equals(name)) { in createXmpInterface()
135 } else if (NS_XMPMM.equals(ns) && NAME_INSTANCE_ID.equals(name)) { in createXmpInterface()
137 } else if (NS_XMPMM.equals(ns) in createXmpInterface()
140 } else if (NS_EXIF.equals(ns) && RedactionUtils.getsRedactedExifTags() in createXmpInterface()
196 final String ns = mParser.getNamespace(); in getRedactedRanges() local
198 if (NS_EXIF.equals(ns) && RedactionUtils.getsRedactedExifTags() in getRedactedRanges()
/packages/apps/Nfc/nci/jni/
DCondVar.cpp104 long ns = absoluteTime.tv_nsec + ((millisec % 1000) * 1000000); in wait() local
105 if (ns > 1000000000) { in wait()
107 absoluteTime.tv_nsec = ns - 1000000000; in wait()
109 absoluteTime.tv_nsec = ns; in wait()
/packages/modules/Connectivity/tests/common/java/android/net/
DNetworkSpecifierTest.kt47 val ns: TestNetworkSpecifier = TestNetworkSpecifier() in canBeSatisfiedBy() constant
48 val redactNs = ns.redact() in canBeSatisfiedBy()
50 assertEquals(ns.intData, redactNs.intData) in canBeSatisfiedBy()
51 assertNotEquals(ns.stringData, redactNs.stringData) in canBeSatisfiedBy()
/packages/modules/Wifi/framework/tests/src/android/net/wifi/aware/
DWifiAwareAgentNetworkSpecifierTest.java69 for (WifiAwareNetworkSpecifier ns : nsSet) { in testParcel()
70 assertTrue(dut.satisfiesAwareNetworkSpecifier(ns)); in testParcel()
71 assertTrue(rereadDut.satisfiesAwareNetworkSpecifier(ns)); in testParcel()
81 WifiAwareNetworkSpecifier ns = getMockNetworkSpecifier(6); in testEmptyDoesntMatchAnything() local
82 collector.checkThat("No match expected", ns.canBeSatisfiedBy(dut), equalTo(false)); in testEmptyDoesntMatchAnything()
DWifiAwareManagerTest.java1109 WifiAwareNetworkSpecifier ns = in testNetworkSpecifierWithClient() local
1117 equalTo(ns.role)); in testNetworkSpecifierWithClient()
1118 collector.checkThat("client_id", clientId, equalTo(ns.clientId)); in testNetworkSpecifierWithClient()
1119 collector.checkThat("session_id", sessionId, equalTo(ns.sessionId)); in testNetworkSpecifierWithClient()
1120 collector.checkThat("peer_id", peerHandle.peerId, equalTo(ns.peerId)); in testNetworkSpecifierWithClient()
1131 ns = (WifiAwareNetworkSpecifier) publishSession.getValue().createNetworkSpecifierPmk( in testNetworkSpecifierWithClient()
1138 equalTo(ns.role)); in testNetworkSpecifierWithClient()
1139 collector.checkThat("client_id", clientId, equalTo(ns.clientId)); in testNetworkSpecifierWithClient()
1140 collector.checkThat("session_id", sessionId, equalTo(ns.sessionId)); in testNetworkSpecifierWithClient()
1141 collector.checkThat("peer_id", peerHandle.peerId, equalTo(ns.peerId)); in testNetworkSpecifierWithClient()
[all …]
/packages/modules/Connectivity/staticlibs/testutils/devicetests/
DNSResponder.kt62 val ns = parseOrLog(NsHeader::class.java, buf) ?: return in replyToPacket() constant
63 val replyMacAddr = table[ns.target] ?: return in replyToPacket()
71 ns.target /* srcIp */, in replyToPacket()
74 ns.target, in replyToPacket()
/packages/apps/LegacyCamera/jni/feature_mos/src/mosaic/
DPyramid.cpp209 ImageTypeShortBase *s, *ns, *ls, *p, *np; in BorderReduceOdd() local
213 ns = s + scr->pitch; in BorderReduceOdd()
220 for (; s < ls; s = ns, ns += scr->pitch, p = np, np += in->pitch) { in BorderReduceOdd()
231 ns = s + out->pitch; in BorderReduceOdd()
237 for (; s < ls; s = ns, ns += out->pitch, p = np, np += pitch2) { in BorderReduceOdd()
/packages/modules/Connectivity/Tethering/tests/privileged/src/android/net/ip/
DDadProxyTest.java309 ByteBuffer ns = createDadPacket(NeighborPacketForwarder.ICMPV6_NEIGHBOR_SOLICITATION); in testNsForwardingFromTetherToUpstream() local
311 ByteBuffer out = copy(ns); in testNsForwardingFromTetherToUpstream()
314 receivePacketAndExpectForwarded(ns, mTetheredPacketReader, out, mUpstreamPacketReader); in testNsForwardingFromTetherToUpstream()
320 ByteBuffer ns = createDadPacket(NeighborPacketForwarder.ICMPV6_NEIGHBOR_SOLICITATION); in testNsForwardingFromUpstreamToTether() local
322 ByteBuffer out = copy(ns); in testNsForwardingFromUpstreamToTether()
323 updateSrcMac(ns, mUpstreamParams); in testNsForwardingFromUpstreamToTether()
325 receivePacketAndExpectNotForwarded(ns, mUpstreamPacketReader, out, mTetheredPacketReader); in testNsForwardingFromUpstreamToTether()
/packages/modules/NetworkStack/tests/integration/common/android/net/ip/
DIpClientIntegrationTestCommon.java2073 final NeighborSolicitation ns = parseNeighborSolicitationOrNull(packet);
2074 assertNotNull("Invalid neighbour solicitation received", ns);
2075 return ns;
3788 private void assertMulticastNsFromIpv6Gua(final NeighborSolicitation ns) throws Exception {
3794 assertEquals(etherMulticast, ns.ethHdr.dstMac);
3795 assertEquals(ETH_P_IPV6, ns.ethHdr.etherType);
3796 assertEquals(IPPROTO_ICMPV6, ns.ipv6Hdr.nextHeader);
3797 assertEquals(0xff, ns.ipv6Hdr.hopLimit);
3799 final LinkAddress srcIp = new LinkAddress(ns.ipv6Hdr.srcIp.getHostAddress() + "/64");
3801 assertEquals(solicitedNodeMulticast, ns.ipv6Hdr.dstIp);
[all …]
/packages/modules/Wifi/service/tests/wifitests/src/com/android/server/wifi/aware/
DWifiAwareDataPathStateManagerTest.java1519 WifiAwareNetworkSpecifier ns = in testDataPathInitiatorResponderMismatchUtility() local
1521 ns = new WifiAwareNetworkSpecifier( in testDataPathInitiatorResponderMismatchUtility()
1522 ns.type, in testDataPathInitiatorResponderMismatchUtility()
1523 1 - ns.role, // corruption hack in testDataPathInitiatorResponderMismatchUtility()
1524 ns.clientId, in testDataPathInitiatorResponderMismatchUtility()
1525 ns.sessionId, in testDataPathInitiatorResponderMismatchUtility()
1526 ns.peerId, in testDataPathInitiatorResponderMismatchUtility()
1527 ns.peerMac, in testDataPathInitiatorResponderMismatchUtility()
1528 ns.getWifiAwareDataPathSecurityConfig().getPmk(), in testDataPathInitiatorResponderMismatchUtility()
1529 ns.getWifiAwareDataPathSecurityConfig().getPskPassphrase(), in testDataPathInitiatorResponderMismatchUtility()
[all …]

123