suricata
output-tx.h
Go to the documentation of this file.
1 /* Copyright (C) 2007-2013 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 
31 /** packet logger function pointer type */
32 typedef int (*TxLogger)(ThreadVars *, void *thread_data, const Packet *, Flow *f, void *state, void *tx, uint64_t tx_id);
33 
34 /** packet logger condition function pointer type,
35  * must return true for packets that should be logged
36  */
37 typedef int (*TxLoggerCondition)(ThreadVars *, const Packet *, void *state, void *tx, uint64_t tx_id);
38 
44  void (*ThreadExitPrintStats)(ThreadVars *, void *));
45 
46 void OutputTxLoggerRegister (void);
47 
48 void OutputTxShutdown(void);
49 
50 #endif /* __OUTPUT_PACKET_H__ */
LoggerId
void OutputTxLoggerRegister(void)
Definition: output-tx.c:373
void OutputTxShutdown(void)
Definition: output-tx.c:379
uint16_t AppProto
TmEcode(* ThreadDeinitFunc)(ThreadVars *, void *)
Definition: tm-modules.h:40
int ts_log_progress
Definition: output-tx.c:59
int(* TxLogger)(ThreadVars *, void *thread_data, const Packet *, Flow *f, void *state, void *tx, uint64_t tx_id)
Definition: output-tx.h:32
void(* ThreadExitPrintStats)(ThreadVars *, void *)
Definition: output-tx.c:62
uint16_t tx_id
TxLogger LogFunc
Definition: output-tx.c:51
TxLoggerCondition LogCondition
Definition: output-tx.c:52
int(* TxLoggerCondition)(ThreadVars *, const Packet *, void *state, void *tx, uint64_t tx_id)
Definition: output-tx.h:37
Per thread variable structure.
Definition: threadvars.h:57
TmEcode(* ThreadInitFunc)(ThreadVars *, const void *, void **)
Definition: tm-modules.h:39
AppProto alproto
Definition: output-tx.c:50
const char * name
Definition: output-tx.c:55
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 data structure.
Definition: flow.h:325
int tc_log_progress
Definition: output-tx.c:58