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 "runmode-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 692 of file util-napatech.c.

◆ MAX_HOSTBUFFER

#define MAX_HOSTBUFFER   4

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

◆ MAX_HOSTBUFFERS

#define MAX_HOSTBUFFERS   8

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

◆ MAX_STREAMS

#define MAX_STREAMS   256

Definition at line 691 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 202 of file util-napatech.c.

Function Documentation

◆ NapatechDeleteFilters()

uint32_t NapatechDeleteFilters ( void  )

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

References NAPATECH_ERROR, and NAPATECH_NTPL_ERROR.

◆ NapatechGetCurrentStats()

NapatechCurrentStats NapatechGetCurrentStats ( uint16_t  id)

Definition at line 196 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 804 of file util-napatech.c.

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

Here is the call graph for this function:

◆ NapatechSetupNuma()

bool NapatechSetupNuma ( uint32_t  stream,
uint32_t  numa 
)

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

References NAPATECH_ERROR, and NAPATECH_NTPL_ERROR.

◆ NapatechSetupTraffic()

uint32_t NapatechSetupTraffic ( uint32_t  first_stream,
uint32_t  last_stream 
)

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

◆ NapatechStartStats()

void NapatechStartStats ( void  )

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

References TmThreadCreate().

Here is the call graph for this function:

Variable Documentation

◆ current_stats

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

Referenced by NapatechGetCurrentStats().

◆ total_stats

NapatechCurrentStats total_stats

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