[ipv6hackers] Definition of "struct ip6_opt" in Mac OS

Fernando Gont fgont at si6networks.com
Sat Jul 21 10:12:36 CEST 2012

Hi, Adrian,

Thanks so much for your response! --  Comments inline...

On 07/20/2012 10:05 AM, Adrian Bool wrote:
> The following seems to work OK on my system,
> #if defined(__APPLE__)
> #include "AvailabilityMacros.h"
> /* IPv6 options */
> struct ip6_opt{
> uint8_t  ip6o_type;
> uint8_t  ip6o_len;
> } __attribute__ ((__packed__));
> #endif
> #endif
> …and hopefully won't break on 10.8 and above…  I don't have such a
> system to test with though.

I will double-check this patch with the folks reporting the compilation
problem, and will apply it if it fixed the problem (i.e., it's enough to
make scan6 compile on al Mac OS versions).

Meanwhile, I have commited a patch that fixes this problem the "dirty"
way: rather than use the system-defined "struct ip6_opt", I have defined
the same structure internally, with the name "struct ip6_option".

(Clearly, your patch is cleaner.. hence I'd like to be able to apply it).


Best regards,
Fernando Gont
SI6 Networks
e-mail: fgont at si6networks.com
PGP Fingerprint: 6666 31C6 D484 63B2 8FB1 E3C4 AE25 0D55 1D4E 7492

More information about the Ipv6hackers mailing list