Home
last modified time | relevance | path

Searched refs:MdnsRecord (Results 1 – 25 of 31) sorted by relevance

12

/packages/modules/Connectivity/service-t/src/com/android/server/connectivity/mdns/
DMdnsPacket.java37 public final List<MdnsRecord> questions;
39 public final List<MdnsRecord> answers;
41 public final List<MdnsRecord> authorityRecords;
43 public final List<MdnsRecord> additionalRecords;
46 @NonNull List<MdnsRecord> questions, in MdnsPacket()
47 @NonNull List<MdnsRecord> answers, in MdnsPacket()
48 @NonNull List<MdnsRecord> authorityRecords, in MdnsPacket()
49 @NonNull List<MdnsRecord> additionalRecords) { in MdnsPacket()
54 @NonNull List<MdnsRecord> questions, in MdnsPacket()
55 @NonNull List<MdnsRecord> answers, in MdnsPacket()
[all …]
DMdnsReplyInfo.java29 public final List<MdnsRecord> answers;
31 public final List<MdnsRecord> additionalAnswers;
38 public final List<MdnsRecord> knownAnswers;
41 @NonNull List<MdnsRecord> answers, in MdnsReplyInfo()
42 @NonNull List<MdnsRecord> additionalAnswers, in MdnsReplyInfo()
46 @NonNull List<MdnsRecord> knownAnswers) { in MdnsReplyInfo()
DMdnsRecordRepository.java146 private static class RecordInfo<T extends MdnsRecord> {
507 final List<MdnsRecord> probingRecords = new ArrayList<>(); in makeProbingInfo()
576 final List<MdnsRecord> expiredRecords = CollectionUtils.map(registration.ptrRecords, in exitService()
666 for (MdnsRecord question : packet.questions) { in getReply()
698 final List<MdnsRecord> additionalAnswerRecords = in getReply()
769 final ArrayList<MdnsRecord> answerRecords = new ArrayList<>(answerInfo.size()); in getReply()
790 private boolean isKnownAnswer(MdnsRecord answer, @NonNull List<MdnsRecord> knownAnswerRecords) { in isKnownAnswer()
791 for (MdnsRecord knownAnswer : knownAnswerRecords) { in isKnownAnswer()
802 private boolean addReplyFromService(@NonNull MdnsRecord question, in addReplyFromService()
810 @NonNull List<MdnsRecord> knownAnswerRecords, in addReplyFromService()
[all …]
DMdnsAnnouncer.java52 protected BaseAnnouncementInfo(int serviceId, @NonNull List<MdnsRecord> announcedRecords, in BaseAnnouncementInfo()
53 @NonNull List<MdnsRecord> additionalRecords) { in BaseAnnouncementInfo()
75 AnnouncementInfo(int serviceId, List<MdnsRecord> announcedRecords, in AnnouncementInfo()
76 List<MdnsRecord> additionalRecords) { in AnnouncementInfo()
94 ExitAnnouncementInfo(int serviceId, List<MdnsRecord> announcedRecords) { in ExitAnnouncementInfo()
DMdnsRecord.java38 public abstract class MdnsRecord { class
76 protected MdnsRecord(String[] name, int type, MdnsPacketReader reader, boolean isQuestion) in MdnsRecord() method in MdnsRecord
105 protected MdnsRecord(String[] name, int type, MdnsPacketReader reader) throws IOException { in MdnsRecord() method in MdnsRecord
112 protected MdnsRecord(String[] name, int type, int cls, long receiptTimeMillis, in MdnsRecord() method in MdnsRecord
281 if (!(other instanceof MdnsRecord)) { in equals()
285 MdnsRecord otherRecord = (MdnsRecord) other; in equals()
DMdnsProber.java59 ProbingInfo(int serviceId, @NonNull List<MdnsRecord> probeRecords) { in ProbingInfo()
86 private static MdnsPacket makePacket(@NonNull List<MdnsRecord> records) { in makePacket()
87 final ArrayList<MdnsRecord> questions = new ArrayList<>(records.size()); in makePacket()
88 for (final MdnsRecord record : records) { in makePacket()
114 private static boolean containsName(@NonNull List<MdnsRecord> records, in containsName()
DMdnsResponse.java37 private final List<MdnsRecord> records;
80 private boolean recordsAreSame(MdnsRecord a, MdnsRecord b) { in recordsAreSame()
85 private <T extends MdnsRecord> boolean addOrReplaceRecord(@NonNull T record, in addOrReplaceRecord()
91 final MdnsRecord existedRecord = recordsList.remove(existing); in addOrReplaceRecord()
102 public boolean hasIdenticalRecord(@NonNull MdnsRecord record) { in hasIdenticalRecord()
294 public synchronized List<MdnsRecord> getRecords() { in getRecords()
374 for (MdnsRecord record : records) { in isGoodbye()
DMdnsInetAddressRecord.java33 public class MdnsInetAddressRecord extends MdnsRecord {
95 if (super.getType() == MdnsRecord.TYPE_AAAA) { in readData()
133 if (super.getType() == MdnsRecord.TYPE_A) { in toString()
DEnqueueMdnsQueryCallable.java135 final List<MdnsRecord> questions = new ArrayList<>(); in call()
176 host, MdnsRecord.TYPE_A, expectUnicastResponse)); in call()
178 host, MdnsRecord.TYPE_AAAA, expectUnicastResponse)); in call()
189 final List<MdnsRecord> knownAnswers = new ArrayList<>(); in call()
DMdnsReplySender.java152 final ArraySet<MdnsRecord> answers = new ArraySet<>(); in queueReply()
153 final Set<MdnsRecord> additionalAnswers = new ArraySet<>(); in queueReply()
154 final Set<MdnsRecord> knownAnswers = new ArraySet<>(); in queueReply()
167 for (MdnsRecord knownAnswer : knownAnswers) { in queueReply()
DMdnsResponseDecoder.java132 final ArrayList<MdnsRecord> records = new ArrayList<>( in augmentResponses()
172 for (MdnsRecord record : records) { in augmentResponses()
195 for (MdnsRecord record : records) { in augmentResponses()
215 for (MdnsRecord record : records) { in augmentResponses()
DMdnsAnyRecord.java26 public class MdnsAnyRecord extends MdnsRecord {
DMdnsPointerRecord.java30 public class MdnsPointerRecord extends MdnsRecord {
DMdnsKeyRecord.java31 public class MdnsKeyRecord extends MdnsRecord {
DMdnsTextRecord.java33 public class MdnsTextRecord extends MdnsRecord {
DMdnsServiceRecord.java32 public class MdnsServiceRecord extends MdnsRecord {
/packages/modules/Connectivity/tests/unit/java/com/android/server/connectivity/mdns/
DMdnsRecordTests.java76 String fqdn = MdnsRecord.labelsToString(name); in testInet4AddressRecord()
80 assertEquals(MdnsRecord.TYPE_A, type); in testInet4AddressRecord()
82 MdnsInetAddressRecord record = new MdnsInetAddressRecord(name, MdnsRecord.TYPE_A, reader); in testInet4AddressRecord()
111 String fqdn = MdnsRecord.labelsToString(name); in testTypeAAAInet6AddressRecord()
115 assertEquals(MdnsRecord.TYPE_AAAA, type); in testTypeAAAInet6AddressRecord()
117 MdnsInetAddressRecord record = new MdnsInetAddressRecord(name, MdnsRecord.TYPE_AAAA, in testTypeAAAInet6AddressRecord()
148 String fqdn = MdnsRecord.labelsToString(name); in testTypeAAAInet4AddressRecord()
152 assertEquals(MdnsRecord.TYPE_AAAA, type); in testTypeAAAInet4AddressRecord()
154 MdnsInetAddressRecord record = new MdnsInetAddressRecord(name, MdnsRecord.TYPE_AAAA, in testTypeAAAInet4AddressRecord()
188 String fqdn = MdnsRecord.labelsToString(name); in testPointerRecord()
[all …]
DMdnsAnnouncerTest.kt73 announcedRecords: List<MdnsRecord>, in <lambda>()
74 additionalRecords: List<MdnsRecord> in <lambda>()
224 intArrayOf(MdnsRecord.TYPE_PTR)), in <lambda>()
230 intArrayOf(MdnsRecord.TYPE_PTR)), in <lambda>()
236 intArrayOf(MdnsRecord.TYPE_PTR)), in <lambda>()
242 intArrayOf(MdnsRecord.TYPE_TXT, MdnsRecord.TYPE_SRV)), in <lambda>()
248 intArrayOf(MdnsRecord.TYPE_A, MdnsRecord.TYPE_AAAA))) in <lambda>()
DMdnsReplySenderTest.kt89 intArrayOf(MdnsRecord.TYPE_TXT, MdnsRecord.TYPE_SRV)),
91 hostname /* nextDomain */, intArrayOf(MdnsRecord.TYPE_A, MdnsRecord.TYPE_AAAA)))
106 intArrayOf(MdnsRecord.TYPE_TXT, MdnsRecord.TYPE_SRV)),
109 intArrayOf(MdnsRecord.TYPE_A, MdnsRecord.TYPE_AAAA)))
182 remainingAnswers: List<MdnsRecord> in verifyReplySent()
DMdnsRecordTest.kt120 assertTrue(MdnsRecord.labelsAreSuffix(labels2, labels1)) in testLabelsAreSuffix()
121 assertTrue(MdnsRecord.labelsAreSuffix(labels3, labels1)) in testLabelsAreSuffix()
122 assertFalse(MdnsRecord.labelsAreSuffix(labels4, labels1)) in testLabelsAreSuffix()
DMdnsServiceTypeClientTests.java716 assertTrue(hasQuestion(subtype1Query, MdnsRecord.TYPE_PTR, SERVICE_TYPE_LABELS)); in testCombinedSubtypesQueriedWithMultipleListeners()
717 assertTrue(hasQuestion(subtype1Query, MdnsRecord.TYPE_PTR, in testCombinedSubtypesQueriedWithMultipleListeners()
737 assertTrue(hasQuestion(combinedSubtypesQuery, MdnsRecord.TYPE_PTR, SERVICE_TYPE_LABELS)); in testCombinedSubtypesQueriedWithMultipleListeners()
738 assertTrue(hasQuestion(combinedSubtypesQuery, MdnsRecord.TYPE_PTR, in testCombinedSubtypesQueriedWithMultipleListeners()
740 assertTrue(hasQuestion(combinedSubtypesQuery, MdnsRecord.TYPE_PTR, in testCombinedSubtypesQueriedWithMultipleListeners()
761 assertTrue(hasQuestion(subtype2Query, MdnsRecord.TYPE_PTR, SERVICE_TYPE_LABELS)); in testCombinedSubtypesQueriedWithMultipleListeners()
762 assertTrue(hasQuestion(subtype2Query, MdnsRecord.TYPE_PTR, in testCombinedSubtypesQueriedWithMultipleListeners()
1230 assertFalse(hasQuestion(srvTxtQueryPacket, MdnsRecord.TYPE_PTR)); in testProcessResponse_Resolve()
1231 assertTrue(hasQuestion(srvTxtQueryPacket, MdnsRecord.TYPE_ANY, serviceName)); in testProcessResponse_Resolve()
1271 assertTrue(hasQuestion(addressQueryPacket, MdnsRecord.TYPE_A, hostname)); in testProcessResponse_Resolve()
[all …]
DMdnsRecordRepositoryTest.kt28 import com.android.server.connectivity.mdns.MdnsRecord.TYPE_A in <lambda>()
29 import com.android.server.connectivity.mdns.MdnsRecord.TYPE_AAAA in <lambda>()
30 import com.android.server.connectivity.mdns.MdnsRecord.TYPE_KEY in <lambda>()
31 import com.android.server.connectivity.mdns.MdnsRecord.TYPE_PTR in <lambda>()
32 import com.android.server.connectivity.mdns.MdnsRecord.TYPE_SRV in <lambda>()
33 import com.android.server.connectivity.mdns.MdnsRecord.TYPE_TXT in <lambda>()
595 private fun makeQuestionRecord(name: Array<String>, type: Int): MdnsRecord { in makeQuestionRecord()
1810 questions: List<MdnsRecord>, in doGetReplyWithAnswersTest()
1811 knownAnswers: List<MdnsRecord>, in doGetReplyWithAnswersTest()
1812 replyAnswers: List<MdnsRecord>, in doGetReplyWithAnswersTest()
[all …]
DMdnsResponseTests.java88 super(name, MdnsRecord.TYPE_A, reader); in MdnsInet4AddressRecord()
94 super(name, MdnsRecord.TYPE_AAAA, reader); in MdnsInet6AddressRecord()
126 MdnsInetAddressRecord record = new MdnsInetAddressRecord(name, MdnsRecord.TYPE_A, reader); in getInet4AddressRecord_returnsAddedRecord()
140 new MdnsInetAddressRecord(name, MdnsRecord.TYPE_AAAA, reader); in getInet6AddressRecord_returnsAddedRecord()
/packages/modules/Connectivity/tests/unit/java/com/android/server/connectivity/mdns/util/
DMdnsUtilsTest.kt25 import com.android.server.connectivity.mdns.MdnsRecord in <lambda>()
142 val questions = mutableListOf<MdnsRecord>() in <lambda>()
143 val knownAnswers = mutableListOf<MdnsRecord>() in <lambda>()
158 questions as List<MdnsRecord>, in <lambda>()
159 knownAnswers as List<MdnsRecord>, in <lambda>()
183 val questions = mutableListOf<MdnsRecord>() in <lambda>()
184 val answers = mutableListOf<MdnsRecord>() in <lambda>()
/packages/modules/Connectivity/service-t/src/com/android/server/connectivity/mdns/util/
DMdnsUtils.java33 import com.android.server.connectivity.mdns.MdnsRecord;
140 && MdnsRecord.labelsAreSuffix(a, b)); in typeEqualsOrIsSubtype()
208 for (MdnsRecord record : packet.questions) { in writeMdnsPacket()
212 for (MdnsRecord record : packet.answers) { in writeMdnsPacket()
215 for (MdnsRecord record : packet.authorityRecords) { in writeMdnsPacket()
218 for (MdnsRecord record : packet.additionalRecords) { in writeMdnsPacket()
266 for (MdnsRecord record : packet.questions) { in writePossibleMdnsPacket()
272 for (MdnsRecord record : packet.answers) { in writePossibleMdnsPacket()
336 public static boolean isRecordRenewalNeeded(@NonNull MdnsRecord mdnsRecord, final long now) { in isRecordRenewalNeeded()

12