suricata
source-af-xdp.h
Go to the documentation of this file.
1/* Copyright (C) 2022 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 Richard McConnell <richard_mcconnell@rapid7.com>
22 */
23
24#ifndef SURICATA_SOURCE_AFXDP_H
25#define SURICATA_SOURCE_AFXDP_H
26
27#define AFXDP_IFACE_NAME_LENGTH 48
28
29typedef struct AFXDPIfaceConfig {
31 /* number of threads */
34
35 /* misc use flags */
36 uint32_t mode;
37 uint32_t bind_flags;
44
45 SC_ATOMIC_DECLARE(unsigned int, ref);
46 void (*DerefFunc)(void *);
48
49/**
50 * \brief per packet AF_XDP vars
51 *
52 * This structure is used by the release data system
53 */
54typedef struct AFXDPPacketVars_ {
55 /* Fill queue used by kernel for inbound packets */
56 void *fq;
57 /* Indexed location within queue to release */
58 uint32_t fq_idx;
59 /* Origin address of packet */
60 uint64_t orig;
62
65
67
68#endif /* SURICATA_SOURCE_AFXDP_H */
void TmModuleReceiveAFXDPRegister(void)
void TmModuleDecodeAFXDPRegister(void)
Registration Function for DecodeAFXDP.
struct AFXDPPacketVars_ AFXDPPacketVars
per packet AF_XDP vars
TmEcode AFXDPQueueProtectionInit(void)
#define AFXDP_IFACE_NAME_LENGTH
void(* DerefFunc)(void *)
uint32_t busy_poll_budget
SC_ATOMIC_DECLARE(unsigned int, ref)
uint32_t busy_poll_time
uint32_t gro_flush_timeout
uint32_t napi_defer_hard_irqs
char iface[AFXDP_IFACE_NAME_LENGTH]
per packet AF_XDP vars