raw IPv6 packets on Linux
- From: Manish Katiyar <mkatiyar@xxxxxxxxx>
- Date: Mon, 24 Sep 2007 11:26:17 -0000
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 <netinet/ip6.h>
#include <linux/ipv6.h>
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
.
- Prev by Date: PSE HELP -> HOWTO configure BIND for Active Directory
- Next by Date: client Windows, Server DHCP Linux and option User Class Information (code 77) [HELP]
- Previous by thread: PSE HELP -> HOWTO configure BIND for Active Directory
- Next by thread: client Windows, Server DHCP Linux and option User Class Information (code 77) [HELP]
- Index(es):
Relevant Pages
|