From e23fd7a23da9062f85390985ba2aec4ac9e73315 Mon Sep 17 00:00:00 2001 From: Suraxius Date: Tue, 19 Jan 2021 08:48:13 +0100 Subject: [PATCH] wip --- src/resolver/include/Message.hpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/resolver/include/Message.hpp b/src/resolver/include/Message.hpp index 79cfaed..d6364be 100644 --- a/src/resolver/include/Message.hpp +++ b/src/resolver/include/Message.hpp @@ -10,12 +10,13 @@ class Message //private: //const enum id {}; - struct QR { enum { QUERY, RESPONSE }; }; - struct OpCode { enum { QUERY, IQUERY, STATUS, _reserved, NOTIFY, UPDATE }; }; - struct RCode { enum { NO_ERR, FORMAT_ERR, SERVER_FAIL, NAME_ERR, NOT_IMPL, REFUSED, YX_DOM, YX_RR_SET, NX_RR_SET, NOT_AUTH, NOT_ZONE }; }; - struct Header { - unsigned int id : 16; //dentifier: A 16-bit identification field generated by the device that creates the DNS query. It is copied by the server into the response, so it can be used by that device to match that query to the corresponding reply received from a DNS server. This is used in a manner similar to how the Identifier field is used in many of the ICMP message types. + struct QR { enum { QUERY, RESPONSE }; }; + struct OpCode { enum { QUERY, IQUERY, STATUS, _reserved, NOTIFY, UPDATE }; }; + struct RCode { enum { NO_ERR, FORMAT_ERR, SERVER_FAIL, NAME_ERR, NOT_IMPL, REFUSED, YX_DOM, YX_RR_SET, NX_RR_SET, NOT_AUTH, NOT_ZONE }; }; + + + unsigned int id : 16; //Identifier: A 16-bit identification field generated by the device that creates the DNS query. It is copied by the server into the response, so it can be used by that device to match that query to the corresponding reply received from a DNS server. This is used in a manner similar to how the Identifier field is used in many of the ICMP message types. unsigned int qr : 1; //Query/Response Flag: Differentiates between queries and responses. Set to 0 when the query is generated; changed to 1 when that query is changed to a response by a replying server.