svn commit: samba r25472 - in branches:
SAMBA_3_2/source SAMBA_3_2/source/include
SAMBA_3_2/source/lib SAMBA_3_2/source/lib/replace SAMBA_3_2/source/lib/replace/system
SAMBA_3_2/source/utils SAMBA_3_2_0/source SAMBA_3_2_0/source/include SAMBA_3_2_0/source/lib
SAMBA_3_2_0/source/lib/replace SAMBA_3_2_0/source/lib/replace/system SAMBA_3_2_0/source/utils
David Holder
david.holder at erion.co.uk
Tue Oct 2 20:54:29 GMT 2007
Jeremy,
Is the purpose of this code to enumerate interfaces or addresses? The
reason that I ask is that the standard way to enumerate interfaces is
if_nameindex().
Listing addresses is harder. On most, but not all, platforms
getifaddrs() is IPv4 only. A number of platforms, but not all, support
the use of the SIOCGIFADDR ioctl to enumerate IPv6 addresses. On Linux
rtnetlink can be used.
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
Jeremy Allison wrote:
> On Tue, Oct 02, 2007 at 01:14:05PM -0700, James Peach wrote:
>
>> On Oct 2, 2007, at 12:27 PM, jra at samba.org wrote:
>>
>>
>>> Author: jra
>>> Date: 2007-10-02 19:27:25 +0000 (Tue, 02 Oct 2007)
>>> New Revision: 25472
>>>
>>> WebSVN:
>>> http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=25472
>>>
>>> Log:
>>> Fix the interfaces code to detect IPv6 interfaces, using the
>>> new standard getifaddrs() and freeifaddrs() interfaces.
>>>
>> You should check that ifptr->ifa_addr and ifptr->ifa_netmask are not
>> NULL.
>>
>
> Got it - thanks.
>
> Jeremy.
>
More information about the samba-technical
mailing list