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 */
32typedef struct LiveDevice_ {
33 char *dev; /**< the device (e.g. "eth0") */
35 int mtu; /* MTU of the device */
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);
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 */
55
56#endif /* SURICATA_UTIL_DEVICE_PRIVATE_H */
struct HtpBodyChunk_ * next
char dev_short[MAX_DEVNAME+1]
SC_ATOMIC_DECLARE(uint64_t, drop)
SC_ATOMIC_DECLARE(uint64_t, bypassed)
SC_ATOMIC_DECLARE(uint64_t, pkts)
TAILQ_ENTRY(LiveDevice_) next
SC_ATOMIC_DECLARE(uint64_t, invalid_checksums)
struct LiveDevice_ LiveDevice
#define MAX_DEVNAME