suricata
util-napatech.h
Go to the documentation of this file.
1 /* Copyright (C) 2017 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 Phil Young <py@napatech.com>
22  *
23  */
24 
25 #ifndef __UTIL_NAPATECH_H__
26 #define __UTIL_NAPATECH_H__
27 
28 #ifdef HAVE_NAPATECH
29 #include <nt.h>
30 
31 typedef struct NapatechPacketVars_
32 {
33  uint64_t stream_id;
34  NtNetBuf_t nt_packet_buf;
37 
38 
39 typedef struct NapatechStreamConfig_
40 {
41  uint16_t stream_id;
42  bool is_active;
45 
46 typedef struct NapatechCurrentStats_ {
47  uint64_t current_packets;
48  uint64_t current_drops;
49  uint64_t current_bytes;
51 
52 #define MAX_STREAMS 256
53 
54 extern void NapatechStartStats(void);
55 uint16_t NapatechGetNumaNode(uint16_t stream_id);
58 
59 #endif //HAVE_NAPATECH
60 #endif /* __UTIL_NAPATECH_H__ */
struct NapatechPacketVars_ NapatechPacketVars
TcpStreamCnf stream_config
Definition: stream-tcp.h:106
void NapatechStartStats(void)
uint16_t NapatechGetStreamConfig(NapatechStreamConfig stream_config[])
struct NapatechCurrentStats_ NapatechCurrentStats
NtNetBuf_t nt_packet_buf
Definition: util-napatech.h:34
struct NapatechStreamConfig_ NapatechStreamConfig
uint16_t NapatechGetNumaNode(uint16_t stream_id)
Definition: util-napatech.c:35
NapatechCurrentStats NapatechGetCurrentStats(uint16_t id)
Definition: util-napatech.c:84
Per thread variable structure.
Definition: threadvars.h:57