Go to the documentation of this file.
23 #ifndef SURICATA_UTIL_NAPATECH_H
24 #define SURICATA_UTIL_NAPATECH_H
36 #ifdef NAPATECH_ENABLE_BYPASS
57 #define MAX_HOSTBUFFER 4
58 #define MAX_STREAMS 256
60 #define MAX_ADAPTERS 8
61 #define HB_HIGHWATER 2048 //1982
65 #define NAPATECH_ERROR(status) \
67 char errorBuffer[1024]; \
68 NT_ExplainError((status), errorBuffer, sizeof(errorBuffer) - 1); \
69 SCLogError("Napatech Error: %s", errorBuffer); \
72 #define NAPATECH_NTPL_ERROR(ntpl_cmd, ntpl_info, status) \
74 char errorBuffer[1024]; \
75 NT_ExplainError(status, errorBuffer, sizeof(errorBuffer) - 1); \
76 SCLogError(" NTPL failed: %s", errorBuffer); \
77 SCLogError(" cmd: %s", ntpl_cmd); \
78 if (strncmp(ntpl_info.u.errorData.errBuffer[0], "", 256) != 0) \
79 SCLogError(" %s", ntpl_info.u.errorData.errBuffer[0]); \
80 if (strncmp(ntpl_info.u.errorData.errBuffer[1], "", 256) != 0) \
81 SCLogError(" %s", ntpl_info.u.errorData.errBuffer[1]); \
82 if (strncmp(ntpl_info.u.errorData.errBuffer[2], "", 256) != 0) \
83 SCLogError(" %s", ntpl_info.u.errorData.errBuffer[2]); \
87 #ifdef ENABLE_NT_DEBUG
88 void NapatechPrintIP(uint32_t
address);
90 #define NAPATECH_DEBUG(...) printf(__VA_ARGS__)
91 #define NAPATECH_PRINTIP(a) NapatechPrintIP(uint32_t address)
93 #define NAPATECH_DEBUG(...)
94 #define NAPATECH_PRINTIP(a)
103 #ifdef NAPATECH_ENABLE_BYPASS
106 #define NAPATECH_KEYTYPE_IPV4 3
107 #define NAPATECH_KEYTYPE_IPV4_SPAN 4
108 #define NAPATECH_KEYTYPE_IPV6 5
109 #define NAPATECH_KEYTYPE_IPV6_SPAN 6
110 #define NAPATECH_FLOWTYPE_DROP 7
111 #define NAPATECH_FLOWTYPE_PASS 8
113 int NapatechVerifyBypassSupport(
void);
114 int NapatechGetNumAdapters(
void);
117 int NapatechIsBypassSupported(
void);
bool NapatechSetupNuma(uint32_t stream, uint32_t numa)
void NapatechStartStats(void)
TcpStreamCnf stream_config
int NapatechGetStreamConfig(NapatechStreamConfig stream_config[])
Reads and parses the stream configuration defined in the config file.
Per thread variable structure.
struct NapatechPacketVars_ NapatechPacketVars
struct NapatechStreamConfig_ NapatechStreamConfig
struct NapatechCurrentStats_ NapatechCurrentStats
uint32_t NapatechSetupTraffic(uint32_t first_stream, uint32_t last_stream)
uint64_t current_drop_bytes
NapatechCurrentStats NapatechGetCurrentStats(uint16_t id)
uint64_t current_drop_packets
NtNetStreamRx_t rx_stream
NtFlowStream_t flow_stream
uint32_t NapatechDeleteFilters(void)