#include "app-layer-dns-tcp-rust.h"
#endif
+#ifndef HAVE_RUST
struct DNSTcpHeader_ {
uint16_t len;
uint16_t tx_id;
return ALPROTO_DNS;
}
+#endif /* HAVE_RUST */
void RegisterDNSTCPParsers(void)
{
- const char *proto_name = "dns";
#ifdef HAVE_RUST
RegisterRustDNSTCPParsers();
return;
-#endif
+#else
+ const char *proto_name = "dns";
/** DNS */
if (AppLayerProtoDetectConfProtoDetectionEnabled("tcp", proto_name)) {
AppLayerProtoDetectRegisterProtocol(ALPROTO_DNS, proto_name);
SCLogInfo("Parsed disabled for %s protocol. Protocol detection"
"still on.", proto_name);
}
-
#ifdef UNITTESTS
AppLayerParserRegisterProtocolUnittests(IPPROTO_TCP, ALPROTO_DNS,
DNSTCPParserRegisterTests);
#endif
-
return;
+#endif /* HAVE_RUST */
}
/* UNITTESTS */
+#ifndef HAVE_RUST
#ifdef UNITTESTS
#include "util-unittest-helper.h"
}
#endif /* UNITTESTS */
+#endif /* HAVE_RUST */
#include "app-layer-dns-udp-rust.h"
#endif
+#ifndef HAVE_RUST
/** \internal
* \brief Parse DNS request packet
*/
SCLogConfig("DNS global memcap: %"PRIu64, global_memcap);
DNSConfigSetGlobalMemcap(global_memcap);
}
+#endif /* HAVE_RUST */
void RegisterDNSUDPParsers(void)
{
- const char *proto_name = "dns";
-
#ifdef HAVE_RUST
return RegisterRustDNSUDPParsers();
-#endif
-
+#else
+ const char *proto_name = "dns";
/** DNS */
if (AppLayerProtoDetectConfProtoDetectionEnabled("udp", proto_name)) {
AppLayerProtoDetectRegisterProtocol(ALPROTO_DNS, proto_name);
#ifdef UNITTESTS
AppLayerParserRegisterProtocolUnittests(IPPROTO_UDP, ALPROTO_DNS, DNSUDPParserRegisterTests);
#endif
+#endif /* HAVE_RUST */
}
/* UNITTESTS */
+#ifndef HAVE_RUST
#ifdef UNITTESTS
#include "util-unittest-helper.h"
DNSUDPParserTestLostResponse);
}
#endif
+#endif /* HAVE_RUST */
return ret;
}
}
-#endif
return LuaCallbackError(luastate, "no query");
+#endif
}
static int DnsGetTxid(lua_State *luastate)