timestamp_inject_example.cpp

Reference Documentation

Platform
Intel® PAC
Napatech SmartNIC
Content Type
Reference Information
Capture Software Version
Link™ Capture Software 12.10
Napatech Software Suite: examples/net/timestamp_inject/timestamp_inject_example.cpp File Reference
timestamp_inject_example.cpp File Reference
#include <nt.h>
#include <atomic>
#include <iostream>
#include <thread>
#include <unistd.h>
#include <signal.h>

Go to the source code of this file.

Data Structures

struct  Dyn3_tx_descriptor
 
class  PacketReaderThread
 
class  PacketTransmitterThread
 

Functions

void printDescriptor (NtPacketDescriptorType_e descrType)
 
static void sighandler (int)
 
void printError (int status, const char *formatstr)
 
void applyNtpl (uint64_t rxPort)
 
bool featuresAvailable (uint64_t txPort)
 
static void usage (const char *argv0)
 
int main (int argc, char **argv)
 

Variables

std::atomic< bool > running {true}
 
const unsigned char examplePacket []
 

Function Documentation

void printDescriptor ( NtPacketDescriptorType_e  descrType)
static void sighandler ( int  )
static
Examples:
net/timestamp_inject/timestamp_inject_example.cpp.

Definition at line 501 of file timestamp_inject_example.cpp.

Referenced by main().

void applyNtpl ( uint64_t  rxPort)
Examples:
net/timestamp_inject/timestamp_inject_example.cpp.

Definition at line 519 of file timestamp_inject_example.cpp.

Referenced by main().

bool featuresAvailable ( uint64_t  txPort)
Examples:
net/timestamp_inject/timestamp_inject_example.cpp.

Definition at line 544 of file timestamp_inject_example.cpp.

Referenced by main().

static void usage ( const char *  argv0)
static
int main ( int  argc,
char **  argv 
)

Definition at line 600 of file timestamp_inject_example.cpp.

Variable Documentation

const unsigned char examplePacket[]
Initial value:
=
{
0x94, 0xC6, 0x91, 0x1C, 0x68, 0x1D, 0x94, 0xC6, 0x91, 0x1C, 0x68, 0xC3, 0x08, 0x00, 0x45, 0x00,
0x00, 0x78, 0x00, 0x01, 0x00, 0x00, 0x40, 0x06, 0xB5, 0xCF, 0xC0, 0xA8, 0x00, 0x02, 0x01, 0x02,
0x03, 0x04, 0x00, 0x14, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x02,
0x20, 0x00, 0x42, 0xF7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
}
Examples:
net/timestamp_inject/timestamp_inject_example.cpp.

Definition at line 304 of file timestamp_inject_example.cpp.

Referenced by PacketTransmitterThread::txPacket().