58 void *state,
void *tx, uint64_t tx_id)
68 if (!rs_bittorrent_dht_logger_log(tx, js)) {
82 static void OutputBitTorrentDHTLogDeInitCtxSub(
OutputCtx *output_ctx)
85 SCFree(bittorrent_dht_log_ctx);
95 if (
unlikely(bittorrent_dht_log_ctx == NULL)) {
98 bittorrent_dht_log_ctx->
eve_ctx = ajt;
102 SCFree(bittorrent_dht_log_ctx);
105 output_ctx->
data = bittorrent_dht_log_ctx;
106 output_ctx->
DeInit = OutputBitTorrentDHTLogDeInitCtxSub;
110 result.
ctx = output_ctx;
115 static TmEcode JsonBitTorrentDHTLogThreadInit(
ThreadVars *t,
const void *initdata,
void **data)
122 if (initdata == NULL) {
123 SCLogDebug(
"Error getting context for EveLogBitTorrentDHT. \"initdata\" is NULL.");
132 *data = (
void *)thread;
144 if (thread == NULL) {
154 if (
ConfGetNode(
"app-layer.protocols.bittorrent-dht") == NULL) {
161 JsonBitTorrentDHTLogger, JsonBitTorrentDHTLogThreadInit,
162 JsonBitTorrentDHTLogThreadDeinit, NULL);