0

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?

  • 1
    Does this answer your question? [Raw IPv6 packet handling on linux](https://stackoverflow.com/questions/9008540/raw-ipv6-packet-handling-on-linux), [IPv6 packet header manipulation](https://stackoverflow.com/questions/38413095/ipv6-packet-header-manipulation) – Steffen Ullrich Jun 05 '23 at 05:32
  • Hi, Steffen, it doesn't help that much, but thank you anyways! – Grantofrivia Jun 05 '23 at 07:54
  • The API for manipulating IPv6 headers is defined in RFC 3542 and supported in Linux. The answer in the first question links to this RFC, the second answer goes into more detail. Compared to the API defined in RFC 3542, IPV6_HDRINCL is a non-standard API which is not supported universally. – Steffen Ullrich Jun 05 '23 at 08:11

0 Answers0