/external/openscreen/discovery/mdns/ |
D | mdns_publisher.h | 68 Error RegisterRecord(const MdnsRecord& record); 72 Error UpdateRegisteredRecord(const MdnsRecord& old_record, 73 const MdnsRecord& new_record); 76 Error UnregisterRecord(const MdnsRecord& record); 93 RecordAnnouncer(MdnsRecord record, 105 const MdnsRecord& record() const { return record_; } in record() 132 const MdnsRecord record_; 149 RecordAnnouncerPtr CreateAnnouncer(MdnsRecord record) { in CreateAnnouncer() 157 Error RemoveRecord(const MdnsRecord& record, bool should_announce_deletion); 160 bool IsRecordNameClaimed(const MdnsRecord& record) const; [all …]
|
D | mdns_records.cc | 541 ErrorOr<MdnsRecord> MdnsRecord::TryCreate(DomainName name, in TryCreate() 550 return MdnsRecord(std::move(name), dns_type, dns_class, record_type, ttl, in TryCreate() 555 MdnsRecord::MdnsRecord() = default; 557 MdnsRecord::MdnsRecord(DomainName name, in MdnsRecord() function in openscreen::discovery::MdnsRecord 572 MdnsRecord::MdnsRecord(const MdnsRecord& other) = default; 574 MdnsRecord::MdnsRecord(MdnsRecord&& other) noexcept = default; 576 MdnsRecord& MdnsRecord::operator=(const MdnsRecord& rhs) = default; 578 MdnsRecord& MdnsRecord::operator=(MdnsRecord&& rhs) = default; 581 bool MdnsRecord::IsValidConfig(const DomainName& name, in IsValidConfig() 608 bool MdnsRecord::operator==(const MdnsRecord& rhs) const { in operator ==() [all …]
|
D | mdns_records.h | 448 class MdnsRecord { 450 using ConstRef = std::reference_wrapper<const MdnsRecord>; 452 static ErrorOr<MdnsRecord> TryCreate(DomainName name, 459 MdnsRecord(); 460 MdnsRecord(DomainName name, 466 MdnsRecord(const MdnsRecord& other); 467 MdnsRecord(MdnsRecord&& other) noexcept; 469 MdnsRecord& operator=(const MdnsRecord& rhs); 470 MdnsRecord& operator=(MdnsRecord&& rhs); 471 bool operator==(const MdnsRecord& other) const; [all …]
|
D | mdns_records_unittest.cc | 516 MdnsRecord record1; in TEST() 526 MdnsRecord record2(DomainName{"hostname", "local"}, DnsType::kPTR, in TEST() 540 const MdnsRecord record1(DomainName{"hostname", "local"}, DnsType::kPTR, in TEST() 543 const MdnsRecord record2(DomainName{"hostname", "local"}, DnsType::kPTR, in TEST() 546 const MdnsRecord record3(DomainName{"othername", "local"}, DnsType::kPTR, in TEST() 549 const MdnsRecord record4(DomainName{"hostname", "local"}, DnsType::kA, in TEST() 552 const MdnsRecord record5(DomainName{"hostname", "local"}, DnsType::kPTR, in TEST() 555 const MdnsRecord record6(DomainName{"hostname", "local"}, DnsType::kPTR, in TEST() 559 const MdnsRecord record7(DomainName{"hostname", "local"}, DnsType::kPTR, in TEST() 562 const MdnsRecord record8( in TEST() [all …]
|
D | mdns_querier.h | 116 int Update(const MdnsRecord& record, TrackerApplicableCheck check); 117 int Update(const MdnsRecord& record, 123 const MdnsRecordTracker& StartTracking(MdnsRecord record, DnsType type); 168 const MdnsRecord& record); 172 bool ShouldAnswerRecordBeProcessed(const MdnsRecord& answer); 177 void ProcessRecord(const MdnsRecord& records); 180 void ProcessSharedRecord(const MdnsRecord& record, DnsType type); 183 void ProcessUniqueRecord(const MdnsRecord& record, DnsType type); 188 void ProcessSinglyTrackedUniqueRecord(const MdnsRecord& record, 194 void ProcessMultiTrackedUniqueRecord(const MdnsRecord& record, [all …]
|
D | mdns_publisher.cc | 37 inline MdnsRecord CreateGoodbyeRecord(const MdnsRecord& record) { in CreateGoodbyeRecord() 41 return MdnsRecord(record.name(), record.dns_type(), record.dns_class(), in CreateGoodbyeRecord() 70 Error MdnsPublisher::RegisterRecord(const MdnsRecord& record) { in RegisterRecord() 97 Error MdnsPublisher::UnregisterRecord(const MdnsRecord& record) { in UnregisterRecord() 110 Error MdnsPublisher::UpdateRegisteredRecord(const MdnsRecord& old_record, in UpdateRegisteredRecord() 111 const MdnsRecord& new_record) { in UpdateRegisteredRecord() 162 std::vector<MdnsRecord::ConstRef> MdnsPublisher::GetRecords( in GetRecords() 168 std::vector<MdnsRecord::ConstRef> records; in GetRecords() 185 std::vector<MdnsRecord::ConstRef> MdnsPublisher::GetPtrRecords(DnsClass clazz) { in GetPtrRecords() 186 std::vector<MdnsRecord::ConstRef> records; in GetPtrRecords() [all …]
|
D | mdns_querier_unittest.cc | 37 const MdnsRecord& actual = arg0; in ACTION_P() 49 (const MdnsRecord&, RecordChangedEvent event), 114 MdnsRecord CreateNsec(DomainName name, DnsTypes... types) { in CreateNsec() 116 return MdnsRecord(std::move(name), nsec_record_created_.dns_type(), in CreateNsec() 123 const std::vector<MdnsRecord::ConstRef>& records, in CreatePacketWithRecords() 124 std::vector<MdnsRecord::ConstRef> additional_records) { in CreatePacketWithRecords() 126 for (const MdnsRecord& record : records) { in CreatePacketWithRecords() 129 for (const MdnsRecord& additional_record : additional_records) { in CreatePacketWithRecords() 140 const std::vector<MdnsRecord::ConstRef>& records) { in CreatePacketWithRecords() 144 UdpPacket CreatePacketWithRecord(const MdnsRecord& record) { in CreatePacketWithRecord() [all …]
|
D | mdns_responder.h | 55 virtual std::vector<MdnsRecord::ConstRef> GetRecords(const DomainName& name, 60 virtual std::vector<MdnsRecord::ConstRef> GetPtrRecords(DnsClass clazz) = 0; 102 void AddKnownAnswers(const std::vector<MdnsRecord>& records); 109 const std::vector<MdnsRecord>& known_answers() const { in known_answers() 126 std::vector<MdnsRecord> known_answers_; 143 const std::vector<MdnsRecord>& known_answers); 147 const std::vector<MdnsRecord>& known_answers,
|
D | mdns_trackers.h | 24 class MdnsRecord; variable 68 virtual std::vector<MdnsRecord> GetRecords() const = 0; 106 std::function<void(const MdnsRecordTracker*, const MdnsRecord&)>; 110 MdnsRecordTracker(MdnsRecord record, 132 ErrorOr<UpdateType> Update(const MdnsRecord& new_record); 183 std::vector<MdnsRecord> GetRecords() const override; 186 MdnsRecord record_; 235 std::vector<MdnsRecord> GetRecords() const override;
|
D | mdns_responder.cc | 59 MdnsRecord CreateNsecRecord(DomainName target_name, in CreateNsecRecord() 64 return MdnsRecord(std::move(target_name), DnsType::kNSEC, target_class, in CreateNsecRecord() 73 AddResult AddRecords(std::function<void(MdnsRecord record)> add_func, in AddRecords() 76 const std::vector<MdnsRecord>& known_answers, in AddRecords() 105 const std::vector<MdnsRecord>& known_answers, in AddAdditionalRecords() 111 auto add_func = [message](MdnsRecord record) { in AddAdditionalRecords() 122 const std::vector<MdnsRecord>& known_answers, in AddResponseRecords() 126 auto add_func = [message](MdnsRecord record) { in AddResponseRecords() 136 const std::vector<MdnsRecord>& known_answers, in ApplyQueryResults() 161 for (const MdnsRecord& record : message->answers()) { in ApplyQueryResults() [all …]
|
D | mdns_publisher_unittest.cc | 28 bool ContainsRecord(const std::vector<MdnsRecord::ConstRef>& records, in ContainsRecord() 29 MdnsRecord record) { in ContainsRecord() 31 [&record](const MdnsRecord& ref) { in ContainsRecord() 93 Error IsAnnounced(const MdnsRecord& original, const MdnsMessage& message) { in IsAnnounced() 100 const MdnsRecord& sent = message.answers()[0]; in IsAnnounced() 110 Error IsGoodbyeRecord(const MdnsRecord& original, in IsGoodbyeRecord() 118 const MdnsRecord& sent = message.answers()[0]; in IsGoodbyeRecord() 130 std::vector<MdnsRecord> expected_records) { in CheckPublishedRecords() 138 void TestUniqueRecordRegistrationWorkflow(MdnsRecord record, in TestUniqueRecordRegistrationWorkflow() 139 MdnsRecord record2) { in TestUniqueRecordRegistrationWorkflow() [all …]
|
D | mdns_querier.cc | 29 bool IsNegativeResponseFor(const MdnsRecord& record, DnsType type) { in IsNegativeResponseFor() 61 bool CompareRecordByNameAndType(const MdnsRecord& first, in CompareRecordByNameAndType() 62 const MdnsRecord& second) { in CompareRecordByNameAndType() 148 void RemoveInvalidNsecFlags(std::vector<MdnsRecord>* records) { in RemoveInvalidNsecFlags() 156 std::vector<std::vector<MdnsRecord>::iterator> nsecs_to_delete; in RemoveInvalidNsecFlags() 204 *nsec = MdnsRecord(nsec->name(), nsec->dns_type(), nsec->dns_class(), in RemoveInvalidNsecFlags() 296 int MdnsQuerier::RecordTrackerLruCache::Update(const MdnsRecord& record, in Update() 302 const MdnsRecord& record, in Update() 335 MdnsRecord record, in StartTracking() 338 const MdnsRecord& record) { in StartTracking() [all …]
|
D | mdns_trackers.cc | 41 bool IsGoodbyeRecord(const MdnsRecord& record) { in IsGoodbyeRecord() 45 bool IsNegativeResponseForType(const MdnsRecord& record, DnsType dns_type) { in IsNegativeResponseForType() 132 MdnsRecord record, in MdnsRecordTracker() 165 const MdnsRecord& new_record) { in Update() 198 record_ = MdnsRecord(new_record.name(), new_record.dns_type(), in Update() 231 MdnsRecord(record_.name(), record_.dns_type(), record_.dns_class(), in ExpireSoon() 273 std::vector<MdnsRecord> MdnsRecordTracker::GetRecords() const { in GetRecords() 345 std::vector<MdnsRecord> MdnsQuestionTracker::GetRecords() const { in GetRecords() 346 std::vector<MdnsRecord> records; in GetRecords() 352 std::vector<MdnsRecord> node_records = tracker->GetRecords(); in GetRecords() [all …]
|
D | mdns_trackers_unittest.cc | 66 (const MdnsRecord&, RecordChangedEvent event), 104 const MdnsRecord& record, in CreateRecordTracker() 108 [this](const MdnsRecordTracker* tracker, const MdnsRecord& record) { in CreateRecordTracker() 114 const MdnsRecord& record) { in CreateRecordTracker() 139 const MdnsRecord& GetRecord(MdnsRecordTracker* tracker) { in GetRecord() 183 MdnsRecord a_record_; 184 MdnsRecord nsec_record_; 314 MdnsRecord goodbye_record(a_record_.name(), a_record_.dns_type(), in TEST_F() 333 MdnsRecord invalid_name(DomainName{"invalid"}, a_record_.dns_type(), in TEST_F() 339 MdnsRecord invalid_type(a_record_.name(), DnsType::kPTR, in TEST_F() [all …]
|
D | mdns_reader_unittest.cc | 484 MdnsRecord(DomainName{"testing", "local"}, DnsType::kA, in TEST() 507 MdnsRecord(DomainName{"testing", "local"}, in TEST() 540 MdnsRecord record; in TEST() 543 MdnsRecord(DomainName{"testing", "local"}, DnsType::kPTR, in TEST() 547 EXPECT_EQ(record, MdnsRecord(DomainName{"one", "two", "testing", "local"}, in TEST() 564 TestReadEntryFails<MdnsRecord>(kTestRecord, sizeof(kTestRecord)); in TEST() 580 TestReadEntryFails<MdnsRecord>(kTestRecord, sizeof(kTestRecord)); in TEST() 671 MdnsRecord record1(DomainName{"record1"}, DnsType::kPTR, DnsClass::kIN, in TEST() 674 MdnsRecord record2(DomainName{"record2"}, DnsType::kA, DnsClass::kIN, in TEST() 678 std::vector<MdnsRecord>{record1}, in TEST() [all …]
|
D | mdns_responder_unittest.cc | 25 bool ContainsRecordType(const std::vector<MdnsRecord>& records, DnsType type) { in ContainsRecordType() 27 [type](const MdnsRecord& record) { in ContainsRecordType() 34 const MdnsRecord record = message.answers()[0]; in CheckSingleNsecRecordType() 43 void CheckPtrDomain(const MdnsRecord& record, const DomainName& domain) { in CheckPtrDomain() 50 void ExpectContainsNsecRecordType(const std::vector<MdnsRecord>& records, in ExpectContainsNsecRecordType() 53 records.begin(), records.end(), [type](const MdnsRecord& record) { in ExpectContainsNsecRecordType() 75 void AddRecord(MdnsRecord record) { records_.push_back(record); } in AddRecord() 79 std::vector<MdnsRecord::ConstRef> GetRecords(const DomainName& name, in GetRecords() 82 std::vector<MdnsRecord::ConstRef> records; in GetRecords() 92 std::vector<MdnsRecord::ConstRef> GetPtrRecords(DnsClass clazz) override { in GetPtrRecords() [all …]
|
D | mdns_service_impl.h | 60 Error RegisterRecord(const MdnsRecord& record) override; 61 Error UpdateRegisteredRecord(const MdnsRecord& old_record, 62 const MdnsRecord& new_record) override; 63 Error UnregisterRecord(const MdnsRecord& record) override;
|
/external/openscreen/discovery/mdns/testing/ |
D | mdns_test_util.cc | 22 MdnsRecord GetFakePtrRecord(const DomainName& target, in GetFakePtrRecord() 26 return MdnsRecord(std::move(name), DnsType::kPTR, DnsClass::kIN, in GetFakePtrRecord() 30 MdnsRecord GetFakeSrvRecord(const DomainName& name, std::chrono::seconds ttl) { in GetFakeSrvRecord() 34 MdnsRecord GetFakeSrvRecord(const DomainName& name, in GetFakeSrvRecord() 38 return MdnsRecord(name, DnsType::kSRV, DnsClass::kIN, RecordType::kUnique, in GetFakeSrvRecord() 42 MdnsRecord GetFakeTxtRecord(const DomainName& name, std::chrono::seconds ttl) { in GetFakeTxtRecord() 44 return MdnsRecord(name, DnsType::kTXT, DnsClass::kIN, RecordType::kUnique, in GetFakeTxtRecord() 48 MdnsRecord GetFakeARecord(const DomainName& name, std::chrono::seconds ttl) { in GetFakeARecord() 50 return MdnsRecord(name, DnsType::kA, DnsClass::kIN, RecordType::kUnique, ttl, in GetFakeARecord() 54 MdnsRecord GetFakeAAAARecord(const DomainName& name, std::chrono::seconds ttl) { in GetFakeAAAARecord() [all …]
|
D | mdns_test_util.h | 23 MdnsRecord GetFakePtrRecord(const DomainName& target, 25 MdnsRecord GetFakeSrvRecord(const DomainName& name, 27 MdnsRecord GetFakeSrvRecord(const DomainName& name, 30 MdnsRecord GetFakeTxtRecord(const DomainName& name, 32 MdnsRecord GetFakeARecord(const DomainName& name, 34 MdnsRecord GetFakeAAAARecord(
|
/external/openscreen/discovery/dnssd/impl/ |
D | conversion_layer.cc | 55 MdnsRecord CreatePtrRecord(const DnsSdInstance& instance, in CreatePtrRecord() 60 return MdnsRecord(std::move(outer_domain), DnsType::kPTR, DnsClass::kIN, in CreatePtrRecord() 64 MdnsRecord CreateSrvRecord(const DnsSdInstance& instance, in CreateSrvRecord() 68 return MdnsRecord(domain, DnsType::kSRV, DnsClass::kIN, RecordType::kUnique, in CreateSrvRecord() 72 std::vector<MdnsRecord> CreateARecords(const DnsSdInstanceEndpoint& endpoint, in CreateARecords() 74 std::vector<MdnsRecord> records; in CreateARecords() 86 std::vector<MdnsRecord> CreateAAAARecords(const DnsSdInstanceEndpoint& endpoint, in CreateAAAARecords() 88 std::vector<MdnsRecord> records; in CreateAAAARecords() 101 MdnsRecord CreateTxtRecord(const DnsSdInstance& endpoint, in CreateTxtRecord() 104 return MdnsRecord(domain, DnsType::kTXT, DnsClass::kIN, RecordType::kUnique, in CreateTxtRecord() [all …]
|
D | conversion_layer.h | 31 bool IsPtrRecord(const MdnsRecord& record); 34 bool HasValidDnsRecordAddress(const MdnsRecord& record); 45 DomainName GetDomainName(const MdnsRecord& record); 56 std::vector<MdnsRecord> GetDnsRecords(const DnsSdInstanceEndpoint& endpoint); 57 std::vector<MdnsRecord> GetDnsRecords(const DnsSdInstance& instance);
|
D | querier_impl_unittest.cc | 53 MOCK_METHOD1(RegisterRecord, Error(const MdnsRecord&)); 54 MOCK_METHOD1(UnregisterRecord, Error(const MdnsRecord&)); 56 Error(const MdnsRecord&, const MdnsRecord&)); 74 Error(MdnsRecord, 174 MdnsRecord ptr = GetFakePtrRecord(service_domain); in CreateServiceInstance() 175 MdnsRecord srv = GetFakeSrvRecord(service_domain); in CreateServiceInstance() 176 MdnsRecord txt = GetFakeTxtRecord(service_domain); in CreateServiceInstance() 177 MdnsRecord a = GetFakeARecord(service_domain); in CreateServiceInstance() 178 MdnsRecord aaaa = GetFakeAAAARecord(service_domain); in CreateServiceInstance() 303 MdnsRecord ptr = GetFakePtrRecord(name); in TEST_F() [all …]
|
D | publisher_impl_unittest.cc | 52 Error(const MdnsRecord&, const MdnsRecord&)); 53 MOCK_METHOD1(RegisterRecord, Error(const MdnsRecord& record)); 54 MOCK_METHOD1(UnregisterRecord, Error(const MdnsRecord& record)); 104 &domain2](const MdnsRecord& record) mutable -> Error { in TEST_F() 137 &address](const MdnsRecord& record) mutable -> Error { in TEST_F() 186 .WillRepeatedly([&seen_v6](const MdnsRecord& record) mutable -> Error { in TEST_F() 207 .WillOnce([](const MdnsRecord& record) -> Error { in TEST_F() 212 .WillOnce([](const MdnsRecord& record) -> Error { in TEST_F() 218 [](const MdnsRecord& record, const MdnsRecord& record2) -> Error { in TEST_F()
|
D | conversion_layer_unittest.cc | 106 std::vector<MdnsRecord> records = GetDnsRecords(instance_endpoint); in TEST() 108 [](const MdnsRecord& record) { in TEST() 142 std::vector<MdnsRecord> records = GetDnsRecords(instance_endpoint); in TEST() 144 [](const MdnsRecord& record) { in TEST() 174 std::vector<MdnsRecord> records = GetDnsRecords(instance_endpoint); in TEST() 176 [](const MdnsRecord& record) { in TEST() 203 std::vector<MdnsRecord> records = GetDnsRecords(instance_endpoint); in TEST() 205 [](const MdnsRecord& record) { in TEST() 220 std::vector<MdnsRecord> records = GetDnsRecords(instance_endpoint); in TEST() 222 [](const MdnsRecord& record) { in TEST() [all …]
|
/external/openscreen/discovery/mdns/public/ |
D | mdns_service.h | 25 class MdnsRecord; variable 75 virtual Error RegisterRecord(const MdnsRecord& record) = 0; 79 virtual Error UpdateRegisteredRecord(const MdnsRecord& old_record, 80 const MdnsRecord& new_record) = 0; 85 virtual Error UnregisterRecord(const MdnsRecord& record) = 0;
|