suricata
output-tx.h
Go to the documentation of this file.
1 /* Copyright (C) 2007-2022 Open Information Security Foundation
2  *
3  * You can copy, redistribute or modify this Program under the terms of
4  * the GNU General Public License version 2 as published by the Free
5  * Software Foundation.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * version 2 along with this program; if not, write to the Free Software
14  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
15  * 02110-1301, USA.
16  */
17 
18 /**
19  * \file
20  *
21  * \author Victor Julien <victor@inliniac.net>
22  *
23  * AppLayer TX Logger Output registration functions
24  */
25 
26 #ifndef SURICATA_OUTPUT_TX_H
27 #define SURICATA_OUTPUT_TX_H
28 
29 #include "decode.h"
30 #include "flow.h"
31 
32 /** tx logger function pointer type */
33 typedef int (*TxLogger)(ThreadVars *, void *thread_data, const Packet *, Flow *f, void *state, void *tx, uint64_t tx_id);
34 
35 /** tx logger condition function pointer type,
36  * must return true for tx that should be logged
37  */
38 typedef bool (*TxLoggerCondition)(
39  ThreadVars *, const Packet *, void *state, void *tx, uint64_t tx_id);
40 
41 int OutputRegisterTxLogger(LoggerId id, const char *name, AppProto alproto,
42  TxLogger LogFunc,
43  OutputCtx *, int tc_log_progress, int ts_log_progress,
44  TxLoggerCondition LogCondition,
46  void (*ThreadExitPrintStats)(ThreadVars *, void *));
47 
48 void OutputTxLoggerRegister (void);
49 
50 void OutputTxShutdown(void);
51 
52 #endif /* SURICATA_OUTPUT_TX_H */
AppProto
uint16_t AppProto
Definition: app-layer-protos.h:81
Flow_
Flow data structure.
Definition: flow.h:351
LoggerId
LoggerId
Definition: suricata-common.h:460
TxLogger
int(* TxLogger)(ThreadVars *, void *thread_data, const Packet *, Flow *f, void *state, void *tx, uint64_t tx_id)
Definition: output-tx.h:33
OutputTxShutdown
void OutputTxShutdown(void)
Definition: output-tx.c:677
OutputCtx_
Definition: tm-modules.h:85
OutputTxLoggerRegister
void OutputTxLoggerRegister(void)
Definition: output-tx.c:671
decode.h
ThreadVars_
Per thread variable structure.
Definition: threadvars.h:57
ThreadInitFunc
TmEcode(* ThreadInitFunc)(ThreadVars *, const void *, void **)
Definition: tm-modules.h:40
Packet_
Definition: decode.h:437
TxLoggerCondition
bool(* TxLoggerCondition)(ThreadVars *, const Packet *, void *state, void *tx, uint64_t tx_id)
Definition: output-tx.h:38
OutputRegisterTxLogger
int OutputRegisterTxLogger(LoggerId id, const char *name, AppProto alproto, TxLogger LogFunc, OutputCtx *, int tc_log_progress, int ts_log_progress, TxLoggerCondition LogCondition, ThreadInitFunc, ThreadDeinitFunc, void(*ThreadExitPrintStats)(ThreadVars *, void *))
Definition: output-tx.c:67
flow.h
ThreadDeinitFunc
TmEcode(* ThreadDeinitFunc)(ThreadVars *, void *)
Definition: tm-modules.h:41