Home
last modified time | relevance | path

Searched refs:ArpPacket (Results 1 – 5 of 5) sorted by relevance

/packages/modules/NetworkStack/tests/unit/src/com/android/networkstack/arp/
DArpPacketTest.java147 final ByteBuffer arpProbe = ArpPacket.buildArpPacket(DhcpPacket.ETHER_BROADCAST, in testBuildArpProbePacket()
155 final ByteBuffer arpAnnounce = ArpPacket.buildArpPacket(DhcpPacket.ETHER_BROADCAST, in testBuildArpAnnouncePacket()
163 final ArpPacket packet = ArpPacket.parseArpPacket(TEST_ARP_PROBE, TEST_ARP_PROBE.length); in testParseArpProbePacket()
173 final ArpPacket packet = ArpPacket.parseArpPacket(TEST_ARP_ANNOUNCE, in testParseArpAnnouncePacket()
184 assertThrows(ArpPacket.ParseException.class, () -> ArpPacket.parseArpPacket( in testParseArpPacket_invalidByteBufferParameters()
190 assertThrows(ArpPacket.ParseException.class, () -> ArpPacket.parseArpPacket( in testParseArpPacket_truncatedPacket()
196 assertThrows(ArpPacket.ParseException.class, () -> ArpPacket.parseArpPacket( in testParseArpPacket_truncatedMacAddress()
/packages/modules/NetworkStack/src/com/android/networkstack/arp/
DArpPacket.java45 public class ArpPacket { class
54 ArpPacket(short opCode, MacAddress senderHwAddress, Inet4Address senderIp, in ArpPacket() method in ArpPacket
95 public static ArpPacket parseArpPacket(final byte[] recvbuf, final int length) in parseArpPacket()
148 return new ArpPacket(opCode, MacAddress.fromBytes(senderHwAddress), in parseArpPacket()
/packages/modules/NetworkStack/tests/integration/src/android/net/ip/
DIpClientIntegrationTestCommon.java149 import com.android.networkstack.arp.ArpPacket;
699 private ArpPacket parseArpPacketOrNull(final byte[] packet) {
701 return ArpPacket.parseArpPacket(packet, packet.length);
702 } catch (ArpPacket.ParseException e) {
763 final ByteBuffer packet = ArpPacket.buildArpPacket(clientMac /* dst */,
771 final ByteBuffer packet = ArpPacket.buildArpPacket(DhcpPacket.ETHER_BROADCAST /* dst */,
1118 private ArpPacket getNextArpPacket(final long timeout) throws Exception {
1121 final ArpPacket arpPacket = parseArpPacketOrNull(packet);
1127 private ArpPacket getNextArpPacket() throws Exception {
1128 final ArpPacket packet = getNextArpPacket(PACKET_TIMEOUT_MS);
[all …]
/packages/modules/NetworkStack/src/android/net/dhcp/
DDhcpClient.java108 import com.android.networkstack.arp.ArpPacket;
1511 final ArpPacket packet = ArpPacket.parseArpPacket(recvbuf, length); in handlePacket()
1516 } catch (ArpPacket.ParseException e) { in handlePacket()
1546 final ByteBuffer packet = ArpPacket.buildArpPacket(DhcpPacket.ETHER_BROADCAST, hwAddr, in transmitPacket()
1560 private boolean isArpProbe(@NonNull ArpPacket packet) { in isArpProbe()
1573 private boolean packetHasIpAddressConflict(@NonNull ArpPacket packet, in packetHasIpAddressConflict()
1580 private boolean hasIpAddressConflict(@NonNull ArpPacket packet, in hasIpAddressConflict()
/packages/modules/NetworkStack/src/android/net/ip/
DIpClient.java103 import com.android.networkstack.arp.ArpPacket;
1533 final ByteBuffer packet = ArpPacket.buildArpPacket(ETHER_BROADCAST /* dstMac */, in sendGratuitousARP()