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 __OUTPUT_TX_H__
27 #define __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 int (*TxLoggerCondition)(ThreadVars *, const Packet *, void *state, void *tx, uint64_t tx_id);
39 
40 int OutputRegisterTxLogger(LoggerId id, const char *name, AppProto alproto,
41  TxLogger LogFunc,
42  OutputCtx *, int tc_log_progress, int ts_log_progress,
43  TxLoggerCondition LogCondition,
45  void (*ThreadExitPrintStats)(ThreadVars *, void *));
46 
47 void OutputTxLoggerRegister (void);
48 
49 void OutputTxShutdown(void);
50 
51 #endif /* __OUTPUT_TX_H__ */
AppProto
uint16_t AppProto
Definition: app-layer-protos.h:80
Flow_
Flow data structure.
Definition: flow.h:347
LoggerId
LoggerId
Definition: suricata-common.h:455
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:676
OutputCtx_
Definition: tm-modules.h:84
OutputTxLoggerRegister
void OutputTxLoggerRegister(void)
Definition: output-tx.c:670
decode.h
ThreadVars_
Per thread variable structure.
Definition: threadvars.h:57
ThreadInitFunc
TmEcode(* ThreadInitFunc)(ThreadVars *, const void *, void **)
Definition: tm-modules.h:39
Packet_
Definition: decode.h:430
TxLoggerCondition
int(* 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:40