Home
last modified time | relevance | path

Searched refs:MacAddress (Results 1 – 25 of 81) sorted by relevance

1234

/frameworks/base/tests/net/java/android/net/
DMacAddressTest.java56 AddrTypeTestCase.of(MacAddress.TYPE_UNKNOWN), in testMacAddrTypes()
57 AddrTypeTestCase.of(MacAddress.TYPE_UNKNOWN, 0), in testMacAddrTypes()
58 AddrTypeTestCase.of(MacAddress.TYPE_UNKNOWN, 1, 2, 3, 4, 5), in testMacAddrTypes()
59 AddrTypeTestCase.of(MacAddress.TYPE_UNKNOWN, 1, 2, 3, 4, 5, 6, 7), in testMacAddrTypes()
60 AddrTypeTestCase.of(MacAddress.TYPE_UNICAST, 0xa0, 0xb0, 0xc0, 0xd0, 0xe0, 0xf0), in testMacAddrTypes()
61 AddrTypeTestCase.of(MacAddress.TYPE_BROADCAST, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff), in testMacAddrTypes()
62 AddrTypeTestCase.of(MacAddress.TYPE_MULTICAST, 1, 2, 3, 4, 5, 6), in testMacAddrTypes()
63 AddrTypeTestCase.of(MacAddress.TYPE_MULTICAST, 11, 22, 33, 44, 55, 66), in testMacAddrTypes()
64 AddrTypeTestCase.of(MacAddress.TYPE_MULTICAST, 33, 33, 0xaa, 0xbb, 0xcc, 0xdd) in testMacAddrTypes()
68 int got = MacAddress.macAddressType(t.addr); in testMacAddrTypes()
[all …]
/frameworks/base/core/java/android/net/
DMacAddress.java45 public final class MacAddress implements Parcelable { class
53 public static final MacAddress BROADCAST_ADDRESS = MacAddress.fromBytes(ETHER_ADDR_BROADCAST);
62 public static final MacAddress ALL_ZEROS_ADDRESS = new MacAddress(0);
84 private static final long LOCALLY_ASSIGNED_MASK = MacAddress.fromString("2:0:0:0:0:0").mAddr;
85 private static final long MULTICAST_MASK = MacAddress.fromString("1:0:0:0:0:0").mAddr;
86 private static final long OUI_MASK = MacAddress.fromString("ff:ff:ff:0:0:0").mAddr;
87 private static final long NIC_MASK = MacAddress.fromString("0:0:0:ff:ff:ff").mAddr;
88 private static final MacAddress BASE_GOOGLE_MAC = MacAddress.fromString("da:a1:19:0:0:0");
90 private static final MacAddress DEFAULT_MAC_ADDRESS =
91 MacAddress.fromString(WifiInfo.DEFAULT_MAC_ADDRESS);
[all …]
/frameworks/libs/net/common/tests/unit/src/android/net/util/
DMacAddressUtilsTest.java23 import android.net.MacAddress;
38 MacAddress[] multicastAddresses = { in testIsMulticastAddress()
40 MacAddress.fromString("ff:ff:ff:ff:ff:ff"), in testIsMulticastAddress()
41 MacAddress.fromString("07:00:d3:56:8a:c4"), in testIsMulticastAddress()
42 MacAddress.fromString("33:33:aa:bb:cc:dd"), in testIsMulticastAddress()
44 MacAddress[] unicastAddresses = { in testIsMulticastAddress()
46 MacAddress.fromString("00:00:00:00:00:00"), in testIsMulticastAddress()
47 MacAddress.fromString("00:01:44:55:66:77"), in testIsMulticastAddress()
48 MacAddress.fromString("08:00:22:33:44:55"), in testIsMulticastAddress()
49 MacAddress.fromString("06:00:00:00:00:00"), in testIsMulticastAddress()
[all …]
/frameworks/base/wifi/tests/src/android/net/wifi/
DWifiNetworkSpecifierTest.java27 import android.net.MacAddress;
68 assertEquals(MacAddress.ALL_ZEROS_ADDRESS, wifiNetworkSpecifier.bssidPatternMatcher.first); in testWifiNetworkSpecifierBuilderForOpenNetworkWithSsidPattern()
69 assertEquals(MacAddress.ALL_ZEROS_ADDRESS, wifiNetworkSpecifier.bssidPatternMatcher.second); in testWifiNetworkSpecifierBuilderForOpenNetworkWithSsidPattern()
82 .setBssidPattern(MacAddress.fromString(TEST_BSSID_OUI_BASE_ADDRESS), in testWifiNetworkSpecifierBuilderForWpa2PskNetworkWithBssidPattern()
83 MacAddress.fromString(TEST_BSSID_OUI_MASK)) in testWifiNetworkSpecifierBuilderForWpa2PskNetworkWithBssidPattern()
92 assertEquals(MacAddress.fromString(TEST_BSSID_OUI_BASE_ADDRESS), in testWifiNetworkSpecifierBuilderForWpa2PskNetworkWithBssidPattern()
94 assertEquals(MacAddress.fromString(TEST_BSSID_OUI_MASK), in testWifiNetworkSpecifierBuilderForWpa2PskNetworkWithBssidPattern()
115 .setBssid(MacAddress.fromString(TEST_BSSID)) in testWifiNetworkSpecifierBuilderForWpa2EapHiddenNetworkWithSsidAndBssid()
125 assertEquals(MacAddress.fromString(TEST_BSSID), in testWifiNetworkSpecifierBuilderForWpa2EapHiddenNetworkWithSsidAndBssid()
127 assertEquals(MacAddress.BROADCAST_ADDRESS, in testWifiNetworkSpecifierBuilderForWpa2EapHiddenNetworkWithSsidAndBssid()
[all …]
DWifiNetworkAgentSpecifierTest.java23 import android.net.MacAddress;
199 Pair<MacAddress, MacAddress> bssidPattern = in testWifiNetworkAgentSpecifierSatisfiesNetworkSpecifierWithSsidPattern()
200 Pair.create(MacAddress.ALL_ZEROS_ADDRESS, MacAddress.ALL_ZEROS_ADDRESS); in testWifiNetworkAgentSpecifierSatisfiesNetworkSpecifierWithSsidPattern()
227 Pair<MacAddress, MacAddress> bssidPattern = in testWifiNetworkAgentSpecifierSatisfiesNetworkSpecifierWithBssidPattern()
228 Pair.create(MacAddress.fromString(TEST_BSSID_OUI_BASE_ADDRESS), in testWifiNetworkAgentSpecifierSatisfiesNetworkSpecifierWithBssidPattern()
229 MacAddress.fromString(TEST_BSSID_OUI_MASK)); in testWifiNetworkAgentSpecifierSatisfiesNetworkSpecifierWithBssidPattern()
256 Pair<MacAddress, MacAddress> bssidPattern = in testWifiNetworkAgentSpecifierSatisfiesNetworkSpecifierWithSsidAndBssidPattern()
257 Pair.create(MacAddress.fromString(TEST_BSSID_OUI_BASE_ADDRESS), in testWifiNetworkAgentSpecifierSatisfiesNetworkSpecifierWithSsidAndBssidPattern()
258 MacAddress.fromString(TEST_BSSID_OUI_MASK)); in testWifiNetworkAgentSpecifierSatisfiesNetworkSpecifierWithSsidAndBssidPattern()
290 Pair<MacAddress, MacAddress> bssidPattern = in testWifiNetworkAgentSpecifierDoesNotSatisfyNetworkSpecifierWithSsidPattern()
[all …]
DWifiConfigurationTest.java25 import android.net.MacAddress;
67 MacAddress macBeforeParcel = config.getRandomizedMacAddress(); in testWifiConfigurationParcel()
200 MacAddress defaultMac = MacAddress.fromString(WifiInfo.DEFAULT_MAC_ADDRESS); in testGetOrCreateRandomizedMacAddress_SavesAndReturnsSameAddress()
203 MacAddress firstMacAddress = config.getOrCreateRandomizedMacAddress(); in testGetOrCreateRandomizedMacAddress_SavesAndReturnsSameAddress()
204 MacAddress secondMacAddress = config.getOrCreateRandomizedMacAddress(); in testGetOrCreateRandomizedMacAddress_SavesAndReturnsSameAddress()
213 MacAddress defaultMac = MacAddress.fromString(WifiInfo.DEFAULT_MAC_ADDRESS); in testSetRandomizedMacAddress_ChangesSavedAddress()
216 MacAddress macToChangeInto = MacAddressUtils.createRandomUnicastAddress(); in testSetRandomizedMacAddress_ChangesSavedAddress()
218 MacAddress macAfterChange = config.getRandomizedMacAddress(); in testSetRandomizedMacAddress_ChangesSavedAddress()
227 MacAddress defaultMac = MacAddress.fromString(WifiInfo.DEFAULT_MAC_ADDRESS); in testGetOrCreateRandomizedMacAddress_ReRandomizesInvalidAddress()
228 MacAddress macAddressZeroes = MacAddress.ALL_ZEROS_ADDRESS; in testGetOrCreateRandomizedMacAddress_ReRandomizesInvalidAddress()
[all …]
DWifiClientTest.java25 import android.net.MacAddress;
38 private static final MacAddress MAC_ADDRESS = MacAddress.fromString(MAC_ADDRESS_STRING);
68 final MacAddress macAddressNotEquals = MacAddress.fromString("00:00:00:00:00:00"); in testWifiClientNotEquals()
/frameworks/base/wifi/java/android/net/wifi/
DWifiNetworkSpecifier.java24 import android.net.MacAddress;
51 private static final Pair<MacAddress, MacAddress> MATCH_NO_BSSID_PATTERN1 =
52 new Pair(MacAddress.BROADCAST_ADDRESS, MacAddress.BROADCAST_ADDRESS);
53 private static final Pair<MacAddress, MacAddress> MATCH_NO_BSSID_PATTERN2 =
54 new Pair(MacAddress.ALL_ZEROS_ADDRESS, MacAddress.BROADCAST_ADDRESS);
55 private static final Pair<MacAddress, MacAddress> MATCH_ALL_BSSID_PATTERN =
56 new Pair(MacAddress.ALL_ZEROS_ADDRESS, MacAddress.ALL_ZEROS_ADDRESS);
57 private static final MacAddress MATCH_EXACT_BSSID_PATTERN_MASK =
58 MacAddress.BROADCAST_ADDRESS;
68 private @Nullable Pair<MacAddress, MacAddress> mBssidPatternMatcher;
[all …]
DWifiClient.java21 import android.net.MacAddress;
33 private final MacAddress mMacAddress;
39 public MacAddress getMacAddress() { in getMacAddress()
48 public WifiClient(@NonNull MacAddress macAddress) { in WifiClient()
DWifiNetworkAgentSpecifier.java24 import android.net.MacAddress;
143 final MacAddress bssid = MacAddress.fromString(this.mWifiConfiguration.BSSID); in satisfiesNetworkSpecifier()
144 final MacAddress matchBaseAddress = ns.bssidPatternMatcher.first; in satisfiesNetworkSpecifier()
145 final MacAddress matchMask = ns.bssidPatternMatcher.second; in satisfiesNetworkSpecifier()
/frameworks/libs/net/common/framework/android/net/util/
DMacAddressUtils.java21 import android.net.MacAddress;
36 MacAddress.fromString("2:0:0:0:0:0").toByteArray());
38 MacAddress.fromString("1:0:0:0:0:0").toByteArray());
40 MacAddress.fromString("ff:ff:ff:0:0:0").toByteArray());
42 MacAddress.fromString("0:0:0:ff:ff:ff").toByteArray());
50 public static boolean isMulticastAddress(@NonNull MacAddress address) { in isMulticastAddress()
62 public static @NonNull MacAddress createRandomUnicastAddress() { in createRandomUnicastAddress()
77 public static @NonNull MacAddress createRandomUnicastAddress(@Nullable MacAddress base, in createRandomUnicastAddress()
89 MacAddress mac = MacAddress.fromBytes(byteAddrFromLongAddr(addr)); in createRandomUnicastAddress()
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/
DWifiConfigurationUtil.java23 import android.net.MacAddress;
71 private static final Pair<MacAddress, MacAddress> MATCH_NONE_BSSID_PATTERN =
72 new Pair(MacAddress.BROADCAST_ADDRESS, MacAddress.BROADCAST_ADDRESS);
73 private static final Pair<MacAddress, MacAddress> MATCH_ALL_BSSID_PATTERN =
74 new Pair(MacAddress.ALL_ZEROS_ADDRESS, MacAddress.ALL_ZEROS_ADDRESS);
384 private static boolean validateBssid(MacAddress bssid) { in validateBssid()
386 if (bssid.getAddressType() != MacAddress.TYPE_UNICAST) { in validateBssid()
399 MacAddress bssidMacAddress; in validateBssid()
401 bssidMacAddress = MacAddress.fromString(bssid); in validateBssid()
634 Pair<MacAddress, MacAddress> bssidPatternMatcher) { in validateBssidPattern() argument
[all …]
DMacAddressUtil.java19 import android.net.MacAddress;
60 public MacAddress calculatePersistentMacForConfiguration(WifiConfiguration config, in calculatePersistentMacForConfiguration()
87 MacAddress macAddress = MacAddress.fromBytes(Arrays.copyOfRange(bf.array(), 2, 8)); in calculatePersistentMacForConfiguration()
DWifiCandidates.java21 import android.net.MacAddress;
297 public final MacAddress bssid;
301 MacAddress bssid, in Key()
326 @Nullable private MacAddress mCurrentBssid = null;
336 mCurrentBssid = MacAddress.fromString(currentBssid); in setCurrent()
356 MacAddress bssid; in add()
358 bssid = MacAddress.fromString(scanResult.BSSID); in add()
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/
DWifiNetworkFactoryTest.java40 import android.net.MacAddress;
713 Pair<MacAddress, MacAddress> bssidPatternMatch = in testNetworkSpecifierMatchSuccessUsingLiteralSsidMatch()
714 Pair.create(MacAddress.ALL_ZEROS_ADDRESS, MacAddress.ALL_ZEROS_ADDRESS); in testNetworkSpecifierMatchSuccessUsingLiteralSsidMatch()
756 Pair<MacAddress, MacAddress> bssidPatternMatch = in testNetworkSpecifierMatchSuccessUsingPrefixSsidMatch()
757 Pair.create(MacAddress.ALL_ZEROS_ADDRESS, MacAddress.ALL_ZEROS_ADDRESS); in testNetworkSpecifierMatchSuccessUsingPrefixSsidMatch()
800 Pair<MacAddress, MacAddress> bssidPatternMatch = in testNetworkSpecifierMatchSuccessUsingLiteralBssidMatch()
801 Pair.create(MacAddress.fromString(TEST_BSSID_1), MacAddress.BROADCAST_ADDRESS); in testNetworkSpecifierMatchSuccessUsingLiteralBssidMatch()
843 Pair<MacAddress, MacAddress> bssidPatternMatch = in testNetworkSpecifierMatchSuccessUsingOuiPrefixBssidMatch()
844 Pair.create(MacAddress.fromString(TEST_BSSID_1_2_OUI), in testNetworkSpecifierMatchSuccessUsingOuiPrefixBssidMatch()
845 MacAddress.fromString(TEST_BSSID_OUI_MASK)); in testNetworkSpecifierMatchSuccessUsingOuiPrefixBssidMatch()
[all …]
DWifiConfigurationUtilTest.java23 import android.net.MacAddress;
596 Pair.create(MacAddress.ALL_ZEROS_ADDRESS, MacAddress.ALL_ZEROS_ADDRESS), in testValidateNetworkSpecifierPositiveCases_SsidPattern()
610 Pair.create(MacAddress.fromString(TEST_BSSID), MacAddress.BROADCAST_ADDRESS), in testValidateNetworkSpecifierPositiveCases_BssidPattern()
624 Pair.create(MacAddress.fromString(TEST_BSSID), MacAddress.BROADCAST_ADDRESS), in testValidateNetworkSpecifierPositiveCases_BothSsidPatternAndBssidPattern()
638 Pair.create(MacAddress.ALL_ZEROS_ADDRESS, MacAddress.ALL_ZEROS_ADDRESS), in testValidateNetworkSpecifierNegativeCases_NoSsidBssid()
652 Pair.create(MacAddress.ALL_ZEROS_ADDRESS, MacAddress.ALL_ZEROS_ADDRESS), in testValidateNetworkSpecifierNegativeCases_MatchNoneSsidPattern()
666 Pair.create(MacAddress.BROADCAST_ADDRESS, MacAddress.BROADCAST_ADDRESS), in testValidateNetworkSpecifierNegativeCases_MatchNoneBssidPattern()
680 Pair.create(MacAddress.fromString(TEST_BSSID), MacAddress.ALL_ZEROS_ADDRESS), in testValidateNetworkSpecifierNegativeCases_InvalidBssidPattern()
694 Pair.create(MacAddress.ALL_ZEROS_ADDRESS, MacAddress.ALL_ZEROS_ADDRESS), in testValidateNetworkSpecifierNegativeCases_NoSsidPatternForHiddenNetwork()
/frameworks/base/packages/Tethering/src/com/android/networkstack/tethering/
DConnectedClientsTracker.java21 import android.net.MacAddress;
86 final Set<MacAddress> wifiClientMacs = getClientMacs(mLastWifiClients); in updateConnectedClients()
89 final Map<MacAddress, TetheredClient> clientsMap = new HashMap<>(); in updateConnectedClients()
107 for (MacAddress client : wifiClientMacs) { in updateConnectedClients()
120 private static void addLease(Map<MacAddress, TetheredClient> clientsMap, TetheredClient lease) { in addLease() argument
176 private static Set<MacAddress> getClientMacs(@NonNull List<WifiClient> clients) { in getClientMacs()
177 final Set<MacAddress> macs = new HashSet<>(clients.size()); in getClientMacs()
/frameworks/base/wifi/tests/src/android/net/wifi/rtt/
DWifiRttManagerTest.java28 import android.net.MacAddress;
83 new RangingResult(RangingResult.STATUS_SUCCESS, MacAddress.BROADCAST_ADDRESS, 15, 5, in testRangeSuccess()
140 MacAddress mac1 = MacAddress.fromString("00:01:02:03:04:05"); in testRangingRequestParcel()
174 MacAddress mac1 = MacAddress.fromString("00:01:02:03:04:05"); in testRangingRequestAtLimit()
199 MacAddress mac1 = MacAddress.fromString("00:01:02:03:04:05"); in testRangingRequestPastLimit()
233 final MacAddress mac = MacAddress.fromString("00:01:02:03:04:05"); in testRangingResultsParcel()
283 final MacAddress mac = MacAddress.fromString("00:01:02:03:04:05"); in testRangingResultsEqualityLciLcr()
308 ResponderConfig config = new ResponderConfig(MacAddress.fromString("00:01:02:03:04:05"), in testResponderConfigParcel()
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/rtt/
DRttTestUtils.java21 import android.net.MacAddress;
71 MacAddress mac1 = MacAddress.fromString("08:09:08:07:06:05"); in getDummyRangingRequest()
146 MacAddress.fromString("10:01:02:03:04:05"), rangeCmBase++, in getDummyRangingResults()
150 MacAddress.fromString("1A:0B:0C:0D:0E:0F"), rangeCmBase++, in getDummyRangingResults()
154 MacAddress.fromString("08:09:08:07:06:05"), rangeCmBase++, in getDummyRangingResults()
166 MacAddress overrideMac) { in getMatchingRttResult()
DRttNativeTest.java44 import android.net.MacAddress;
144 equalTo(MacAddress.fromString("00:01:02:03:04:00").toByteArray())); in testRangeRequest()
152 equalTo(MacAddress.fromString("0A:0B:0C:0D:0E:00").toByteArray())); in testRangeRequest()
160 equalTo(MacAddress.fromString("08:09:08:07:06:05").toByteArray())); in testRangeRequest()
194 equalTo(MacAddress.fromString("00:01:02:03:04:00").toByteArray())); in testRangeRequestNotPrivilegedNo80211mcSupportMixed()
202 equalTo(MacAddress.fromString("08:09:08:07:06:05").toByteArray())); in testRangeRequestNotPrivilegedNo80211mcSupportMixed()
247 equalTo(MacAddress.fromString("00:01:02:03:04:00").toByteArray())); in testRangeRequestWithLimitedCapabilities()
259 equalTo(MacAddress.fromString("08:09:08:07:06:05").toByteArray())); in testRangeRequestWithLimitedCapabilities()
301 equalTo(MacAddress.fromString("08:09:08:07:06:05").toByteArray())); in testRangeRequestWithLimitedCapabilitiesNoOverlap()
425 equalTo(MacAddress.fromString("05:06:07:08:09:0A").toByteArray())); in testRangeResults()
[all …]
/frameworks/base/wifi/java/android/net/wifi/rtt/
DResponderConfig.java26 import android.net.MacAddress;
134 public final MacAddress macAddress;
201 public ResponderConfig(@NonNull MacAddress macAddress, @ResponderType int responderType, in ResponderConfig()
278 public ResponderConfig(@NonNull MacAddress macAddress, @NonNull PeerHandle peerHandle, in ResponderConfig()
298 MacAddress macAddress = MacAddress.fromString(scanResult.BSSID); in fromScanResult()
341 public static ResponderConfig fromWifiAwarePeerMacAddressWithDefaults(MacAddress macAddress) { in fromWifiAwarePeerMacAddressWithDefaults()
419 MacAddress macAddress = null;
421 macAddress = MacAddress.CREATOR.createFromParcel(in);
DRangingResult.java23 import android.net.MacAddress;
76 private final MacAddress mMac;
89 public RangingResult(@RangeResultStatus int status, @NonNull MacAddress mac, int distanceMm, in RangingResult()
143 public MacAddress getMacAddress() { in getMacAddress()
365 MacAddress mac = null;
367 mac = MacAddress.CREATOR.createFromParcel(in);
/frameworks/base/core/java/android/net/metrics/
DWakeupStats.java19 import android.net.MacAddress;
84 case MacAddress.TYPE_UNICAST: in countEvent()
87 case MacAddress.TYPE_MULTICAST: in countEvent()
90 case MacAddress.TYPE_BROADCAST: in countEvent()
/frameworks/base/packages/Tethering/tests/unit/src/com/android/networkstack/tethering/
DConnectedClientsTrackerTest.kt20 import android.net.MacAddress
47 private val client1Addr = MacAddress.fromString("01:23:45:67:89:0A")
52 private val client2Addr = MacAddress.fromString("02:34:56:78:90:AB")
60 private val client3Addr = MacAddress.fromString("03:45:67:89:0A:BC")
152 private fun makeWifiClient(macAddr: MacAddress): WifiClient { in makeWifiClient()
DBpfCoordinatorTest.java51 import android.net.MacAddress;
87 private static final MacAddress DOWNSTREAM_MAC = MacAddress.ALL_ZEROS_ADDRESS;
90 private static final MacAddress MAC_A = MacAddress.fromString("00:00:00:00:00:0a");
91 private static final MacAddress MAC_B = MacAddress.fromString("11:22:33:00:00:0b");
303 public final MacAddress srcMac;
304 public final MacAddress dstMac;
336 int upstreamIfindex, @NonNull InetAddress address, @NonNull MacAddress dstMac) { in buildTestForwardingRule()
523 final MacAddress mac = MacAddress.fromString("00:00:00:00:00:0a"); in testTetheringConfigDisable()

1234