58 void *state,
void *tx, uint64_t tx_id)
68 jb_open_object(js,
"bittorrent_dht");
69 if (!rs_bittorrent_dht_logger_log(tx, js)) {
84 static void OutputBitTorrentDHTLogDeInitCtxSub(
OutputCtx *output_ctx)
87 SCFree(bittorrent_dht_log_ctx);
97 if (
unlikely(bittorrent_dht_log_ctx == NULL)) {
100 bittorrent_dht_log_ctx->
eve_ctx = ajt;
104 SCFree(bittorrent_dht_log_ctx);
107 output_ctx->
data = bittorrent_dht_log_ctx;
108 output_ctx->
DeInit = OutputBitTorrentDHTLogDeInitCtxSub;
112 result.
ctx = output_ctx;
117 static TmEcode JsonBitTorrentDHTLogThreadInit(
ThreadVars *t,
const void *initdata,
void **data)
124 if (initdata == NULL) {
125 SCLogDebug(
"Error getting context for EveLogBitTorrentDHT. \"initdata\" is NULL.");
134 *data = (
void *)thread;
146 if (thread == NULL) {
156 if (
ConfGetNode(
"app-layer.protocols.bittorrent-dht") == NULL) {
163 JsonBitTorrentDHTLogger, JsonBitTorrentDHTLogThreadInit,
164 JsonBitTorrentDHTLogThreadDeinit, NULL);