capture_threads_example.c

Reference Documentation

Platform
Napatech SmartNIC
Content Type
Reference Information
Capture Software Version
Link™ Capture Software 12.15
Napatech Software Suite: examples/net/capture_threads/capture_threads_example.c File Reference
capture_threads_example.c File Reference
#include <nt.h>

Go to the source code of this file.

Data Structures

struct  ntpcap_ts_s
 
struct  ntpcap_hdr_s
 
struct  RxThread_s
 

Macros

#define ARRAY_SIZE(a)   (sizeof((a))/sizeof(*(a)))
 
#define numStreams   3
 

Typedefs

typedef struct RxThread_s RxThread_t
 

Functions

static void StopApplication (int sig)
 
static void HandleErrorStatus (int status, const char *message)
 
static int NtplConfigure (NtNtplInfo_t *ntplInfo, const char **commands, int count)
 
static void * RxTask (void *arg)
 
int main (void)
 

Variables

atomic_int appRunning = 0
 
atomic_int fileHeaderExists = 0
 
atomic_int fileHeaderWritten = 0
 
atomic_int numSegments = 0
 
atomic_int numPackets = 0
 
atomic_ullong numBytes = 0
 
atomic_ullong numBytesWire = 0
 

Macro Definition Documentation

#define ARRAY_SIZE (   a)    (sizeof((a))/sizeof(*(a)))

Definition at line 152 of file capture_threads_example.c.

Referenced by main().

#define numStreams   3

Definition at line 448 of file capture_threads_example.c.

Referenced by main().

Typedef Documentation

typedef struct RxThread_s RxThread_t

Function Documentation

static void StopApplication ( int  sig)
static

Definition at line 217 of file capture_threads_example.c.

Referenced by main().

static void HandleErrorStatus ( int  status,
const char *  message 
)
static

Definition at line 224 of file capture_threads_example.c.

Referenced by main(), and NtplConfigure().

static int NtplConfigure ( NtNtplInfo_t ntplInfo,
const char **  commands,
int  count 
)
static

Definition at line 233 of file capture_threads_example.c.

Referenced by main().

static void* RxTask ( void *  arg)
static

Definition at line 258 of file capture_threads_example.c.

Referenced by main(), and NtplConfigure().

int main ( void  )

Definition at line 454 of file capture_threads_example.c.

Variable Documentation

atomic_int appRunning = 0

Definition at line 178 of file capture_threads_example.c.

Referenced by main(), RxTask(), and StopApplication().

atomic_int fileHeaderExists = 0

Definition at line 179 of file capture_threads_example.c.

Referenced by RxTask().

atomic_int fileHeaderWritten = 0

Definition at line 180 of file capture_threads_example.c.

Referenced by RxTask().

atomic_int numSegments = 0
atomic_ullong numBytesWire = 0