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 receiver and sender with:
makeDelete binaries with:
make cleanBuild the receiver with:
make receiveror
g++ receiver.cpp -o receiverCompile the sender with:
make senderor
g++ sender.cpp -o senderA 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!"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