This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Interface friendly names for AF_INET6


On Mar 10 15:30, Marco Atzeri wrote:
> 
> 
> 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.

Try the latest snapshot.  The ifa_data member now contains a pointer
to a struct ifa_hwdata which is defined in <ifaddrs.h>.


Thanks,
Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

Attachment: signature.asc
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]