/packages/modules/Connectivity/staticlibs/tests/unit/src/com/android/net/module/util/ |
D | DnsPacketTest.java | 54 private void assertHeaderParses(DnsPacket.DnsHeader header, int id, int flag, in assertHeaderParses() 58 assertEquals(header.getRecordCount(DnsPacket.QDSECTION), qCount); in assertHeaderParses() 59 assertEquals(header.getRecordCount(DnsPacket.ANSECTION), aCount); in assertHeaderParses() 60 assertEquals(header.getRecordCount(DnsPacket.NSSECTION), nsCount); in assertHeaderParses() 61 assertEquals(header.getRecordCount(DnsPacket.ARSECTION), arCount); in assertHeaderParses() 64 private void assertRecordParses(DnsPacket.DnsRecord record, String dname, in assertRecordParses() 73 static class TestDnsPacket extends DnsPacket { 74 TestDnsPacket(byte[] data) throws DnsPacket.ParseException { in TestDnsPacket() 96 } catch (DnsPacket.ParseException e) { in testNullDisallowed() 129 List<DnsPacket.DnsRecord> qdRecordList = in testV4Answer() [all …]
|
D | DnsSvcbPacketTest.java | 23 import static com.android.net.module.util.DnsPacket.TYPE_SVCB; 135 return new DnsSvcbRecord(DnsPacket.ANSECTION, ByteBuffer.wrap(data)); in makeDnsSvcbRecordFromByteArray() 389 assertThrows(DnsPacket.ParseException.class, () -> makeDnsSvcbRecordFromByteArray(bytes)); in testDnsSvcbRecord_repeatedKeyIsInvalid() 463 assertThrows(DnsPacket.ParseException.class, in testDnsSvcbRecord_invalidContent() 470 assertThrows(DnsPacket.ParseException.class, () -> DnsSvcbPacket.fromResponse(null)); in testDnsSvcbPacket_createdFromNullObject()
|
D | DnsPacketUtilsTest.java | 79 assertThrows(DnsPacket.ParseException.class, () -> DnsRecordParser.parseName( in testParsingAnswerSectionNameCompressed()
|
/packages/modules/Connectivity/staticlibs/framework/com/android/net/module/util/ |
D | DnsPacketUtils.java | 19 import static com.android.net.module.util.DnsPacket.DnsRecord.NAME_COMPRESSION; 20 import static com.android.net.module.util.DnsPacket.DnsRecord.NAME_NORMAL; 136 BufferUnderflowException, DnsPacket.ParseException { in parseName() 150 BufferUnderflowException, DnsPacket.ParseException { in parseName() 152 throw new DnsPacket.ParseException("Failed to parse name, too many labels"); in parseName() 160 throw new DnsPacket.ParseException("Parse name fail, bad label type: " + mask); in parseName() 166 throw new DnsPacket.ParseException( in parseName() 179 throw new DnsPacket.ParseException("Parse name fail, invalid label length"); in parseName()
|
D | DnsSvcbPacket.java | 37 public class DnsSvcbPacket extends DnsPacket { 45 private DnsSvcbPacket(@NonNull byte[] data) throws DnsPacket.ParseException { in DnsSvcbPacket() 51 throw new DnsPacket.ParseException("Unexpected question count " + questions); in DnsSvcbPacket() 55 throw new DnsPacket.ParseException("Unexpected query type " + nsType); in DnsSvcbPacket() 163 public static DnsSvcbPacket fromResponse(@NonNull byte[] data) throws DnsPacket.ParseException { in fromResponse() 166 throw new DnsPacket.ParseException("Not an answer packet"); in fromResponse()
|
D | DnsSvcbRecord.java | 23 import static com.android.net.module.util.DnsPacket.ParseException; 48 public final class DnsSvcbRecord extends DnsPacket.DnsRecord { 94 public DnsSvcbRecord(@DnsPacket.RecordType int rType, @NonNull ByteBuffer buff) in DnsSvcbRecord() 97 if (nsType != DnsPacket.TYPE_SVCB) { in DnsSvcbRecord() 105 if (rType == DnsPacket.QDSECTION) { in DnsSvcbRecord() 121 if (mTargetName.length() > DnsPacket.DnsRecord.MAXNAMESIZE) { in DnsSvcbRecord() 199 if (rType == DnsPacket.QDSECTION) { in toString()
|
D | DnsPacket.java | 53 public abstract class DnsPacket { class 513 private static final String TAG = DnsPacket.class.getSimpleName(); 518 protected DnsPacket(@NonNull byte[] data) throws ParseException { in DnsPacket() method in DnsPacket 551 protected DnsPacket(@NonNull DnsHeader header, @NonNull List<DnsRecord> qd, in DnsPacket() method in DnsPacket 591 final DnsPacket other = (DnsPacket) o; in equals()
|
/packages/modules/Connectivity/staticlibs/tests/unit/src/com/android/testutils/ |
D | TestDnsServerTest.kt | 24 import com.android.net.module.util.DnsPacket 25 import com.android.net.module.util.DnsPacket.DnsRecord 83 val queryHeader = DnsPacket.DnsHeader(0xbeef /* id */, in testHandleDnsQuery() 91 val answerHeader = DnsPacket.DnsHeader(0xbeef, in testHandleDnsQuery() 93 val alist = listOf(DnsRecord.makeAOrAAAARecord(DnsPacket.ANSECTION, TEST_DOMAIN, in testHandleDnsQuery() 101 private fun resolve(queryDnsPacket: DnsPacket, serverPort: Int): TestDnsServer.DnsAnswerPacket { in resolve()
|
/packages/modules/Connectivity/staticlibs/testutils/devicetests/com/android/testutils/ |
D | DnsAnswerProvider.kt | 20 import com.android.net.module.util.DnsPacket 21 import com.android.net.module.util.DnsPacket.ANSECTION 40 private val mDnsKeyToRecords = ConcurrentHashMap<String, List<DnsPacket.DnsRecord>>() 60 DnsPacket.DnsRecord.makeAOrAAAARecord(ANSECTION, query, CLASS_IN, DEFAULT_TTL_S, it) in <lambda>()
|
D | TestDnsServer.kt | 24 import com.android.net.module.util.DnsPacket 143 class DnsQueryPacket : DnsPacket { 167 class DnsAnswerPacket : DnsPacket {
|
/packages/modules/DnsResolver/ |
D | res_cache.cpp | 264 struct DnsPacket { struct 286 static void _dnsPacket_init(DnsPacket* packet, const uint8_t* buff, int bufflen) { in _dnsPacket_init() argument 292 static void _dnsPacket_rewind(DnsPacket* packet) { in _dnsPacket_rewind() 296 static void _dnsPacket_skip(DnsPacket* packet, int count) { in _dnsPacket_skip() 304 static int _dnsPacket_readInt16(DnsPacket* packet) { in _dnsPacket_readInt16() 318 static int _dnsPacket_checkBytes(DnsPacket* packet, int numBytes, const void* bytes) { in _dnsPacket_checkBytes() 333 static int _dnsPacket_checkQName(DnsPacket* packet) { in _dnsPacket_checkQName() 364 static int _dnsPacket_checkQR(DnsPacket* packet) { in _dnsPacket_checkQR() 388 static int _dnsPacket_checkQuery(DnsPacket* packet) { in _dnsPacket_checkQuery() 456 static unsigned _dnsPacket_hashBytes(DnsPacket* packet, int numBytes, unsigned hash) { in _dnsPacket_hashBytes() [all …]
|
/packages/modules/NetworkStack/tests/unit/src/android/net/testutils/ |
D | DnsAnswerProviderTest.kt | 23 import com.android.net.module.util.DnsPacket in <lambda>() 100 DnsPacket.DnsRecord.makeAOrAAAARecord(DnsPacket.ANSECTION, dName, CLASS_IN, 5 /* ttl */, in <lambda>()
|
/packages/services/Iwlan/src/com/google/android/iwlan/epdg/ |
D | SrvDnsResolver.java | 29 import com.android.net.module.util.DnsPacket; 83 static class SrvResponse extends DnsPacket { 275 throws DnsPacket.ParseException, DnsException { in composeSrvRecordResult() 322 } catch (DnsPacket.ParseException e) { in onAnswer()
|
D | NaptrDnsResolver.java | 30 import com.android.net.module.util.DnsPacket; 80 static class NaptrResponse extends DnsPacket { 253 } catch (DnsPacket.ParseException e) { in onAnswer()
|
/packages/modules/Connectivity/Tethering/tests/integration/base/android/net/ |
D | TetheringTester.java | 30 import static com.android.net.module.util.DnsPacket.ANSECTION; 31 import static com.android.net.module.util.DnsPacket.DnsHeader; 32 import static com.android.net.module.util.DnsPacket.DnsRecord; 33 import static com.android.net.module.util.DnsPacket.QDSECTION; 69 import com.android.net.module.util.DnsPacket; 509 public static class TestDnsPacket extends DnsPacket { 510 TestDnsPacket(byte[] data) throws DnsPacket.ParseException { 524 } catch (DnsPacket.ParseException e) {
|
/packages/modules/Connectivity/framework/src/android/net/ |
D | DnsResolver.java | 41 import com.android.net.module.util.DnsPacket; 304 } catch (DnsPacket.ParseException e) { in onAnswer() 546 private static class DnsAddressAnswer extends DnsPacket {
|
/packages/modules/Connectivity/staticlibs/device/com/android/net/module/util/ |
D | DomainUtils.java | 136 } catch (BufferUnderflowException | DnsPacket.ParseException e) { in decode()
|
/packages/modules/Connectivity/tests/cts/net/src/android/net/cts/ |
D | DnsResolverTest.java | 60 import com.android.net.module.util.DnsPacket; 225 private static class DnsAnswer extends DnsPacket {
|
/packages/modules/NetworkStack/tests/unit/src/android/net/apf/ |
D | ApfTest.java | 94 import com.android.net.module.util.DnsPacket; 1295 buf.put(new DnsPacket.DnsHeader(0 /* id */, 0 /* flags */, qnames.length, 0 /* ancount */) in fillQuestionSection() 1298 buf.put(DnsPacket.DnsRecord.makeQuestion(qname, 0 /* nsType */, 0 /* nsClass */) in fillQuestionSection() 1431 questions.put(new DnsPacket.DnsHeader(123, 0, names.length, 0).getBytes()); in makeMdnsCompressedV6Packet()
|
/packages/modules/Connectivity/staticlibs/ |
D | Android.bp | 99 "framework/**/DnsPacket.java",
|