Hi,

I am currently porting an application from IPv4 to IPv6. The older
code uses some raw IPV4 packets with a structure defined as

struct
{
struct iphdr ip;
struct tcphdr tcp;
} pkt;


However to replace the above structure for IPV6 I can see two
structures available, "struct ipv6hdr" and "struct ip6_hdr". The later
one doesnt seem to be a complete fit as it doesnt seem to have all the
required fields of IPv6. Can anyone suggest which one to use.

When I use ipv6hdr and include the corresponding files

#include
#include

I get a compilation error as redefinition of in6_addr.

Also I read that we may not need the following code with IPv6.

ret = setsockopt(s, SOL_IP, IP_HDRINCL, &one, sizeof(one));

Any suggestions?

Thanks in advance