Home
last modified time | relevance | path

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

123

/external/openscreen/discovery/mdns/
Dmdns_publisher.h68 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 …]
Dmdns_records.cc541 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 …]
Dmdns_records.h448 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 …]
Dmdns_records_unittest.cc516 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 …]
Dmdns_querier.h116 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 …]
Dmdns_publisher.cc37 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 …]
Dmdns_querier_unittest.cc37 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 …]
Dmdns_responder.h55 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,
Dmdns_trackers.h24 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;
Dmdns_responder.cc59 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 …]
Dmdns_publisher_unittest.cc28 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 …]
Dmdns_querier.cc29 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 …]
Dmdns_trackers.cc41 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 …]
Dmdns_trackers_unittest.cc66 (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 …]
Dmdns_reader_unittest.cc484 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 …]
Dmdns_responder_unittest.cc25 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 …]
Dmdns_service_impl.h60 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/
Dmdns_test_util.cc22 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 …]
Dmdns_test_util.h23 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/
Dconversion_layer.cc55 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 …]
Dconversion_layer.h31 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);
Dquerier_impl_unittest.cc53 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 …]
Dpublisher_impl_unittest.cc52 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()
Dconversion_layer_unittest.cc106 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/
Dmdns_service.h25 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;

123