Skip to content

jbentzer/network-timestamping

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Timestamping

Proof of concept application for reading PTP time stamp on network packages. Runs on Linux. The receiver enables timestamps enables hardware and software timestamps on received network packages. The sender is a simple tool to send packages to the receiver. The capabilities of the network card can be checked with:

  ethtool -T <interface>

Build

Build receiver and sender with:

  make

Delete binaries with:

  make clean

Build the receiver with:

  make receiver

or

  g++ receiver.cpp -o receiver

Compile the sender with:

  make sender

or

  g++ sender.cpp -o sender

Usage

Sender

A simple UDP sender that can send messages to a specified destination and port.

Help:

./sender [--help] [-h]

Default destination is 127.0.0.1 and default port is 319 (PTP event messages).

Example:

./sender --dest 192.168.1.100 --port 12345 --msg "Hello, World!"

Receiver

A simple UDP receiver that listens on a specified port and prints received messages along with their software and hardware timestamps.

Help:

./receiver [--help] [-h]

Default port is 319 (PTP event messages). Note: Requires root privileges to receive hardware timestamps.

Example:

sudo ./receiver --port 12345

About

A simple PoC application which displays IEEE 1588 PTP timestamps on network packets.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published