svn commit: samba r25495 - in branches: SAMBA_3_2/source/lib/replace/system SAMBA_3_2_0/source/lib/replace/system

David Holder david.holder at erion.co.uk
Thu Oct 4 09:58:06 GMT 2007


Jeremy,

Steve Langasek wrote:
> On Wed, Oct 03, 2007 at 03:17:22PM -0700, Jeremy Allison wrote:
>
>   
>> Nope - because if you don't have sockaddr_storage
>> it's a dead cert you don't have sockaddr_in6 - no
>> IPv6 - so just use IPv4 sockaddr_in.
>>     
>
>   
>> If we find any platforms where this isn't the
>> case I can add an #ifdef HAVE_STRUCT_SOCKADDR_IN6
>> and use that by preference.
>>     
>
> Very old glibc? :)
>
> I think glibc got ipv6 support before sockaddr_storage was conceived.
>
>   
True. There will be platforms with IPv6 support that do not have 
sockaddr_storage in the socket library. There are a number of different 
ways of testing for IPv6 support that I have come across in IPv6 porting 
guides from HP, Sun, etc. Why not use the appropriate test for each 
platform and then if there is no IPv6, define sockaddr_storage as 
sockaddr_in and if there is IPv6 and no sockaddr_storage define it is 
sockaddr_in6?

See for example:
1.    Porting Networking Applications to the IPv6 APIs (Solaris Version 8)
2.    HP-UX IPv6 Porting Guide

<http://docs.hp.com/en/B2355-90824/B2355-90824.pdf>Regards,
David
------------------------------------------------------------------------
Dr David Holder CEng FIET MIEEE

Erion Ltd, Oakleigh, Upper Sutherland Road, Halifax, HX3 8NT

Reception: +44 (0)1422 207000

Direct Dial: +44 (0)131 2026317

Cell: +44 (0) 7768 456831

Registered in England and Wales. Registered Number 3521142
VAT Number: GB 698 3633 78



David


More information about the samba-technical mailing list