#include "util-logopenfile.h"
#include "util-time.h"
+#ifndef HAVE_RUST
+
#define DEFAULT_LOG_FILENAME "dns.log"
#define MODULE_NAME "LogDnsLog"
static int LogDnsLogger(ThreadVars *tv, void *data, const Packet *p,
Flow *f, void *state, void *tx, uint64_t tx_id, uint8_t direction)
{
-#ifdef HAVE_RUST
- SCLogNotice("LogDnsLogger not implemented for Rust DNS.");
- return 0;
-#endif
LogDnsLogThread *aft = (LogDnsLogThread *)data;
DNSTransaction *dns_tx = (DNSTransaction *)tx;
SCLogDebug("pcap_cnt %"PRIu64, p->pcap_cnt);
return output_ctx;
}
+#endif /* !HAVE_RUST */
+
void LogDnsLogRegister (void)
{
+#ifndef HAVE_RUST
/* Request logger. */
OutputRegisterTxModuleWithProgress(LOGGER_DNS, MODULE_NAME, "dns-log",
LogDnsLogInitCtx, ALPROTO_DNS, LogDnsRequestLogger, 0, 1,
/* enable the logger for the app layer */
SCLogDebug("registered %s", MODULE_NAME);
+#endif /* !HAVE_RUST */
}
"recompile with lua(jit) and its development "
"files installed to add lua support.");
continue;
+#endif
+ } else if (strcmp(output->val, "dns-log") == 0) {
+#ifdef HAVE_RUST
+ SCLogWarning(SC_ERR_NOT_SUPPORTED,
+ "dns-log is not available when Rust is enabled.");
+ continue;
#endif
} else if (strcmp(output->val, "tls-log") == 0) {
tls_log_enabled = 1;