mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 15:47:45 +00:00
Rename DNSLookupServer => LookupServer.
This commit is contained in:
parent
67009cee8e
commit
9120b05a40
10 changed files with 21 additions and 22 deletions
27
Servers/LookupServer/DNSRecord.h
Normal file
27
Servers/LookupServer/DNSRecord.h
Normal file
|
@ -0,0 +1,27 @@
|
|||
#pragma once
|
||||
|
||||
#include <AK/Types.h>
|
||||
#include <Kernel/NetworkOrdered.h>
|
||||
|
||||
class [[gnu::packed]] DNSRecord {
|
||||
public:
|
||||
DNSRecord() { }
|
||||
|
||||
word name() const { return m_name; }
|
||||
word type() const { return m_type; }
|
||||
word record_class() const { return m_class; }
|
||||
dword ttl() const { return m_ttl; }
|
||||
word data_length() const { return m_data_length; }
|
||||
|
||||
void* data() { return this + 1; }
|
||||
const void* data() const { return this + 1; }
|
||||
|
||||
private:
|
||||
NetworkOrdered<word> m_name;
|
||||
NetworkOrdered<word> m_type;
|
||||
NetworkOrdered<word> m_class;
|
||||
NetworkOrdered<dword> m_ttl;
|
||||
NetworkOrdered<word> m_data_length;
|
||||
};
|
||||
|
||||
static_assert(sizeof(DNSRecord) == 12);
|
Loading…
Add table
Add a link
Reference in a new issue