suricata
source-nflog.h
Go to the documentation of this file.
1 /* Copyright (C) 2014 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 Giuseppe Longo <giuseppelng@gmail.com>
22  */
23 
24 #ifndef __SOURCE_NFLOG_H__
25 #define __SOURCE_NFLOG_H__
26 
27 #ifdef HAVE_NFLOG
28 #include <libnetfilter_log/libnetfilter_log.h>
29 #include <libnfnetlink/libnfnetlink.h>
30 #endif /* HAVE_NFLOG */
31 
32 #define NFLOG_GROUP_NAME_LENGTH 48
33 typedef struct NflogGroupConfig_
34 {
35  /* nflog's group */
36  uint16_t group;
37  /* netlink buffer size */
38  uint32_t nlbufsiz;
39  /* netlink max buffer size */
40  uint32_t nlbufsiz_max;
41  /* max amount of logs in buffer*/
42  uint32_t qthreshold;
43  /* max time to push log buffer */
44  uint32_t qtimeout;
45 
46  /* used to initialize livedev */
48 
50 
51  void (*DerefFunc)(void *);
53 
54 typedef struct NFLOGPacketVars_
55 {
56  uint32_t mark;
57  uint32_t ifi;
58  uint32_t ifo;
59  uint16_t hw_protocol;
60 
62 
65 
66 #endif /* __SOURCE_NFLOG_H__ */
void TmModuleReceiveNFLOGRegister(void)
Definition: source-nflog.c:48
void(* DerefFunc)(void *)
Definition: source-nflog.h:51
uint32_t qthreshold
Definition: source-nflog.h:42
void TmModuleDecodeNFLOGRegister(void)
Definition: source-nflog.c:54
#define NFLOG_GROUP_NAME_LENGTH
Definition: source-nflog.h:32
char numgroup[NFLOG_GROUP_NAME_LENGTH]
Definition: source-nflog.h:47
uint32_t nlbufsiz_max
Definition: source-nflog.h:40
struct NFLOGPacketVars_ NFLOGPacketVars
uint16_t hw_protocol
Definition: source-nflog.h:59
struct NflogGroupConfig_ NflogGroupConfig