examples: add tx logger to custom logger example

However, its disabled due to issue
https://redmine.openinfosecfoundation.org/issues/7236.

Ticket: #7227
pull/11689/head
Jason Ish 6 months ago committed by Victor Julien
parent 7397b7a00f
commit 1f63e7b7c0

@ -20,6 +20,7 @@
#include "output-packet.h"
#include "output-flow.h"
#include "output-tx.h"
#include "util-print.h"
static int CustomPacketLogger(ThreadVars *tv, void *thread_data, const Packet *p)
@ -78,6 +79,15 @@ static int CustomFlowLogger(ThreadVars *tv, void *thread_data, Flow *f)
return 0;
}
#if 0
static int CustomDnsLogger(ThreadVars *tv, void *thread_data, const Packet *p, Flow *f, void *state,
void *tx, uint64_t tx_id)
{
SCLogNotice("We have a DNS transaction");
return 0;
}
#endif
static TmEcode ThreadInit(ThreadVars *tv, const void *initdata, void **data)
{
return TM_ECODE_OK;
@ -96,6 +106,15 @@ static void Init(void)
CustomPacketLoggerCondition, NULL, ThreadInit, ThreadDeinit);
SCOutputRegisterFlowLogger(
"custom-flow-logger", CustomFlowLogger, NULL, ThreadInit, ThreadDeinit);
/* Register a custom DNS transaction logger.
*
* Currently disabled due to https://redmine.openinfosecfoundation.org/issues/7236.
*/
#if 0
OutputRegisterTxLogger(LOGGER_USER, "custom-dns-logger", ALPROTO_DNS, CustomDnsLogger, NULL, -1,
-1, NULL, ThreadInit, ThreadDeinit);
#endif
}
const SCPlugin PluginRegistration = {

Loading…
Cancel
Save