Home
last modified time | relevance | path

Searched refs:ArpPacket (Results 1 – 4 of 4) 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/
DIpClientIntegrationTest.java138 import com.android.networkstack.arp.ArpPacket;
543 private ArpPacket parseArpPacketOrNull(final byte[] packet) {
545 return ArpPacket.parseArpPacket(packet, packet.length);
546 } catch (ArpPacket.ParseException e) {
583 final ByteBuffer packet = ArpPacket.buildArpPacket(clientMac /* dst */,
591 final ByteBuffer packet = ArpPacket.buildArpPacket(DhcpPacket.ETHER_BROADCAST /* dst */,
930 private ArpPacket getNextArpPacket(final int timeout) throws Exception {
933 final ArpPacket arpPacket = parseArpPacketOrNull(packet);
939 private ArpPacket getNextArpPacket() throws Exception {
940 final ArpPacket packet = getNextArpPacket(PACKET_TIMEOUT_MS);
[all …]
/packages/modules/NetworkStack/src/android/net/dhcp/
DDhcpClient.java104 import com.android.networkstack.arp.ArpPacket;
1451 final ArpPacket packet = ArpPacket.parseArpPacket(recvbuf, length); in handlePacket()
1456 } catch (ArpPacket.ParseException e) { in handlePacket()
1486 final ByteBuffer packet = ArpPacket.buildArpPacket(DhcpPacket.ETHER_BROADCAST, hwAddr, in transmitPacket()
1500 private boolean isArpProbe(@NonNull ArpPacket packet) { in isArpProbe()
1513 private boolean packetHasIpAddressConflict(@NonNull ArpPacket packet, in packetHasIpAddressConflict()
1520 private boolean hasIpAddressConflict(@NonNull ArpPacket packet, in hasIpAddressConflict()