Skip to content
Advertisement

Tag: raw-sockets

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 now I am not

resend packets via RAW sockets in linux

It’s needed to read raw data from one interface and send it via another. open&&config(the same for sock_raw_outer): then in cycle: then, if I catch on sock_raw_inner any packet(arp request, for example), it sended on sock_raw_inner again and again by sendto. What’s wrong? Thanks. Answer Your sock_raw_inner is still listening on every interface because the bind on eth0 you are

Advertisement