mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 22:27:35 +00:00
LookupServer: Split mDNS flags into separate field
This commit is contained in:
parent
233a9554a5
commit
6e70888315
6 changed files with 31 additions and 13 deletions
|
@ -12,15 +12,19 @@
|
|||
|
||||
namespace LookupServer {
|
||||
|
||||
#define MDNS_CACHE_FLUSH 0x8000
|
||||
|
||||
class DNSAnswer {
|
||||
public:
|
||||
DNSAnswer(const DNSName& name, u16 type, u16 class_code, u32 ttl, const String& record_data);
|
||||
DNSAnswer(const DNSName& name, u16 type, u16 class_code, u32 ttl, const String& record_data, bool mdns_cache_flush);
|
||||
|
||||
const DNSName& name() const { return m_name; }
|
||||
u16 type() const { return m_type; }
|
||||
u16 class_code() const { return m_class_code; }
|
||||
u16 raw_class_code() const { return m_class_code | (m_mdns_cache_flush ? MDNS_CACHE_FLUSH : 0); }
|
||||
u32 ttl() const { return m_ttl; }
|
||||
const String& record_data() const { return m_record_data; }
|
||||
bool mdns_cache_flush() const { return m_mdns_cache_flush; }
|
||||
|
||||
bool has_expired() const;
|
||||
|
||||
|
@ -31,6 +35,7 @@ private:
|
|||
u32 m_ttl { 0 };
|
||||
time_t m_expiration_time { 0 };
|
||||
String m_record_data;
|
||||
bool m_mdns_cache_flush { false };
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue