diff options
Diffstat (limited to 'Userland/Services/LookupServer/DNSQuestion.h')
-rw-r--r-- | Userland/Services/LookupServer/DNSQuestion.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Userland/Services/LookupServer/DNSQuestion.h b/Userland/Services/LookupServer/DNSQuestion.h index 870ceec9e0..dfe5826b55 100644 --- a/Userland/Services/LookupServer/DNSQuestion.h +++ b/Userland/Services/LookupServer/DNSQuestion.h @@ -11,23 +11,29 @@ namespace LookupServer { +#define MDNS_WANTS_UNICAST_RESPONSE 0x8000 + class DNSQuestion { public: - DNSQuestion(const DNSName& name, u16 record_type, u16 class_code) + DNSQuestion(const DNSName& name, u16 record_type, u16 class_code, bool mdns_wants_unicast_response) : m_name(name) , m_record_type(record_type) , m_class_code(class_code) + , m_mdns_wants_unicast_response(mdns_wants_unicast_response) { } u16 record_type() const { return m_record_type; } u16 class_code() const { return m_class_code; } + u16 raw_class_code() const { return (u16)m_class_code | (m_mdns_wants_unicast_response ? MDNS_WANTS_UNICAST_RESPONSE : 0); } const DNSName& name() const { return m_name; } + bool mdns_wants_unicast_response() const { return m_mdns_wants_unicast_response; } private: DNSName m_name; u16 m_record_type { 0 }; u16 m_class_code { 0 }; + bool m_mdns_wants_unicast_response { false }; }; } |