replay4ga_largefile_example.c

Reference Documentation

Platform
Intel® PAC
Napatech SmartNIC
Content Type
Reference Information
Capture Software Version
Link™ Capture Software 12.10
Napatech Software Suite: examples/net/replay4GA_largefile/replay4ga_largefile_example.c File Reference
replay4ga_largefile_example.c File Reference
#include <nt.h>
#include <argparse.h>
#include <signal.h>

Go to the source code of this file.

Macros

#define ONEMBIT   (1000000ULL)
 

Functions

static void StopApplication (int sig)
 
int main (int argc, const char **argv)
 

Variables

static const char * usageText []
 
static int opt_port = 0
 
static char * opt_filename
 
static int appRunning = 1
 
struct argparse_option arg_options []
 

Macro Definition Documentation

#define ONEMBIT   (1000000ULL)

Definition at line 54 of file replay4ga_largefile_example.c.

Referenced by main().

Function Documentation

static void StopApplication ( int  sig)
static

The function called when user is pressing CTRL-C

Definition at line 90 of file replay4ga_largefile_example.c.

Referenced by main().

int main ( int  argc,
const char **  argv 
)

Definition at line 106 of file replay4ga_largefile_example.c.

Variable Documentation

const char* usageText[]
static
Initial value:
= {
"Syntax:\n"
"replay4ga_largefile_example [-h][-p <port no.>][-f <file name>]\n"
"Example: replay4ga_largefile_example -p 1 -f mycapture.cap\n",
NULL
}

Print command line info

Definition at line 59 of file replay4ga_largefile_example.c.

Referenced by main().

int opt_port = 0
static
char* opt_filename
static

Definition at line 67 of file replay4ga_largefile_example.c.

Referenced by main().

int appRunning = 1
static

Definition at line 69 of file replay4ga_largefile_example.c.

Referenced by main(), and StopApplication().

struct argparse_option arg_options[]
Initial value:
= {
OPT_INTEGER('p', "port", &opt_port, "Tx port", NULL, 0, 0, "port number"),
OPT_STRING('f', "filename", &opt_filename, "File name\n", NULL, 0, 0, "value"),
}

Table of valid options.

Definition at line 74 of file replay4ga_largefile_example.c.