suricata
util-napatech.c File Reference
#include "suricata-common.h"
#include "suricata.h"
#include "util-device.h"
#include "util-cpu.h"
#include "util-byte.h"
#include "threadvars.h"
#include "tm-threads.h"
#include "util-napatech.h"
#include "source-napatech.h"
Include dependency graph for util-napatech.c:

Go to the source code of this file.

Data Structures

struct  PacketCounters_
 

Macros

#define MAX_HOSTBUFFERS   8
 
#define MAX_HOSTBUFFER   4
 
#define MAX_STREAMS   256
 
#define HB_HIGHWATER   2048
 
#define PORTS_SPEC_SIZE   64
 

Typedefs

typedef struct PacketCounters_ PacketCounters
 

Enumerations

enum  CONFIG_SPECIFIER { CONFIG_SPECIFIER_UNDEFINED = 0, CONFIG_SPECIFIER_RANGE, CONFIG_SPECIFIER_INDIVIDUAL }
 

Functions

NapatechCurrentStats NapatechGetCurrentStats (uint16_t id)
 
int NapatechGetStreamConfig (NapatechStreamConfig stream_config[])
 Reads and parses the stream configuration defined in the config file. More...
 
void NapatechStartStats (void)
 
bool NapatechSetupNuma (uint32_t stream, uint32_t numa)
 
uint32_t NapatechDeleteFilters (void)
 
uint32_t NapatechSetupTraffic (uint32_t first_stream, uint32_t last_stream)
 

Variables

NapatechCurrentStats total_stats
 
NapatechCurrentStats current_stats [MAX_STREAMS]
 

Detailed Description

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

Definition in file util-napatech.c.

Macro Definition Documentation

◆ HB_HIGHWATER

#define HB_HIGHWATER   2048

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

◆ MAX_HOSTBUFFER

#define MAX_HOSTBUFFER   4

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

◆ MAX_HOSTBUFFERS

#define MAX_HOSTBUFFERS   8

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

◆ MAX_STREAMS

#define MAX_STREAMS   256

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

◆ PORTS_SPEC_SIZE

#define PORTS_SPEC_SIZE   64

Typedef Documentation

◆ PacketCounters

Enumeration Type Documentation

◆ CONFIG_SPECIFIER

Enumerator
CONFIG_SPECIFIER_UNDEFINED 
CONFIG_SPECIFIER_RANGE 
CONFIG_SPECIFIER_INDIVIDUAL 

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

Function Documentation

◆ NapatechDeleteFilters()

uint32_t NapatechDeleteFilters ( void  )

◆ NapatechGetCurrentStats()

NapatechCurrentStats NapatechGetCurrentStats ( uint16_t  id)

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

References current_stats.

Referenced by NapatechStreamThreadExitStats().

Here is the caller graph for this function:

◆ NapatechGetStreamConfig()

int NapatechGetStreamConfig ( NapatechStreamConfig  stream_config[])

Reads and parses the stream configuration defined in the config file.

Parameters
stream_config- array to be filled in with active stream info.
Returns
the number of streams configured or -1 if an error occurred

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

References ConfGetBool(), MAX_STREAMS, NAPATECH_ERROR, NapatechIsAutoConfigEnabled(), SC_ERR_NAPATECH_INIT_FAILED, SC_ERR_NAPATECH_STREAMS_REGISTER_FAILED, SCLogError, and stream_config.

Here is the call graph for this function:

◆ NapatechSetupNuma()

bool NapatechSetupNuma ( uint32_t  stream,
uint32_t  numa 
)

◆ NapatechSetupTraffic()

uint32_t NapatechSetupTraffic ( uint32_t  first_stream,
uint32_t  last_stream 
)

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

◆ NapatechStartStats()

void NapatechStartStats ( void  )

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

References TmThreadCreate().

Here is the call graph for this function:

Variable Documentation

◆ current_stats

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

Referenced by NapatechGetCurrentStats().

◆ total_stats

NapatechCurrentStats total_stats

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