replay4ga_largefile_example.c

Reference Documentation

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

Go to the source code of this file.

Functions

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

Macros

#define ONEMBIT   (1000000ULL)
 

Variables

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

Function Documentation

static void StopApplication ( int  sig)
static

The function called when user is pressing CTRL-C

Definition at line 85 of file replay4ga_largefile_example.c.

Referenced by main().

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

Definition at line 101 of file replay4ga_largefile_example.c.

Macro Definition Documentation

#define ONEMBIT   (1000000ULL)

Definition at line 49 of file replay4ga_largefile_example.c.

Referenced by main().

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",
}

Print command line info

Definition at line 54 of file replay4ga_largefile_example.c.

Referenced by main().

int opt_port = 0
static
Examples:
net/transmit_multifunction/transmit_multifunction_example.c.

Definition at line 61 of file replay4ga_largefile_example.c.

Referenced by main().

char* opt_filename
static

Definition at line 62 of file replay4ga_largefile_example.c.

Referenced by main().

int appRunning = 1
static

Definition at line 64 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 69 of file replay4ga_largefile_example.c.