Interface friendly names for AF_INET6

Marco Atzeri
Thu Mar 10 14:30:00 GMT 2016

On 10/03/2016 14:49, Corinna Vinschen wrote:
> On Mar 10 14:32, Corinna Vinschen wrote:
>> Hi Marco,

>>> I am using getifaddrs to obtain all the AF_INET and AF_INET6
>>> interface, however I can only obtain the friendly name of the
>>> AF_INET using
>>>    ioctl(sock, SIOCGIFFRNDLYNAM
>> getifaddrs should return the friendly name.  Strruct ifall
>> has a member ifa_frndlyname, type struct ifreq_frndlyname,
>> which is filled for AF_INET and AF_INET6 interfaces.
> Oh, I see.  The friendlyname is there, but struct ifaddrs is missing a
> pointer to it.  That's the confusion you get when reusing the same
> function and structure type for multiple APIs.
> This could be easily rectified by utilizing the ifa_data pointer which
> is unused so far.  It could point to a structure pointing to the other
> values collected but not yet exposed by getifaddrs, e.g.:
>    struct ifall_data
>    {
>      struct sockaddr         ifa_hwaddr;
>      int                     ifa_metric;
>      int                     ifa_mtu;
>      int                     ifa_ifindex;
>      struct ifreq_frndlyname ifa_frndlyname;
>    };
>    ifa_data = pointer to ifall_data;
> Would that help to get this into Cygwin 2.5.0?
> Corinna

I assume the ifall structures are not visible outside cygwin internal, 
correct ?

If so a ifall_data pointer should cover my current trial.


Problem reports:
Unsubscribe info:

More information about the Cygwin mailing list