Networking Forums

Networking Forums > Computer Networking > Linux Networking > raw IPv6 packets on Linux

Reply
Thread Tools Display Modes

raw IPv6 packets on Linux

 
 
Manish Katiyar
Guest
Posts: n/a

 
      09-24-2007, 11:26 AM
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

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Generate tunnelled IPv6 packets lancer6238@yahoo.com Linux Networking 0 02-03-2009 05:47 AM
IPv6 netfilter state matching: Invalid packets Lukas Barth Linux Networking 1 12-31-2008 03:53 PM
linux from kernel.org and ipv6 Venkat Linux Networking 0 07-23-2008 10:39 PM
Linux host PC(ipv6) can't ping with embedded board(ipv6) with ping6 sangsu Linux Networking 2 10-11-2005 09:06 AM
Bridging IPv6 packets with Catalyst 3500 Mohan Ram Network Routers 0 05-17-2005 10:53 AM



1 2 3 4 5 6 7 8 9 10 11