/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; 453 private void assertMatchesLease(@NonNull DhcpPacket packet, @NonNull Inet4Address srvAddr, in assertMatchesLease() 464 private void assertMatchesTestLease(@NonNull DhcpPacket packet, @Nullable String hostname) { in assertMatchesTestLease() 468 private void assertMatchesTestLease(@NonNull DhcpPacket packet) { in assertMatchesTestLease() 472 private void assertMatchesClient(@NonNull DhcpPacket packet) { in assertMatchesClient() 481 private static DhcpNakPacket assertNak(@Nullable DhcpPacket packet) { in assertNak() 486 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.CONFIG_MINIMUM_LEASE; 20 import static android.net.dhcp.DhcpPacket.DEFAULT_MINIMUM_LEASE; 21 import static android.net.dhcp.DhcpPacket.DHCP_BROADCAST_ADDRESS; 22 import static android.net.dhcp.DhcpPacket.DHCP_CAPTIVE_PORTAL; 23 import static android.net.dhcp.DhcpPacket.DHCP_DNS_SERVER; 24 import static android.net.dhcp.DhcpPacket.DHCP_DOMAIN_NAME; 25 import static android.net.dhcp.DhcpPacket.DHCP_DOMAIN_SEARCHLIST; 26 import static android.net.dhcp.DhcpPacket.DHCP_IPV6_ONLY_PREFERRED; 27 import static android.net.dhcp.DhcpPacket.DHCP_LEASE_TIME; 28 import static android.net.dhcp.DhcpPacket.DHCP_MTU; [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() 97 protected abstract void onReceive(@NonNull DhcpPacket packet, @NonNull Inet4Address srcAddr, in onReceive() 100 @NonNull DhcpPacket.ParseException e); in logParseError()
|
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; 212 Os.sendto(fd, buffer, 0, dst, DhcpPacket.DHCP_CLIENT); in sendPacket() 503 processPacket((DhcpPacket) msg.obj); in processMessage() 512 private void processPacket(@NonNull DhcpPacket packet) { in processPacket() 656 private Inet4Address getAckOrOfferDst(@NonNull DhcpPacket request, @NonNull DhcpLease lease, in getAckOrOfferDst() 675 private static boolean getBroadcastFlag(@NonNull DhcpPacket request, @NonNull DhcpLease lease) { in getBroadcastFlag() 692 private static String getHostnameIfRequested(@NonNull DhcpPacket request, in getHostnameIfRequested() [all …]
|
D | DhcpPacket.java | 58 public abstract class DhcpPacket { class 417 protected DhcpPacket(int transId, short secs, Inet4Address clientIp, Inet4Address yourIp, in DhcpPacket() method in DhcpPacket 995 static DhcpPacket decodeFullPacket(ByteBuffer packet, int pktType, byte[] optionsToSkip) in decodeFullPacket() 1341 DhcpPacket newPacket; in decodeFullPacket() 1421 public static DhcpPacket decodeFullPacket(byte[] packet, int length, int pktType, in decodeFullPacket() 1436 public static DhcpPacket decodeFullPacket(byte[] packet, int length, int pktType) in decodeFullPacket() 1519 DhcpPacket pkt = new DhcpDiscoverPacket(transactionId, secs, INADDR_ANY /* relayIp */, in buildDiscoverPacket() 1550 DhcpPacket pkt = new DhcpOfferPacket( in buildOfferPacket() 1600 DhcpPacket pkt = new DhcpAckPacket( in buildAckPacket() 1645 DhcpPacket pkt = new DhcpNakPacket( in buildNakPacket() [all …]
|
D | DhcpReleasePacket.java | 25 public class DhcpReleasePacket 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/Connectivity/tests/cts/net/src/android/net/cts/ |
D | NetworkValidationTest.kt | 34 import android.net.dhcp.DhcpPacket 35 import android.net.dhcp.DhcpPacket.DHCP_MESSAGE_TYPE 36 import android.net.dhcp.DhcpPacket.DHCP_MESSAGE_TYPE_DISCOVER 37 import android.net.dhcp.DhcpPacket.DHCP_MESSAGE_TYPE_REQUEST 208 DhcpPacket.buildOfferPacket(DhcpPacket.ENCAP_L2, transactionId, in makeOfferPacket() 218 DhcpPacket.buildAckPacket(DhcpPacket.ENCAP_L2, transactionId, in makeOfferPacket() 228 private fun <T : DhcpPacket> TapPacketReader.assertDhcpPacketReceived( in makeOfferPacket() 236 val packet = DhcpPacket.decodeFullPacket(packetBytes, packetBytes.size, DhcpPacket.ENCAP_L2) in makeOfferPacket()
|
/packages/modules/NetworkStack/tests/integration/common/android/net/ip/ |
D | IpClientIntegrationTestCommon.java | 29 import static android.net.dhcp.DhcpPacket.CONFIG_MINIMUM_LEASE; 30 import static android.net.dhcp.DhcpPacket.DHCP_BOOTREQUEST; 31 import static android.net.dhcp.DhcpPacket.DHCP_CLIENT; 32 import static android.net.dhcp.DhcpPacket.DHCP_IPV6_ONLY_PREFERRED; 33 import static android.net.dhcp.DhcpPacket.DHCP_MAGIC_COOKIE; 34 import static android.net.dhcp.DhcpPacket.DHCP_SERVER; 35 import static android.net.dhcp.DhcpPacket.ENCAP_L2; 36 import static android.net.dhcp.DhcpPacket.INADDR_BROADCAST; 37 import static android.net.dhcp.DhcpPacket.INFINITE_LEASE; 38 import static android.net.dhcp.DhcpPacket.MIN_V6ONLY_WAIT_MS; [all …]
|
/packages/modules/Connectivity/Tethering/tests/integration/base/android/net/ |
D | TetheringTester.java | 61 import android.net.dhcp.DhcpPacket; 109 DhcpPacket.DHCP_SUBNET_MASK, 110 DhcpPacket.DHCP_ROUTER, 111 DhcpPacket.DHCP_DNS_SERVER, 112 DhcpPacket.DHCP_LEASE_TIME, 207 DhcpPacket offerPacket = null; in runDhcp() 219 DhcpPacket ackPacket = getNextDhcpPacket(); in runDhcp() 228 ByteBuffer packet = DhcpPacket.buildDiscoverPacket(DhcpPacket.ENCAP_L2, in sendDhcpDiscover() 235 private void sendDhcpRequest(DhcpPacket offerPacket, byte[] macAddress) in sendDhcpRequest() 240 ByteBuffer packet = DhcpPacket.buildRequestPacket(DhcpPacket.ENCAP_L2, in sendDhcpRequest() [all …]
|
/packages/modules/NetworkStack/tests/integration/signature/android/net/util/ |
D | NetworkStackUtilsIntegrationTest.kt | 26 import android.net.dhcp.DhcpPacket 132 val buffer = DhcpPacket.buildOfferPacket(DhcpPacket.ENCAP_BOOTP, 123 /* transactionId */, in testAddArpEntry() 145 0 /* flags */, TEST_TARGET_IPV4_ADDR, DhcpPacket.DHCP_CLIENT.toInt() /* port */) in testAddArpEntry() 321 val packet = DhcpPacket.buildNakPacket(DhcpPacket.ENCAP_L2, 42, in doTestDhcpResponseWithMfBitDropped()
|
/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 | 23 import android.net.dhcp.DhcpPacket; 72 DhcpErrorEvent.BUFFER_UNDERFLOW, DhcpPacket.DHCP_HOST_NAME)); in testIpProvisioningMetrics_addDhcpErrorCode()
|
/packages/modules/NetworkStack/src/android/net/ip/ |
D | IpClient.java | 88 import android.net.dhcp.DhcpPacket; 2294 mDhcpResults.vendorInfo = DhcpPacket.VENDOR_INFO_ANDROID_METERED; in handleIPv4Success()
|