bool d_hasV6;
};
+#ifndef DISABLE_PROTOBUF
static DnstapMessage::ProtocolType ProtocolToDNSTap(dnsdist::Protocol protocol)
{
if (protocol == dnsdist::Protocol::DoUDP) {
std::string d_ipEncryptKey;
};
+#endif /* DISABLE_PROTOBUF */
+
class SNMPTrapAction : public DNSAction
{
public:
std::string d_value;
};
+#ifndef DISABLE_PROTOBUF
class DnstapLogResponseAction : public DNSResponseAction, public boost::noncopyable
{
public:
bool d_includeCNAME;
};
+#endif /* DISABLE_PROTOBUF */
+
class DropResponseAction : public DNSResponseAction
{
public:
return std::shared_ptr<DNSResponseAction>(new LuaFFIPerThreadResponseAction(code));
});
+#ifndef DISABLE_PROTOBUF
luaCtx.writeFunction("RemoteLogAction", [](std::shared_ptr<RemoteLoggerInterface> logger, boost::optional<std::function<void(DNSQuestion*, DNSDistProtoBufMessage*)> > alterFunc, boost::optional<std::unordered_map<std::string, std::string>> vars) {
if (logger) {
// avoids potentially-evaluated-expression warning with clang.
luaCtx.writeFunction("DnstapLogResponseAction", [](const std::string& identity, std::shared_ptr<RemoteLoggerInterface> logger, boost::optional<std::function<void(DNSResponse*, DnstapMessage*)> > alterFunc) {
return std::shared_ptr<DNSResponseAction>(new DnstapLogResponseAction(identity, logger, alterFunc));
});
+#endif /* DISABLE_PROTOBUF */
luaCtx.writeFunction("TeeAction", [](const std::string& remote, boost::optional<bool> addECS) {
return std::shared_ptr<DNSAction>(new TeeAction(ComboAddress(remote, 53), addECS ? *addECS : false));
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "config.h"
+
+#ifndef DISABLE_PROTOBUF
#include "dnsdist.hh"
#include "dnsdist-protobuf.hh"
#include "protozero.hh"
m.commitResponse();
}
+
+#endif /* DISABLE_PROTOBUF */
#include "dnsdist.hh"
#include "dnsname.hh"
+
+#ifndef DISABLE_PROTOBUF
#include "protozero.hh"
class DNSDistProtoBufMessage
pdns::ProtoZero::Message::MessageType d_type{pdns::ProtoZero::Message::MessageType::DNSQueryType};
bool d_includeCNAME{false};
};
+
+#endif /* DISABLE_PROTOBUF */
#ifdef HAVE_NGHTTP2
cout<<"outgoing-dns-over-https(nghttp2) ";
#endif
+#ifndef DISABLE_PROTOBUF
cout<<"protobuf ";
+#endif
#ifdef HAVE_RE2
cout<<"re2 ";
#endif
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "config.h"
+
#include "dnsdist.hh"
#include "dnsdist-lua.hh"
+#ifndef DISABLE_PROTOBUF
#include "dnsdist-protobuf.hh"
#include "dnstap.hh"
#include "fstrm_logger.hh"
return std::string();
});
}
+#else /* DISABLE_PROTOBUF */
+void setupLuaBindingsProtoBuf(LuaContext&, bool, bool)
+{
+}
+#endif /* DISABLE_PROTOBUF */
#include "gettime.hh"
#include "dnstap.hh"
+#ifndef DISABLE_PROTOBUF
+
#include <protozero/pbf_writer.hpp>
namespace DnstapBaseFields {
protozero::pbf_writer pbf{d_buffer};
pbf.add_bytes(DnstapBaseFields::extra, extra);
}
+
+#endif /* DISABLE_PROTOBUF */
#include "dnsname.hh"
#include "iputils.hh"
+
+#ifndef DISABLE_PROTOBUF
#include "protozero.hh"
class DnstapMessage
protected:
std::string& d_buffer;
};
+
+#endif /* DISABLE_PROTOBUF */
*/
#include "protozero.hh"
+
+#ifndef DISABLE_PROTOBUF
#include "dnsparser.hh"
void pdns::ProtoZero::Message::encodeComboAddress(const protozero::pbf_tag_type type, const ComboAddress& ca)
pbf_rr.add_uint32(static_cast<protozero::pbf_tag_type>(pdns::ProtoZero::Message::RRField::ttl), uTTL);
pbf_rr.add_string(static_cast<protozero::pbf_tag_type>(pdns::ProtoZero::Message::RRField::rdata), blob);
}
+
+#endif /* DISABLE_PROTOBUF */
*/
#pragma once
-#include <protozero/pbf_writer.hpp>
-
#include "config.h"
+
#include "iputils.hh"
#include "gettime.hh"
#include "uuid-utils.hh"
+#ifndef DISABLE_PROTOBUF
+
+#include <protozero/pbf_writer.hpp>
+
namespace pdns {
namespace ProtoZero {
class Message {
};
};
};
+
+#endif /* DISABLE_PROTOBUF */