summaryrefslogtreecommitdiffstats
path: root/dnsdist-idstate.hh
diff options
context:
space:
mode:
Diffstat (limited to 'dnsdist-idstate.hh')
-rw-r--r--dnsdist-idstate.hh40
1 files changed, 31 insertions, 9 deletions
diff --git a/dnsdist-idstate.hh b/dnsdist-idstate.hh
index b619842..d22d274 100644
--- a/dnsdist-idstate.hh
+++ b/dnsdist-idstate.hh
@@ -21,19 +21,27 @@
*/
#pragma once
+#include <unordered_map>
+
#include "config.h"
+#include "dnscrypt.hh"
#include "dnsname.hh"
#include "dnsdist-protocols.hh"
+#include "ednsextendederror.hh"
#include "gettime.hh"
#include "iputils.hh"
+#include "noinitvector.hh"
#include "uuid-utils.hh"
struct ClientState;
-struct DOHUnit;
+struct DOHUnitInterface;
+struct DOQUnit;
+struct DOH3Unit;
class DNSCryptQuery;
class DNSDistPacketCache;
using QTag = std::unordered_map<string, string>;
+using HeadersMap = std::unordered_map<std::string, std::string>;
struct StopWatch
{
@@ -89,6 +97,8 @@ private:
bool d_needRealTime;
};
+class CrossProtocolContext;
+
struct InternalQueryState
{
struct ProtoBufData
@@ -99,12 +109,7 @@ struct InternalQueryState
std::string d_requestorID;
};
- static void DeleterPlaceHolder(DOHUnit*)
- {
- }
-
- InternalQueryState() :
- du(std::unique_ptr<DOHUnit, void (*)(DOHUnit*)>(nullptr, DeleterPlaceHolder))
+ InternalQueryState()
{
origDest.sin4.sin_family = 0;
}
@@ -115,22 +120,39 @@ struct InternalQueryState
InternalQueryState(const InternalQueryState& orig) = delete;
InternalQueryState& operator=(const InternalQueryState& orig) = delete;
+ bool isXSK() const noexcept
+ {
+#ifdef HAVE_XSK
+ return !xskPacketHeader.empty();
+#else
+ return false;
+#endif /* HAVE_XSK */
+ }
+
boost::optional<Netmask> subnet{boost::none}; // 40
+ std::string poolName; // 32
ComboAddress origRemote; // 28
ComboAddress origDest; // 28
ComboAddress hopRemote;
ComboAddress hopLocal;
DNSName qname; // 24
- std::string poolName; // 24
+#ifdef HAVE_XSK
+ PacketBuffer xskPacketHeader; // 24
+#endif /* HAVE_XSK */
StopWatch queryRealTime{true}; // 24
std::shared_ptr<DNSDistPacketCache> packetCache{nullptr}; // 16
std::unique_ptr<DNSCryptQuery> dnsCryptQuery{nullptr}; // 8
std::unique_ptr<QTag> qTag{nullptr}; // 8
std::unique_ptr<PacketBuffer> d_packet{nullptr}; // Initial packet, so we can restart the query from the response path if needed // 8
std::unique_ptr<ProtoBufData> d_protoBufData{nullptr};
+ std::unique_ptr<EDNSExtendedError> d_extendedError{nullptr};
boost::optional<uint32_t> tempFailureTTL{boost::none}; // 8
ClientState* cs{nullptr}; // 8
- std::unique_ptr<DOHUnit, void (*)(DOHUnit*)> du; // 8
+ std::unique_ptr<DOHUnitInterface> du; // 8
+ size_t d_proxyProtocolPayloadSize{0}; // 8
+ std::unique_ptr<DOQUnit> doqu{nullptr}; // 8
+ std::unique_ptr<DOH3Unit> doh3u{nullptr}; // 8
+ int32_t d_streamID{-1}; // 4
uint32_t cacheKey{0}; // 4
uint32_t cacheKeyNoECS{0}; // 4
// DoH-only */