Is it possible to use raw IPV6 socket with UDP under Centos7.9 (Linux3.10)?

75 Views Asked by At

I am trying to build a raw IPV6 socket using c for sending packets through UDP. Noticed that inside the setsockopt() field, we use IP_HDRINCL for making ipv4 headers. However, the IPV6 raw socket requires this to be IPV6_HDRINCL.

The IPV6_HDRINCL config only available after Linux4.5 kernel, but we are currently using Linux3.10, updating the kernel is a kind of huge and unpredictable work, are there any other ways to build the raw IPV6 socket using Linux3.10 core, or we have to update the core to a appropriate version?

0

There are 0 best solutions below