]> git.ipfire.org Git - thirdparty/pdns.git/blobdiff - pdns/dnsdist-idstate.hh
Merge pull request #13387 from omoerbeek/rec-b-root-servers
[thirdparty/pdns.git] / pdns / dnsdist-idstate.hh
index b61984249e5a5a35f69aba2a9c41dccc98c6746c..e1fb8d38e1534b63c13d68e00078a36dd40c6950 100644 (file)
  */
 #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;
 class DNSCryptQuery;
 class DNSDistPacketCache;
 
 using QTag = std::unordered_map<string, string>;
+using HeadersMap = std::unordered_map<std::string, std::string>;
 
 struct StopWatch
 {
@@ -89,6 +96,8 @@ private:
   bool d_needRealTime;
 };
 
+class CrossProtocolContext;
+
 struct InternalQueryState
 {
   struct ProtoBufData
@@ -99,12 +108,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;
   }
@@ -128,9 +132,13 @@ struct InternalQueryState
   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
+  int32_t d_streamID{-1}; // 4
+  std::unique_ptr<DOQUnit> doqu{nullptr}; // 8
   uint32_t cacheKey{0}; // 4
   uint32_t cacheKeyNoECS{0}; // 4
   // DoH-only */