transmit_on_timestamp_setclock_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/transmit_on_timestamp_setclock/transmit_on_timestamp_setclock_example.c File Reference
transmit_on_timestamp_setclock_example.c File Reference
#include <nt.h>
#include <assert.h>

Go to the source code of this file.

Data Structures

struct  pcap_timespec_s
 
struct  pcap_record_s
 

Macros

#define PACKETS   100L
 
#define PACKET_SIZE   296L
 
#define PACKET_GAP   500000L
 
#define REPLAYS   1000L
 
#define TX_DELAY   1000000000
 
#define PORT   0
 
#define ADAPTER   0
 
#define REPLAY_TRANSMIT_TIME   (PACKET_GAP * PACKETS)
 
#define TOTAL_TRANSMIT_TIME   (REPLAY_TRANSMIT_TIME * REPLAYS)
 

Functions

static void printError (const char *prefix, int errorCode)
 
static uint64_t convertToUnixNsTs (const struct NtConfigTimestampReadData_s *data)
 
int main (void)
 

Variables

bool pcapPackets = false
 

Macro Definition Documentation

#define PACKETS   100L

Definition at line 147 of file transmit_on_timestamp_setclock_example.c.

Referenced by main().

#define PACKET_SIZE   296L

Definition at line 148 of file transmit_on_timestamp_setclock_example.c.

Referenced by main().

#define PACKET_GAP   500000L
#define REPLAYS   1000L
#define TX_DELAY   1000000000
#define PORT   0

Definition at line 152 of file transmit_on_timestamp_setclock_example.c.

Referenced by main().

#define ADAPTER   0

Definition at line 153 of file transmit_on_timestamp_setclock_example.c.

Referenced by main().

#define REPLAY_TRANSMIT_TIME   (PACKET_GAP * PACKETS)

Function Documentation

static void printError ( const char *  prefix,
int  errorCode 
)
static

Definition at line 181 of file transmit_on_timestamp_setclock_example.c.

Referenced by main().

static uint64_t convertToUnixNsTs ( const struct NtConfigTimestampReadData_s *  data)
static

Definition at line 188 of file transmit_on_timestamp_setclock_example.c.

Referenced by main().

int main ( void  )

Definition at line 203 of file transmit_on_timestamp_setclock_example.c.

Variable Documentation

bool pcapPackets = false