suricata
util-device-private.h
Go to the documentation of this file.
1
/* Copyright (C) 2011-2025 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
/* Suricata private header, should only be included by Suricata source
19
* files. */
20
21
#ifndef SURICATA_UTIL_DEVICE_PRIVATE_H
22
#define SURICATA_UTIL_DEVICE_PRIVATE_H
23
24
#include "
util-device.h
"
25
#include "
queue.h
"
26
#include "
util-storage.h
"
27
#include "
util-dpdk-common.h
"
28
29
#define MAX_DEVNAME 10
30
31
/** storage for live device names */
32
typedef
struct
LiveDevice_
{
33
char
*
dev
;
/**< the device (e.g. "eth0") */
34
char
dev_short
[
MAX_DEVNAME
+ 1];
35
int
mtu
;
/* MTU of the device */
36
bool
tenant_id_set
;
37
38
uint16_t
id
;
39
40
SC_ATOMIC_DECLARE
(uint64_t, pkts);
41
SC_ATOMIC_DECLARE
(uint64_t, drop);
42
SC_ATOMIC_DECLARE
(uint64_t, bypassed);
43
SC_ATOMIC_DECLARE
(uint64_t, invalid_checksums);
44
TAILQ_ENTRY
(
LiveDevice_
)
next
;
45
46
uint32_t
tenant_id
;
/**< tenant id in multi-tenancy */
47
uint32_t
offload_orig
;
/**< original offload settings to restore @exit */
48
#ifdef HAVE_DPDK
49
// DPDK resources that needs to be cleaned after workers are stopped and devices closed
50
DPDKDeviceResources *dpdk_vars;
51
#endif
52
/** storage handle as a flex array member */
53
Storage
storage
[];
54
}
LiveDevice
;
55
56
#endif
/* SURICATA_UTIL_DEVICE_PRIVATE_H */
next
struct HtpBodyChunk_ * next
Definition:
app-layer-htp.h:0
LiveDevice_
Definition:
util-device-private.h:32
LiveDevice_::tenant_id_set
bool tenant_id_set
Definition:
util-device-private.h:36
LiveDevice_::id
uint16_t id
Definition:
util-device-private.h:38
LiveDevice
struct LiveDevice_ LiveDevice
LiveDevice_::storage
Storage storage[]
Definition:
util-device-private.h:53
Storage
Definition:
util-storage.h:40
util-device.h
LiveDevice_::SC_ATOMIC_DECLARE
SC_ATOMIC_DECLARE(uint64_t, invalid_checksums)
LiveDevice_::tenant_id
uint32_t tenant_id
Definition:
util-device-private.h:46
LiveDevice_::dev
char * dev
Definition:
util-device-private.h:33
LiveDevice_::offload_orig
uint32_t offload_orig
Definition:
util-device-private.h:47
queue.h
LiveDevice_::mtu
int mtu
Definition:
util-device-private.h:35
LiveDevice_::TAILQ_ENTRY
TAILQ_ENTRY(LiveDevice_) next
LiveDevice_::SC_ATOMIC_DECLARE
SC_ATOMIC_DECLARE(uint64_t, bypassed)
LiveDevice_::SC_ATOMIC_DECLARE
SC_ATOMIC_DECLARE(uint64_t, pkts)
MAX_DEVNAME
#define MAX_DEVNAME
Definition:
util-device-private.h:29
LiveDevice_::SC_ATOMIC_DECLARE
SC_ATOMIC_DECLARE(uint64_t, drop)
LiveDevice_::dev_short
char dev_short[MAX_DEVNAME+1]
Definition:
util-device-private.h:34
util-dpdk-common.h
util-storage.h
src
util-device-private.h
Generated on Sat May 31 2025 23:30:39 for suricata by
1.8.18