Frédéric Raynal
2005-02-15 11:16:36 UTC
Hello *,
I was working on RAW6 injection mode and had a bad surprise :( Whereas
is seems to work fine on Linux 2.6, I read the following in ip6(6) of
my Mac OS X :
Another difference from IPv4 raw sockets is that complete packets(that
is, IPv6 packets with extension headers) cannot be read or written using
the IPv6 raw sockets API. Instead, ancillary data objects are used to
transfer the extension headers, as described above. Should an applica-
tion need access to the complete IPv6 packet, some other technique, such
as the datalink interfaces, such as bpf(4), must be used.
All fields in the IPv6 header that an application might want to change
(i.e., everything other than the version number) can be modified using
ancillary data and/or socket options by the application for output. All
fields in a received IPv6 header (other than the version number and Next
Header fields) and all extension headers are also made available to the
application as ancillary data on input. Hence there is no need for a
socket option similar to the IPv4 IP_HDRINCL socket option.
I also checked under OpenBSD and NetBSD, the manpage contains the same
paragraphs.
So, as I am really newbie with IPv6, did I understand well: you can
not build IPv6 headers using RAW sockets under *BSD ?
Thanks for any information you could send me.
Fred
I was working on RAW6 injection mode and had a bad surprise :( Whereas
is seems to work fine on Linux 2.6, I read the following in ip6(6) of
my Mac OS X :
Another difference from IPv4 raw sockets is that complete packets(that
is, IPv6 packets with extension headers) cannot be read or written using
the IPv6 raw sockets API. Instead, ancillary data objects are used to
transfer the extension headers, as described above. Should an applica-
tion need access to the complete IPv6 packet, some other technique, such
as the datalink interfaces, such as bpf(4), must be used.
All fields in the IPv6 header that an application might want to change
(i.e., everything other than the version number) can be modified using
ancillary data and/or socket options by the application for output. All
fields in a received IPv6 header (other than the version number and Next
Header fields) and all extension headers are also made available to the
application as ancillary data on input. Hence there is no need for a
socket option similar to the IPv4 IP_HDRINCL socket option.
I also checked under OpenBSD and NetBSD, the manpage contains the same
paragraphs.
So, as I am really newbie with IPv6, did I understand well: you can
not build IPv6 headers using RAW sockets under *BSD ?
Thanks for any information you could send me.
Fred