|
|
|
|
@ -49,6 +49,8 @@
|
|
|
|
|
#include "util-logopenfile.h"
|
|
|
|
|
#include "util-time.h"
|
|
|
|
|
|
|
|
|
|
#ifndef HAVE_RUST
|
|
|
|
|
|
|
|
|
|
#define DEFAULT_LOG_FILENAME "dns.log"
|
|
|
|
|
|
|
|
|
|
#define MODULE_NAME "LogDnsLog"
|
|
|
|
|
@ -164,10 +166,6 @@ static void LogAnswer(LogDnsLogThread *aft, char *timebuf, char *srcip, char *ds
|
|
|
|
|
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);
|
|
|
|
|
@ -358,8 +356,11 @@ static OutputCtx *LogDnsLogInitCtx(ConfNode *conf)
|
|
|
|
|
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,
|
|
|
|
|
@ -372,4 +373,5 @@ void LogDnsLogRegister (void)
|
|
|
|
|
|
|
|
|
|
/* enable the logger for the app layer */
|
|
|
|
|
SCLogDebug("registered %s", MODULE_NAME);
|
|
|
|
|
#endif /* !HAVE_RUST */
|
|
|
|
|
}
|
|
|
|
|
|