Go to the documentation of this file.
18 #ifndef SURICATA_UTIL_DEVICE_H
19 #define SURICATA_UTIL_DEVICE_H
22 #include <rte_mempool.h>
28 #define OFFLOAD_FLAG_SG (1<<0)
29 #define OFFLOAD_FLAG_TSO (1<<1)
30 #define OFFLOAD_FLAG_GSO (1<<2)
31 #define OFFLOAD_FLAG_GRO (1<<3)
32 #define OFFLOAD_FLAG_LRO (1<<4)
33 #define OFFLOAD_FLAG_RXCSUM (1<<5)
34 #define OFFLOAD_FLAG_TXCSUM (1<<6)
35 #define OFFLOAD_FLAG_TOE (1<<7)
41 #define MAX_DEVNAME 10
45 struct rte_mempool *pkt_mp;
46 } DPDKDeviceResources;
68 DPDKDeviceResources dpdk_vars;
101 #ifdef BUILD_UNIX_SOCKET
102 TmEcode LiveDeviceIfaceStat(json_t *cmd, json_t *server_msg,
void *data);
103 TmEcode LiveDeviceIfaceList(json_t *cmd, json_t *server_msg,
void *data);
104 TmEcode LiveDeviceGetBypassedStats(json_t *cmd, json_t *answer,
void *data);
void LiveDevAddBypassSuccess(LiveDevice *dev, uint64_t cnt, int family)
void LiveSetOffloadDisable(void)
void LiveDevSubBypassStats(LiveDevice *dev, uint64_t cnt, int family)
struct HtpBodyChunk_ * next
struct LiveDevice_ LiveDevice
const char * LiveGetDeviceName(int number)
Get a pointer to the device name at idx.
int LiveRegisterDevice(const char *dev)
Add a pcap device for monitoring and create structure.
TAILQ_ENTRY(LiveDeviceName_) next
int LiveRegisterDeviceName(const char *dev)
Add a device for monitoring.
void LiveDeviceFinalize(void)
void LiveDevAddBypassFail(LiveDevice *dev, uint64_t cnt, int family)
void LiveDevAddBypassStats(LiveDevice *dev, uint64_t cnt, int family)
int LiveBuildDeviceList(const char *base)
SC_ATOMIC_DECLARE(uint64_t, invalid_checksums)
struct LiveDeviceName_ LiveDeviceName
LiveDevice * LiveDeviceForEach(LiveDevice **ldev, LiveDevice **ndev)
int LiveDeviceListClean(void)
int LiveGetDeviceCount(void)
Get the number of registered devices.
void LiveDevRegisterExtension(void)
int LiveBuildDeviceListCustom(const char *base, const char *itemname)
TAILQ_ENTRY(LiveDevice_) next
SC_ATOMIC_DECLARE(uint64_t, bypassed)
SC_ATOMIC_DECLARE(uint64_t, pkts)
SC_ATOMIC_DECLARE(uint64_t, drop)
void LiveDeviceHasNoStats(void)
const char * LiveGetShortName(const char *dev)
LiveDevice * LiveGetDevice(const char *dev)
Get a pointer to the device at idx.
char dev_short[MAX_DEVNAME+1]
void LiveSetOffloadWarn(void)
int LiveDevUseBypass(LiveDevice *dev)