When applications use raw IPv4 sockets, they can receive (and set) the IPv4 header as part of the packet using the IP_HDRINCL option.
Similar to how an application can get an IPv6 header as part of a packet (IPv6)? I understand that using raw sockets does not help here.
Is it possible to use ioctl () instead of sockets to get what I want? By the way, I'm trying to achieve this on Linux.
source share