This is the mail archive of the
mailing list for the Cygwin project.
Re: Interface friendly names for AF_INET6
- From: Marco Atzeri <marco dot atzeri at gmail dot com>
- To: cygwin at cygwin dot com
- Date: Thu, 10 Mar 2016 15:30:10 +0100
- Subject: Re: Interface friendly names for AF_INET6
- Authentication-results: sourceware.org; auth=none
- References: <56E15638 dot 5080906 at gmail dot com> <20160310133223 dot GB27354 at calimero dot vinschen dot de> <20160310134903 dot GC27354 at calimero dot vinschen dot de>
On 10/03/2016 14:49, Corinna Vinschen wrote:
On Mar 10 14:32, Corinna Vinschen wrote:
I am using getifaddrs to obtain all the AF_INET and AF_INET6
interface, however I can only obtain the friendly name of the
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 sockaddr ifa_hwaddr;
struct ifreq_frndlyname ifa_frndlyname;
ifa_data = pointer to ifall_data;
Would that help to get this into Cygwin 2.5.0?
I assume the ifall structures are not visible outside cygwin internal,
If so a ifall_data pointer should cover my current trial.
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple