Skip to content

Tag: ethernet

Capturing PTP packets with Linux raw socket

I want to implement a C program that captures all the Precision-Time-Protocol (PTP) frames on the Ethernet, so I created a raw socket and attached a filter for PTP, I use recvmsg() to read data from the socket. The first issue is that I wasn’t receiving any PTP frames so I commented out the filter but n…

Ethernet frames from NIC

I’m searching for help and an opinion-advice for a network project, in which I’m working lately. This requires a Linux machine to be a passive network appliance. Network packets come in from one network interface and come out from another interface ( net–eth0–>Linux PC–eth1&#8…