/packages/modules/NetworkStack/tests/unit/src/android/net/dhcp/ |
D | DhcpPacketTest.java | 19 import static android.net.dhcp.DhcpPacket.DHCP_BROADCAST_ADDRESS; 20 import static android.net.dhcp.DhcpPacket.DHCP_DNS_SERVER; 21 import static android.net.dhcp.DhcpPacket.DHCP_DOMAIN_NAME; 22 import static android.net.dhcp.DhcpPacket.DHCP_LEASE_TIME; 23 import static android.net.dhcp.DhcpPacket.DHCP_MESSAGE_TYPE_ACK; 24 import static android.net.dhcp.DhcpPacket.DHCP_MESSAGE_TYPE_OFFER; 25 import static android.net.dhcp.DhcpPacket.DHCP_MTU; 26 import static android.net.dhcp.DhcpPacket.DHCP_REBINDING_TIME; 27 import static android.net.dhcp.DhcpPacket.DHCP_RENEWAL_TIME; 28 import static android.net.dhcp.DhcpPacket.DHCP_ROUTER; [all …]
|
D | DhcpServerTest.java | 20 import static android.net.dhcp.DhcpPacket.DHCP_HOST_NAME; 21 import static android.net.dhcp.DhcpPacket.ENCAP_BOOTP; 22 import static android.net.dhcp.DhcpPacket.INADDR_ANY; 23 import static android.net.dhcp.DhcpPacket.INADDR_BROADCAST; 451 private void assertMatchesLease(@NonNull DhcpPacket packet, @NonNull Inet4Address srvAddr, in assertMatchesLease() 462 private void assertMatchesTestLease(@NonNull DhcpPacket packet, @Nullable String hostname) { in assertMatchesTestLease() 466 private void assertMatchesTestLease(@NonNull DhcpPacket packet) { in assertMatchesTestLease() 470 private void assertMatchesClient(@NonNull DhcpPacket packet) { in assertMatchesClient() 479 private static DhcpNakPacket assertNak(@Nullable DhcpPacket packet) { in assertNak() 484 private static DhcpAckPacket assertAck(@Nullable DhcpPacket packet) { in assertAck() [all …]
|
/packages/modules/NetworkStack/src/android/net/dhcp/ |
D | DhcpClient.java | 19 import static android.net.dhcp.DhcpPacket.DHCP_BROADCAST_ADDRESS; 20 import static android.net.dhcp.DhcpPacket.DHCP_CAPTIVE_PORTAL; 21 import static android.net.dhcp.DhcpPacket.DHCP_DNS_SERVER; 22 import static android.net.dhcp.DhcpPacket.DHCP_DOMAIN_NAME; 23 import static android.net.dhcp.DhcpPacket.DHCP_IPV6_ONLY_PREFERRED; 24 import static android.net.dhcp.DhcpPacket.DHCP_LEASE_TIME; 25 import static android.net.dhcp.DhcpPacket.DHCP_MTU; 26 import static android.net.dhcp.DhcpPacket.DHCP_REBINDING_TIME; 27 import static android.net.dhcp.DhcpPacket.DHCP_RENEWAL_TIME; 28 import static android.net.dhcp.DhcpPacket.DHCP_ROUTER; [all …]
|
D | DhcpServer.java | 19 import static android.net.dhcp.DhcpPacket.DHCP_CLIENT; 20 import static android.net.dhcp.DhcpPacket.DHCP_HOST_NAME; 21 import static android.net.dhcp.DhcpPacket.DHCP_SERVER; 22 import static android.net.dhcp.DhcpPacket.ENCAP_BOOTP; 205 Os.sendto(fd, buffer, 0, dst, DhcpPacket.DHCP_CLIENT); in sendPacket() 488 processPacket((DhcpPacket) msg.obj); in processMessage() 497 private void processPacket(@NonNull DhcpPacket packet) { in processPacket() 641 private Inet4Address getAckOrOfferDst(@NonNull DhcpPacket request, @NonNull DhcpLease lease, in getAckOrOfferDst() 660 private static boolean getBroadcastFlag(@NonNull DhcpPacket request, @NonNull DhcpLease lease) { in getBroadcastFlag() 677 private static String getHostnameIfRequested(@NonNull DhcpPacket request, in getHostnameIfRequested() [all …]
|
D | DhcpPacketListener.java | 38 protected final byte[] mBytes = new byte[DhcpPacket.MAX_LENGTH]; 59 final DhcpPacket packet = DhcpPacket.decodeFullPacket(recvbuf.mBytes, length, in handlePacket() 60 DhcpPacket.ENCAP_BOOTP); in handlePacket() 62 } catch (DhcpPacket.ParseException e) { in handlePacket() 89 protected abstract void onReceive(@NonNull DhcpPacket packet, @NonNull Inet4Address srcAddr, in onReceive() 92 @NonNull DhcpPacket.ParseException e); in logParseError()
|
D | DhcpPacket.java | 57 public abstract class DhcpPacket { class 408 protected DhcpPacket(int transId, short secs, Inet4Address clientIp, Inet4Address yourIp, in DhcpPacket() method in DhcpPacket 977 static DhcpPacket decodeFullPacket(ByteBuffer packet, int pktType, byte[] optionsToSkip) in decodeFullPacket() 1308 DhcpPacket newPacket; in decodeFullPacket() 1390 public static DhcpPacket decodeFullPacket(byte[] packet, int length, int pktType, in decodeFullPacket() 1405 public static DhcpPacket decodeFullPacket(byte[] packet, int length, int pktType) in decodeFullPacket() 1485 DhcpPacket pkt = new DhcpDiscoverPacket(transactionId, secs, INADDR_ANY /* relayIp */, in buildDiscoverPacket() 1515 DhcpPacket pkt = new DhcpOfferPacket( in buildOfferPacket() 1560 DhcpPacket pkt = new DhcpAckPacket( in buildAckPacket() 1602 DhcpPacket pkt = new DhcpNakPacket( in buildNakPacket() [all …]
|
D | DhcpReleasePacket.java | 25 public class DhcpReleasePacket extends DhcpPacket {
|
D | DhcpInformPacket.java | 25 public class DhcpInformPacket extends DhcpPacket {
|
D | DhcpNakPacket.java | 25 public class DhcpNakPacket extends DhcpPacket {
|
D | DhcpDeclinePacket.java | 25 public class DhcpDeclinePacket extends DhcpPacket {
|
D | DhcpDiscoverPacket.java | 25 public class DhcpDiscoverPacket extends DhcpPacket {
|
D | DhcpRequestPacket.java | 25 public class DhcpRequestPacket extends DhcpPacket {
|
D | DhcpOfferPacket.java | 25 public class DhcpOfferPacket extends DhcpPacket {
|
D | DhcpAckPacket.java | 25 public class DhcpAckPacket extends DhcpPacket {
|
/packages/modules/NetworkStack/tests/integration/src/android/net/ip/ |
D | IpClientIntegrationTestCommon.java | 20 import static android.net.dhcp.DhcpPacket.DHCP_BOOTREQUEST; 21 import static android.net.dhcp.DhcpPacket.DHCP_CLIENT; 22 import static android.net.dhcp.DhcpPacket.DHCP_IPV6_ONLY_PREFERRED; 23 import static android.net.dhcp.DhcpPacket.DHCP_MAGIC_COOKIE; 24 import static android.net.dhcp.DhcpPacket.DHCP_SERVER; 25 import static android.net.dhcp.DhcpPacket.ENCAP_L2; 26 import static android.net.dhcp.DhcpPacket.INADDR_BROADCAST; 27 import static android.net.dhcp.DhcpPacket.INFINITE_LEASE; 28 import static android.net.dhcp.DhcpPacket.MIN_V6ONLY_WAIT_MS; 108 import android.net.dhcp.DhcpPacket; [all …]
|
/packages/modules/Connectivity/tests/cts/net/src/android/net/cts/ |
D | NetworkValidationTest.kt | 35 import android.net.dhcp.DhcpPacket 36 import android.net.dhcp.DhcpPacket.DHCP_MESSAGE_TYPE 37 import android.net.dhcp.DhcpPacket.DHCP_MESSAGE_TYPE_DISCOVER 38 import android.net.dhcp.DhcpPacket.DHCP_MESSAGE_TYPE_REQUEST 209 DhcpPacket.buildOfferPacket(DhcpPacket.ENCAP_L2, transactionId, in makeOfferPacket() 219 DhcpPacket.buildAckPacket(DhcpPacket.ENCAP_L2, transactionId, in makeOfferPacket() 229 private fun <T : DhcpPacket> TapPacketReader.assertDhcpPacketReceived( in makeOfferPacket() 237 val packet = DhcpPacket.decodeFullPacket(packetBytes, packetBytes.size, DhcpPacket.ENCAP_L2) in makeOfferPacket()
|
/packages/modules/Connectivity/Tethering/tests/integration/src/android/net/ |
D | EthernetTetheringTest.java | 49 import android.net.dhcp.DhcpPacket; 98 DhcpPacket.DHCP_SUBNET_MASK, 99 DhcpPacket.DHCP_ROUTER, 100 DhcpPacket.DHCP_DNS_SERVER, 101 DhcpPacket.DHCP_LEASE_TIME, 524 DhcpPacket offerPacket = null; in runDhcp() 536 DhcpPacket ackPacket = getNextDhcpPacket(); in runDhcp() 575 private DhcpPacket getNextDhcpPacket() throws ParseException { in getNextDhcpPacket() 579 return DhcpPacket.decodeFullPacket(packet, packet.length, DhcpPacket.ENCAP_L2); in getNextDhcpPacket() 580 } catch (DhcpPacket.ParseException e) { in getNextDhcpPacket() [all …]
|
/packages/modules/NetworkStack/tests/integration/src/android/net/util/ |
D | NetworkStackUtilsIntegrationTest.kt | 26 import android.net.dhcp.DhcpPacket 115 val buffer = DhcpPacket.buildOfferPacket(DhcpPacket.ENCAP_BOOTP, 123 /* transactionId */, in testAddArpEntry() 128 0 /* flags */, TEST_TARGET_IPV4_ADDR, DhcpPacket.DHCP_CLIENT.toInt() /* port */) in testAddArpEntry()
|
/packages/modules/NetworkStack/tests/unit/src/com/android/networkstack/arp/ |
D | ArpPacketTest.java | 28 import android.net.dhcp.DhcpPacket; 147 final ByteBuffer arpProbe = ArpPacket.buildArpPacket(DhcpPacket.ETHER_BROADCAST, in testBuildArpProbePacket() 155 final ByteBuffer arpAnnounce = ArpPacket.buildArpPacket(DhcpPacket.ETHER_BROADCAST, in testBuildArpAnnouncePacket()
|
/packages/modules/NetworkStack/src/android/net/util/ |
D | ConnectivityPacketSummary.java | 60 import android.net.dhcp.DhcpPacket; 386 final DhcpPacket dhcpPacket; in parseDHCPv4() 388 dhcpPacket = DhcpPacket.decodeFullPacket(mBytes, mLength, DhcpPacket.ENCAP_L2); in parseDHCPv4() 390 } catch (DhcpPacket.ParseException e) { in parseDHCPv4()
|
/packages/modules/NetworkStack/tests/unit/src/com/android/networkstack/metrics/ |
D | NetworkIpProvisioningMetricsTest.java | 19 import android.net.dhcp.DhcpPacket; 70 DhcpErrorEvent.BUFFER_UNDERFLOW, DhcpPacket.DHCP_HOST_NAME)); in testIpProvisioningMetrics_addDhcpErrorCode()
|
/packages/modules/NetworkStack/src/android/net/ip/ |
D | IpClient.java | 59 import android.net.dhcp.DhcpPacket; 1681 mDhcpResults.vendorInfo = DhcpPacket.VENDOR_INFO_ANDROID_METERED; in handleIPv4Success()
|