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 SURICATA_SOURCE_NFLOG_H
25 #define SURICATA_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 /* SURICATA_SOURCE_NFLOG_H */
NFLOGPacketVars_::ifo
uint32_t ifo
Definition: source-nflog.h:58
NflogGroupConfig_::numgroup
char numgroup[NFLOG_GROUP_NAME_LENGTH]
Definition: source-nflog.h:47
NFLOGPacketVars_::mark
uint32_t mark
Definition: source-nflog.h:56
NFLOGPacketVars_::ifi
uint32_t ifi
Definition: source-nflog.h:57
TmModuleReceiveNFLOGRegister
void TmModuleReceiveNFLOGRegister(void)
Definition: source-nflog.c:49
NflogGroupConfig_::qtimeout
uint32_t qtimeout
Definition: source-nflog.h:44
TmModuleDecodeNFLOGRegister
void TmModuleDecodeNFLOGRegister(void)
Definition: source-nflog.c:55
NflogGroupConfig_::DerefFunc
void(* DerefFunc)(void *)
Definition: source-nflog.h:51
NflogGroupConfig_::group
uint16_t group
Definition: source-nflog.h:36
NFLOGPacketVars
struct NFLOGPacketVars_ NFLOGPacketVars
NflogGroupConfig_::qthreshold
uint32_t qthreshold
Definition: source-nflog.h:42
NflogGroupConfig_::nful_overrun_warned
int nful_overrun_warned
Definition: source-nflog.h:49
NFLOGPacketVars_::hw_protocol
uint16_t hw_protocol
Definition: source-nflog.h:59
NFLOG_GROUP_NAME_LENGTH
#define NFLOG_GROUP_NAME_LENGTH
Definition: source-nflog.h:32
NflogGroupConfig_
Definition: source-nflog.h:34
NFLOGPacketVars_
Definition: source-nflog.h:55
NflogGroupConfig_::nlbufsiz_max
uint32_t nlbufsiz_max
Definition: source-nflog.h:40
NflogGroupConfig_::nlbufsiz
uint32_t nlbufsiz
Definition: source-nflog.h:38
NflogGroupConfig
struct NflogGroupConfig_ NflogGroupConfig