netdev
[Top] [All Lists]

socket(PF_INET6, SOCK_RAW, IPPROTO_ICMPV6)

To: netdev@xxxxxxxxxxx
Subject: socket(PF_INET6, SOCK_RAW, IPPROTO_ICMPV6)
From: Marcin Kaminski <maxiu@xxxxxxxxxxxxx>
Date: Wed, 12 Mar 2003 13:17:47 +0100 (CET)
Sender: netdev-bounce@xxxxxxxxxxx
Hi

I've found, that on my system (2.2.22) RAW sockets for IPv6 works
different than for IPv4.
When I create socket like:
    interfaceSocket = socket(PF_INET, SOCK_RAW, IPPROTO_ICMP);
I receive ICMPv4 packets with IP header, but when I use
    interfaceSocket = socket(PF_INET6, SOCK_RAW, IPPROTO_ICMPV6);
I receive ICMPv6 packets WITHOUT IPv6 header.
What should I do in order to get full packet?
Man pages of raw(7) tell:

For receiving the IP header is always included in the packet.

But it is not true for IPv6 :(

With regards
- Marcin Kaminski --------------------------------- maxiu -
--- software developer ------------------- 6net project ---
----- network administrator -------- Best Group admin -----
------- Poznań Supercomputing and Networking Center -------




<Prev in Thread] Current Thread [Next in Thread>