Home
last modified time | relevance | path

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

12345678910>>...13

/packages/modules/Connectivity/tests/unit/java/android/net/
DMacAddressTest.java60 AddrTypeTestCase.of(MacAddress.TYPE_UNKNOWN), in testMacAddrTypes()
61 AddrTypeTestCase.of(MacAddress.TYPE_UNKNOWN, 0), in testMacAddrTypes()
62 AddrTypeTestCase.of(MacAddress.TYPE_UNKNOWN, 1, 2, 3, 4, 5), in testMacAddrTypes()
63 AddrTypeTestCase.of(MacAddress.TYPE_UNKNOWN, 1, 2, 3, 4, 5, 6, 7), in testMacAddrTypes()
64 AddrTypeTestCase.of(MacAddress.TYPE_UNICAST, 0xa0, 0xb0, 0xc0, 0xd0, 0xe0, 0xf0), in testMacAddrTypes()
65 AddrTypeTestCase.of(MacAddress.TYPE_BROADCAST, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff), in testMacAddrTypes()
66 AddrTypeTestCase.of(MacAddress.TYPE_MULTICAST, 1, 2, 3, 4, 5, 6), in testMacAddrTypes()
67 AddrTypeTestCase.of(MacAddress.TYPE_MULTICAST, 11, 22, 33, 44, 55, 66), in testMacAddrTypes()
68 AddrTypeTestCase.of(MacAddress.TYPE_MULTICAST, 33, 33, 0xaa, 0xbb, 0xcc, 0xdd) in testMacAddrTypes()
72 int got = MacAddress.macAddressType(t.addr); in testMacAddrTypes()
[all …]
/packages/modules/Connectivity/tests/cts/net/src/android/net/cts/
DMacAddressTest.java19 import static android.net.MacAddress.TYPE_BROADCAST;
20 import static android.net.MacAddress.TYPE_MULTICAST;
21 import static android.net.MacAddress.TYPE_UNICAST;
30 import android.net.MacAddress;
92 MacAddress mac = MacAddress.fromString(tc.macAddress); in testMacAddress()
115 if (!mac.equals(MacAddress.fromBytes(mac.toByteArray()))) { in testMacAddress()
119 MacAddress.fromBytes(bytes), in testMacAddress()
137 MacAddress mac = MacAddress.fromString(s); in testConstructorInputValidation()
144 MacAddress mac = MacAddress.fromString(null); in testConstructorInputValidation()
157 MacAddress mac = MacAddress.fromBytes(b); in testConstructorInputValidation()
[all …]
/packages/modules/Connectivity/framework/src/android/net/
DMacAddress.java46 public final class MacAddress implements Parcelable { class
54 public static final MacAddress BROADCAST_ADDRESS = MacAddress.fromBytes(ETHER_ADDR_BROADCAST);
63 public static final MacAddress ALL_ZEROS_ADDRESS = new MacAddress(0);
85 private static final long LOCALLY_ASSIGNED_MASK = MacAddress.fromString("2:0:0:0:0:0").mAddr;
86 private static final long MULTICAST_MASK = MacAddress.fromString("1:0:0:0:0:0").mAddr;
87 private static final long OUI_MASK = MacAddress.fromString("ff:ff:ff:0:0:0").mAddr;
88 private static final long NIC_MASK = MacAddress.fromString("0:0:0:ff:ff:ff").mAddr;
89 private static final MacAddress BASE_GOOGLE_MAC = MacAddress.fromString("da:a1:19:0:0:0");
91 private static final MacAddress DEFAULT_MAC_ADDRESS =
92 MacAddress.fromString(WifiInfo.DEFAULT_MAC_ADDRESS);
[all …]
/packages/modules/Connectivity/staticlibs/tests/unit/src/com/android/net/module/util/
DMacAddressUtilsTest.java23 import android.net.MacAddress;
34 private static final MacAddress DEFAULT_MAC_ADDRESS =
35 MacAddress.fromString("02:00:00:00:00:00");
39 MacAddress[] multicastAddresses = { in testIsMulticastAddress()
41 MacAddress.fromString("ff:ff:ff:ff:ff:ff"), in testIsMulticastAddress()
42 MacAddress.fromString("07:00:d3:56:8a:c4"), in testIsMulticastAddress()
43 MacAddress.fromString("33:33:aa:bb:cc:dd"), in testIsMulticastAddress()
45 MacAddress[] unicastAddresses = { in testIsMulticastAddress()
47 MacAddress.fromString("00:00:00:00:00:00"), in testIsMulticastAddress()
48 MacAddress.fromString("00:01:44:55:66:77"), in testIsMulticastAddress()
[all …]
DArpPacketTest.java28 import android.net.MacAddress;
53 private static final MacAddress TEST_DESTINATION_MAC = MacAddress.fromBytes(ETHER_BROADCAST);
54 private static final MacAddress TEST_SOURCE_MAC = MacAddress.fromBytes(TEST_SENDER_MAC_ADDR);
171 assertEquals(packet.senderHwAddress, MacAddress.fromBytes(TEST_SENDER_MAC_ADDR)); in testParseArpProbePacket()
172 assertEquals(packet.targetHwAddress, MacAddress.fromBytes(TEST_TARGET_MAC_ADDR)); in testParseArpProbePacket()
184 assertEquals(packet.senderHwAddress, MacAddress.fromBytes(TEST_SENDER_MAC_ADDR)); in testParseArpAnnouncePacket()
185 assertEquals(packet.targetHwAddress, MacAddress.fromBytes(TEST_TARGET_MAC_ADDR)); in testParseArpAnnouncePacket()
/packages/modules/Wifi/framework/tests/src/android/net/wifi/
DWifiNetworkAgentSpecifierTest.java23 import android.net.MacAddress;
189 Pair<MacAddress, MacAddress> bssidPattern = in testWifiNetworkAgentSpecifierSatisfiesNetworkSpecifierWithSsidPattern()
217 Pair<MacAddress, MacAddress> bssidPattern = in testWifiNetworkAgentSpecifierSatisfiesNetworkSpecifierWithBssidPattern()
218 Pair.create(MacAddress.fromString(TEST_BSSID_OUI_BASE_ADDRESS), in testWifiNetworkAgentSpecifierSatisfiesNetworkSpecifierWithBssidPattern()
219 MacAddress.fromString(TEST_BSSID_OUI_MASK)); in testWifiNetworkAgentSpecifierSatisfiesNetworkSpecifierWithBssidPattern()
246 Pair<MacAddress, MacAddress> bssidPattern = in testWifiNetworkAgentSpecifierSatisfiesNetworkSpecifierWithSsidAndBssidPattern()
247 Pair.create(MacAddress.fromString(TEST_BSSID_OUI_BASE_ADDRESS), in testWifiNetworkAgentSpecifierSatisfiesNetworkSpecifierWithSsidAndBssidPattern()
248 MacAddress.fromString(TEST_BSSID_OUI_MASK)); in testWifiNetworkAgentSpecifierSatisfiesNetworkSpecifierWithSsidAndBssidPattern()
279 Pair<MacAddress, MacAddress> bssidPattern = in testWifiNetworkAgentSpecifierDoesNotSatisfyNetworkSpecifierWithSsidPattern()
307 Pair<MacAddress, MacAddress> bssidPattern = in testWifiNetworkAgentSpecifierBandMatching()
[all …]
DWifiNetworkSpecifierTest.java33 import android.net.MacAddress;
91 .setBssidPattern(MacAddress.fromString(TEST_BSSID_OUI_BASE_ADDRESS), in testWifiNetworkSpecifierBuilderForWpa2PskNetworkWithBssidPattern()
92 MacAddress.fromString(TEST_BSSID_OUI_MASK)) in testWifiNetworkSpecifierBuilderForWpa2PskNetworkWithBssidPattern()
101 assertEquals(MacAddress.fromString(TEST_BSSID_OUI_BASE_ADDRESS), in testWifiNetworkSpecifierBuilderForWpa2PskNetworkWithBssidPattern()
103 assertEquals(MacAddress.fromString(TEST_BSSID_OUI_MASK), in testWifiNetworkSpecifierBuilderForWpa2PskNetworkWithBssidPattern()
124 .setBssid(MacAddress.fromString(TEST_BSSID)) in testWifiNetworkSpecifierBuilderForWpa2EapHiddenNetworkWithSsidAndBssid()
134 assertEquals(MacAddress.fromString(TEST_BSSID), in testWifiNetworkSpecifierBuilderForWpa2EapHiddenNetworkWithSsidAndBssid()
136 assertEquals(MacAddress.BROADCAST_ADDRESS, in testWifiNetworkSpecifierBuilderForWpa2EapHiddenNetworkWithSsidAndBssid()
536 .setBssidPattern(MacAddress.BROADCAST_ADDRESS, MacAddress.BROADCAST_ADDRESS) in testWifiNetworkSpecifierBuilderWithMatchNoneBssidPattern1()
547 .setBssid(MacAddress.BROADCAST_ADDRESS) in testWifiNetworkSpecifierBuilderWithMatchNoneBssidPattern2()
[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()
/packages/modules/Connectivity/staticlibs/framework/com/android/net/module/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());
44 private static final MacAddress DEFAULT_MAC_ADDRESS =
45 MacAddress.fromString("02:00:00:00:00:00");
51 public static boolean isMulticastAddress(@NonNull MacAddress address) { in isMulticastAddress()
63 public static @NonNull MacAddress createRandomUnicastAddress() { in createRandomUnicastAddress()
78 public static @NonNull MacAddress createRandomUnicastAddress(@Nullable MacAddress base, in createRandomUnicastAddress()
[all …]
DInterfaceParams.java19 import android.net.MacAddress;
40 public final MacAddress macAddr;
57 final MacAddress macAddr = getMacAddress(netif); in getByName()
66 public InterfaceParams(String name, int index, MacAddress macAddr) { in InterfaceParams()
70 public InterfaceParams(String name, int index, MacAddress macAddr, int defaultMtu) { in InterfaceParams()
80 this.macAddr = hasMacAddress ? macAddr : MacAddress.fromBytes(new byte[] { in InterfaceParams()
98 private static MacAddress getMacAddress(NetworkInterface netif) { in getMacAddress()
100 return MacAddress.fromBytes(netif.getHardwareAddress()); in getMacAddress()
/packages/modules/Connectivity/staticlibs/device/com/android/net/module/util/arp/
DArpPacket.java29 import android.net.MacAddress;
48 public final MacAddress destination;
49 public final MacAddress source;
53 public final MacAddress senderHwAddress;
54 public final MacAddress targetHwAddress;
56 ArpPacket(MacAddress destination, MacAddress source, short opCode, MacAddress senderHwAddress, in ArpPacket()
57 Inet4Address senderIp, MacAddress targetHwAddress, Inet4Address targetIp) { in ArpPacket()
152 return new ArpPacket(MacAddress.fromBytes(l2dst), in parseArpPacket()
153 MacAddress.fromBytes(l2src), opCode, in parseArpPacket()
154 MacAddress.fromBytes(senderHwAddress), in parseArpPacket()
[all …]
/packages/modules/Wifi/framework/java/android/net/wifi/
DWifiNetworkSpecifier.java27 import android.net.MacAddress;
129 private static final Pair<MacAddress, MacAddress> MATCH_NO_BSSID_PATTERN1 =
130 new Pair<>(MacAddress.BROADCAST_ADDRESS, MacAddress.BROADCAST_ADDRESS);
131 private static final Pair<MacAddress, MacAddress> MATCH_NO_BSSID_PATTERN2 =
132 new Pair<>(WifiManager.ALL_ZEROS_MAC_ADDRESS, MacAddress.BROADCAST_ADDRESS);
133 private static final Pair<MacAddress, MacAddress> MATCH_ALL_BSSID_PATTERN =
135 private static final MacAddress MATCH_EXACT_BSSID_PATTERN_MASK =
136 MacAddress.BROADCAST_ADDRESS;
156 private @Nullable Pair<MacAddress, MacAddress> mBssidPatternMatcher;
259 @NonNull MacAddress baseAddress, @NonNull MacAddress mask) { in setBssidPattern()
[all …]
/packages/modules/Wifi/service/java/com/android/server/wifi/
DMacAddressUtil.java20 import android.net.MacAddress;
60 private MacAddress calculatePersistentMacInternal(String key, Mac hashFunction) { in calculatePersistentMacInternal()
85 MacAddress macAddress = MacAddress.fromBytes(Arrays.copyOfRange(bf.array(), 2, 8)); in calculatePersistentMacInternal()
89 private MacAddress calculatePersistentMacWithCachedHash(@NonNull String key, int uid, in calculatePersistentMacWithCachedHash()
94 MacAddress macAddress = calculatePersistentMacInternal(key, hashFunction); in calculatePersistentMacWithCachedHash()
108 public MacAddress calculatePersistentMacForSta(String key, int uid) { in calculatePersistentMacForSta()
118 public synchronized MacAddress calculatePersistentMacForSap(String key, int uid) { in calculatePersistentMacForSap()
145 public static MacAddress nextMacAddress(MacAddress mac) { in nextMacAddress()
149 return MacAddress.fromBytes(bytes); in nextMacAddress()
DSsidTranslator.java24 import android.net.MacAddress;
83 private @NonNull Map<WifiSsid, Set<MacAddress>> mTranslatedBssids = new ArrayMap<>();
85 private @NonNull Map<WifiSsid, Set<MacAddress>> mUntranslatedBssids = new ArrayMap<>();
86 private final Map<Pair<WifiSsid, MacAddress>, Runnable> mUntranslatedBssidTimeoutRunnables =
88 private final Map<Pair<WifiSsid, MacAddress>, Runnable> mTranslatedBssidTimeoutRunnables =
251 @NonNull WifiSsid ssid, @Nullable MacAddress bssid) { in getTranslatedSsidAndRecordBssidCharset()
262 Pair<WifiSsid, MacAddress> ssidBssidPair = new Pair<>(translatedSsid, bssid); in getTranslatedSsidAndRecordBssidCharset()
281 Pair<WifiSsid, MacAddress> ssidBssidPair = new Pair<>(ssid, bssid); in getTranslatedSsidAndRecordBssidCharset()
301 WifiSsid ssid, MacAddress bssid, Runnable runnable) { in handleTranslatedBssidTimeout()
302 Pair<WifiSsid, MacAddress> mapping = new Pair<>(ssid, bssid); in handleTranslatedBssidTimeout()
[all …]
DWifiCandidates.java22 import android.net.MacAddress;
188 MacAddress getApMldMacAddress(); in getApMldMacAddress()
249 private final MacAddress mApMldMacAddress;
265 MacAddress apMldMacAddress) { in CandidateImpl()
432 public MacAddress getApMldMacAddress() { in getApMldMacAddress()
543 public final MacAddress bssid;
548 MacAddress bssid, in Key()
558 MacAddress bssid, in Key()
596 private final Map<MacAddress, List<Candidate>> mMultiLinkCandidates = new ArrayMap<>();
614 public List<Candidate> getMultiLinkCandidates(@NonNull MacAddress mldMacAddr) { in getMultiLinkCandidates()
[all …]
DWifiConfigurationUtil.java25 import android.net.MacAddress;
77 private static final Pair<MacAddress, MacAddress> MATCH_NONE_BSSID_PATTERN =
78 new Pair<>(MacAddress.BROADCAST_ADDRESS, MacAddress.BROADCAST_ADDRESS);
79 private static final Pair<MacAddress, MacAddress> MATCH_ALL_BSSID_PATTERN =
480 private static boolean validateBssid(MacAddress bssid) { in validateBssid()
482 if (bssid.getAddressType() != MacAddress.TYPE_UNICAST) { in validateBssid()
497 MacAddress bssidMacAddress; in validateBssid()
499 bssidMacAddress = MacAddress.fromString(bssid); in validateBssid()
801 Pair<MacAddress, MacAddress> bssidPatternMatcher) { in validateBssidPattern() argument
803 MacAddress baseAddress = bssidPatternMatcher.first; in validateBssidPattern()
[all …]
/packages/modules/Connectivity/Tethering/src/com/android/networkstack/tethering/
DConnectedClientsTracker.java21 import android.net.MacAddress;
93 final Set<MacAddress> wifiClientMacs = getClientMacs(mLastWifiClients); in updateConnectedClients()
94 final Set<MacAddress> localOnlyClientMacs = getClientMacs(mLastLocalOnlyClients); in updateConnectedClients()
97 final Map<MacAddress, TetheredClient> clientsMap = new HashMap<>(); in updateConnectedClients()
99 final Set<MacAddress> connectedClientMacs; in updateConnectedClients()
141 final Map<MacAddress, TetheredClient> clientsMap, final Set<MacAddress> clientMacs) { in addWifiClientsIfNoLeases() argument
142 for (MacAddress mac : clientMacs) { in addWifiClientsIfNoLeases()
149 private static void addLease(Map<MacAddress, TetheredClient> clientsMap, TetheredClient lease) { in addLease() argument
205 private static Set<MacAddress> getClientMacs(@NonNull List<WifiClient> clients) { in getClientMacs()
206 final Set<MacAddress> macs = new HashSet<>(clients.size()); in getClientMacs()
DTether6Value.java19 import android.net.MacAddress;
34 public final MacAddress ethDstMac; // The destination mac address.
36 public final MacAddress ethSrcMac; // The source mac address.
43 public Tether6Value(final int oif, @NonNull final MacAddress ethDstMac, in Tether6Value()
44 @NonNull final MacAddress ethSrcMac, final int ethProto, final int pmtu) { in Tether6Value()
/packages/modules/Wifi/service/java/com/android/server/wifi/p2p/
DExternalApproverManager.java20 import android.net.MacAddress;
38 Map<Pair<IBinder, MacAddress>, ApproverEntry> mApprovers = new HashMap<>();
41 Map<MacAddress, ApproverEntry> mApproverByAddress = new HashMap<>();
55 @Nullable MacAddress deviceAddress, @Nullable Message message) { in put()
88 public ApproverEntry get(@Nullable MacAddress deviceAddress) { in get()
95 @Nullable MacAddress deviceAddress) { in get()
102 public ApproverEntry remove(@Nullable MacAddress deviceAddress) { in remove()
113 @Nullable MacAddress deviceAddress) { in remove()
147 MacAddress mDeviceAddress;
153 public ApproverEntry(IBinder key, MacAddress deviceAddress, Message message) { in ApproverEntry()
[all …]
/packages/modules/Connectivity/staticlibs/device/com/android/net/module/util/
DIpv6Utils.java30 import android.net.MacAddress;
87 public static ByteBuffer buildIcmpv6Packet(final MacAddress srcMac, final MacAddress dstMac, in buildIcmpv6Packet()
118 public static ByteBuffer buildRaPacket(final MacAddress srcMac, final MacAddress dstMac, in buildRaPacket()
133 public static ByteBuffer buildNaPacket(final MacAddress srcMac, final MacAddress dstMac, in buildNaPacket()
146 public static ByteBuffer buildNsPacket(final MacAddress srcMac, final MacAddress dstMac, in buildNsPacket()
159 public static ByteBuffer buildRsPacket(final MacAddress srcMac, final MacAddress dstMac, in buildRsPacket()
189 public static ByteBuffer buildEchoRequestPacket(final MacAddress srcMac, in buildEchoRequestPacket()
190 final MacAddress dstMac, final Inet6Address srcIp, final Inet6Address dstIp) { in buildEchoRequestPacket()
/packages/modules/Connectivity/staticlibs/testutils/devicetests/com/android/testutils/
DRouterAdvertisementResponder.java35 import android.net.MacAddress;
67 private final Map<Inet6Address, Pair<MacAddress, Boolean>> mNeighborMap = new ArrayMap<>();
110 public void addRouterEntry(MacAddress mac, Inet6Address ip) { in addRouterEntry()
119 public void addNeighborEntry(MacAddress mac, Inet6Address ip) { in addNeighborEntry()
140 private ByteBuffer buildSllaOption(MacAddress srcMac) { in buildSllaOption()
144 private ByteBuffer buildRaPacket(MacAddress srcMac, MacAddress dstMac, Inet6Address srcIp) { in buildRaPacket()
161 private void replyToRouterSolicitation(TapPacketReader reader, MacAddress dstMac) { in replyToRouterSolicitation()
162 for (Map.Entry<Inet6Address, Pair<MacAddress, Boolean>> it : mNeighborMap.entrySet()) { in replyToRouterSolicitation()
172 private void replyToNeighborSolicitation(TapPacketReader reader, MacAddress dstMac, in replyToNeighborSolicitation()
174 final Pair<MacAddress, Boolean> neighbor = mNeighborMap.get(targetIp); in replyToNeighborSolicitation()
[all …]
/packages/modules/Wifi/service/tests/wifitests/src/com/android/server/wifi/hal/
DWifiRttControllerAidlImplTest.java40 import android.net.MacAddress;
73 private ArgumentCaptor<android.hardware.wifi.MacAddress[]> mMacAddressCaptor =
74 ArgumentCaptor.forClass(android.hardware.wifi.MacAddress[].class);
150 equalTo(MacAddress.fromString("00:01:02:03:04:00").toByteArray())); in testRangeRequest()
160 equalTo(MacAddress.fromString("0A:0B:0C:0D:0E:00").toByteArray())); in testRangeRequest()
170 equalTo(MacAddress.fromString("08:09:08:07:06:05").toByteArray())); in testRangeRequest()
219 equalTo(MacAddress.fromString("00:01:02:03:04:00").toByteArray())); in testRangeRequestWithLimitedCapabilities()
234 equalTo(MacAddress.fromString("08:09:08:07:06:05").toByteArray())); in testRangeRequestWithLimitedCapabilities()
280 equalTo(MacAddress.fromString("08:09:08:07:06:05").toByteArray())); in testRangeRequestWithLimitedCapabilitiesNoOverlap()
297 ArrayList<MacAddress> macAddresses = new ArrayList<>(); in testRangeCancel()
[all …]
/packages/modules/NetworkStack/tests/unit/src/com/android/networkstack/util/
DProcfsParsingUtilsTest.kt18 import android.net.MacAddress
82 MacAddress.fromBytes(HexDump.hexStringToByteArray("01005e000001")), in testParseEtherMulticastAddress()
83 MacAddress.fromBytes(HexDump.hexStringToByteArray("333300000001")), in testParseEtherMulticastAddress()
84 MacAddress.fromBytes(HexDump.hexStringToByteArray("3333ff8a3667")), in testParseEtherMulticastAddress()
85 MacAddress.fromBytes(HexDump.hexStringToByteArray("3333ff59c632")), in testParseEtherMulticastAddress()
86 MacAddress.fromBytes(HexDump.hexStringToByteArray("3333ff574870")) in testParseEtherMulticastAddress()
/packages/modules/Connectivity/staticlibs/device/com/android/net/module/util/structs/
DEthernetHeader.java19 import android.net.MacAddress;
48 public final MacAddress dstMac;
50 public final MacAddress srcMac;
54 public EthernetHeader(final MacAddress dstMac, final MacAddress srcMac, in EthernetHeader()
/packages/modules/Wifi/service/java/com/android/server/wifi/hal/
DIWifiStaIface.java21 import android.net.MacAddress;
59 boolean configureRoaming(List<MacAddress> bssidBlocklist, List<byte[]> ssidAllowlist); in configureRoaming()
128 MacAddress getFactoryMacAddress(); in getFactoryMacAddress()
177 boolean setMacAddress(MacAddress mac); in setMacAddress()
236 MacAddress srcAddress, MacAddress dstAddress, int periodInMs); in startSendingKeepAlivePackets()

12345678910>>...13