suricata
util-napatech.h File Reference
#include <nt.h>
Include dependency graph for util-napatech.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  NapatechPacketVars_
 
struct  NapatechStreamConfig_
 
struct  NapatechCurrentStats_
 

Macros

#define MAX_STREAMS   256
 
#define NAPATECH_ERROR(err_type, status)
 
#define NAPATECH_NTPL_ERROR(ntpl_cmd, ntpl_info, status)
 

Typedefs

typedef struct NapatechPacketVars_ NapatechPacketVars
 
typedef struct NapatechStreamConfig_ NapatechStreamConfig
 
typedef struct NapatechCurrentStats_ NapatechCurrentStats
 

Functions

void NapatechStartStats (void)
 
NapatechCurrentStats NapatechGetCurrentStats (uint16_t id)
 
int NapatechGetStreamConfig (NapatechStreamConfig stream_config[])
 
bool NapatechSetupNuma (uint32_t stream, uint32_t numa)
 
uint32_t NapatechSetupTraffic (uint32_t first_stream, uint32_t last_stream, uint32_t *filter_id, uint32_t *hash_id)
 
bool NapatechDeleteFilter (uint32_t filter_id)
 

Detailed Description

Author
Phil Young py@na.nosp@m.pate.nosp@m.ch.co.nosp@m.m

Definition in file util-napatech.h.

Macro Definition Documentation

#define MAX_STREAMS   256

Definition at line 49 of file util-napatech.h.

#define NAPATECH_ERROR (   err_type,
  status 
)
Value:
{ \
char errorBuffer[1024]; \
NT_ExplainError((status), errorBuffer, sizeof (errorBuffer) - 1); \
SCLogError((err_type), "Napatech Error: %s", errorBuffer); \
}
#define SCLogError(err_code,...)
Macro used to log ERROR messages.
Definition: util-debug.h:294

Definition at line 54 of file util-napatech.h.

Referenced by NapatechDeleteFilter(), NapatechPacketLoopZC(), NapatechSetupNuma(), NapatechSetupTraffic(), and RunModeNapatechRegister().

#define NAPATECH_NTPL_ERROR (   ntpl_cmd,
  ntpl_info,
  status 
)
Value:
{ \
char errorBuffer[1024]; \
NT_ExplainError(status, errorBuffer, sizeof (errorBuffer) - 1); \
" NTPL failed: %s", errorBuffer); \
" cmd: %s", ntpl_cmd); \
if (strncmp(ntpl_info.u.errorData.errBuffer[0], "", 256) != 0) \
" %s", ntpl_info.u.errorData.errBuffer[0]); \
if (strncmp(ntpl_info.u.errorData.errBuffer[1], "", 256) != 0) \
" %s", ntpl_info.u.errorData.errBuffer[1]); \
if (strncmp(ntpl_info.u.errorData.errBuffer[2], "", 256) != 0) \
" %s", ntpl_info.u.errorData.errBuffer[2]); \
}
#define SCLogError(err_code,...)
Macro used to log ERROR messages.
Definition: util-debug.h:294

Definition at line 60 of file util-napatech.h.

Referenced by NapatechDeleteFilter(), NapatechSetupNuma(), and NapatechSetupTraffic().

Typedef Documentation

Function Documentation

bool NapatechDeleteFilter ( uint32_t  filter_id)

Definition at line 1052 of file util-napatech.c.

References NAPATECH_ERROR, NAPATECH_NTPL_ERROR, SC_ERR_NAPATECH_STREAMS_REGISTER_FAILED, and SCLogInfo.

Referenced by NapatechPacketLoopZC().

Here is the caller graph for this function:

NapatechCurrentStats NapatechGetCurrentStats ( uint16_t  id)

Definition at line 50 of file util-napatech.c.

Referenced by NapatechStreamThreadExitStats().

Here is the caller graph for this function:

bool NapatechSetupNuma ( uint32_t  stream,
uint32_t  numa 
)

Definition at line 830 of file util-napatech.c.

References ConfGetValue(), MAX_HOSTBUFFERS, NAPATECH_ERROR, NAPATECH_NTPL_ERROR, SC_ERR_NAPATECH_INIT_FAILED, SC_ERR_NAPATECH_STREAMS_REGISTER_FAILED, and SCLogInfo.

Referenced by NapatechPacketLoopZC().

Here is the call graph for this function:

Here is the caller graph for this function:

uint32_t NapatechSetupTraffic ( uint32_t  first_stream,
uint32_t  last_stream,
uint32_t *  filter_id,
uint32_t *  hash_id 
)
void NapatechStartStats ( void  )

Definition at line 789 of file util-napatech.c.

References SC_ERR_THREAD_CREATE, SC_ERR_THREAD_SPAWN, SCLogError, TmThreadCreate(), and TmThreadSpawn().

Referenced by RunModeNapatechRegister().

Here is the call graph for this function:

Here is the caller graph for this function: