* Interface friendly names for AF_INET6
@ 2016-03-10 11:10 Marco Atzeri
2016-03-10 13:32 ` Corinna Vinschen
2016-03-10 14:03 ` Corinna Vinschen
0 siblings, 2 replies; 9+ messages in thread
From: Marco Atzeri @ 2016-03-10 11:10 UTC (permalink / raw)
To: cygwin
I am trying to put a small interface info tool
to debug some hangs reported on openmpi.
The aim is to produce something like
{9F4F7FD2-5E44-4796-ABE0-0785CF76C11E} AF_INET6 (23)
flags: up running multicast
address: <fe80::9953:b1f5:a643:4497%15>
Local Area Connection
{9F4F7FD2-5E44-4796-ABE0-0785CF76C11E} AF_INET (2)
flags: up broadcast running multicast
address: <172.21.188.188>
Local Area Connection
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
On my pc I see 20 interface, 10 for each type, however
only 7 couples shares the same "ifa_name" the others
3+3 shows different ones.
Any alternative to ioctl(sock, SIOCGIFFRNDLYNAM
for AF_INET6 ?
Regards
Marco
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Interface friendly names for AF_INET6
2016-03-10 11:10 Interface friendly names for AF_INET6 Marco Atzeri
@ 2016-03-10 13:32 ` Corinna Vinschen
2016-03-10 13:49 ` Corinna Vinschen
2016-03-10 14:03 ` Corinna Vinschen
1 sibling, 1 reply; 9+ messages in thread
From: Corinna Vinschen @ 2016-03-10 13:32 UTC (permalink / raw)
To: cygwin
[-- Attachment #1: Type: text/plain, Size: 1416 bytes --]
Hi Marco,
On Mar 10 12:10, Marco Atzeri wrote:
> I am trying to put a small interface info tool
> to debug some hangs reported on openmpi.
>
> The aim is to produce something like
>
> {9F4F7FD2-5E44-4796-ABE0-0785CF76C11E} AF_INET6 (23)
> flags: up running multicast
> address: <fe80::9953:b1f5:a643:4497%15>
> Local Area Connection
> {9F4F7FD2-5E44-4796-ABE0-0785CF76C11E} AF_INET (2)
> flags: up broadcast running multicast
> address: <172.21.188.188>
> Local Area Connection
>
> 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.
> On my pc I see 20 interface, 10 for each type, however
> only 7 couples shares the same "ifa_name" the others
> 3+3 shows different ones.
>
> Any alternative to ioctl(sock, SIOCGIFFRNDLYNAM
> for AF_INET6 ?
I don't quite understand the question. Are you saying that
ioctl(sock, SIOCGIFFRNDLYNAM) doesn't work for AF_INET6 sockets?
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Interface friendly names for AF_INET6
2016-03-10 13:32 ` Corinna Vinschen
@ 2016-03-10 13:49 ` Corinna Vinschen
2016-03-10 14:30 ` Marco Atzeri
0 siblings, 1 reply; 9+ messages in thread
From: Corinna Vinschen @ 2016-03-10 13:49 UTC (permalink / raw)
To: cygwin
[-- Attachment #1: Type: text/plain, Size: 1885 bytes --]
On Mar 10 14:32, Corinna Vinschen wrote:
> Hi Marco,
>
> On Mar 10 12:10, Marco Atzeri wrote:
> > I am trying to put a small interface info tool
> > to debug some hangs reported on openmpi.
> >
> > The aim is to produce something like
> >
> > {9F4F7FD2-5E44-4796-ABE0-0785CF76C11E} AF_INET6 (23)
> > flags: up running multicast
> > address: <fe80::9953:b1f5:a643:4497%15>
> > Local Area Connection
> > {9F4F7FD2-5E44-4796-ABE0-0785CF76C11E} AF_INET (2)
> > flags: up broadcast running multicast
> > address: <172.21.188.188>
> > Local Area Connection
> >
> > 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
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Interface friendly names for AF_INET6
2016-03-10 11:10 Interface friendly names for AF_INET6 Marco Atzeri
2016-03-10 13:32 ` Corinna Vinschen
@ 2016-03-10 14:03 ` Corinna Vinschen
2016-03-10 14:35 ` Marco Atzeri
1 sibling, 1 reply; 9+ messages in thread
From: Corinna Vinschen @ 2016-03-10 14:03 UTC (permalink / raw)
To: cygwin
[-- Attachment #1: Type: text/plain, Size: 1179 bytes --]
On Mar 10 12:10, Marco Atzeri wrote:
> I am trying to put a small interface info tool
> to debug some hangs reported on openmpi.
>
> The aim is to produce something like
>
> {9F4F7FD2-5E44-4796-ABE0-0785CF76C11E} AF_INET6 (23)
> flags: up running multicast
> address: <fe80::9953:b1f5:a643:4497%15>
> Local Area Connection
> {9F4F7FD2-5E44-4796-ABE0-0785CF76C11E} AF_INET (2)
> flags: up broadcast running multicast
> address: <172.21.188.188>
> Local Area Connection
>
> 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
>
> On my pc I see 20 interface, 10 for each type, however
> only 7 couples shares the same "ifa_name" the others
> 3+3 shows different ones.
Btw., don't use the friendly names to distinguish interfaces. Only the
real, GUID-like interface name is a valid, unique identifier under
Windows.
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Interface friendly names for AF_INET6
2016-03-10 13:49 ` Corinna Vinschen
@ 2016-03-10 14:30 ` Marco Atzeri
2016-03-10 17:41 ` Corinna Vinschen
0 siblings, 1 reply; 9+ messages in thread
From: Marco Atzeri @ 2016-03-10 14:30 UTC (permalink / raw)
To: cygwin
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.
Regards
Marco
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Interface friendly names for AF_INET6
2016-03-10 14:03 ` Corinna Vinschen
@ 2016-03-10 14:35 ` Marco Atzeri
0 siblings, 0 replies; 9+ messages in thread
From: Marco Atzeri @ 2016-03-10 14:35 UTC (permalink / raw)
To: cygwin
On 10/03/2016 15:03, Corinna Vinschen wrote:
> On Mar 10 12:10, Marco Atzeri wrote:
>> I am trying to put a small interface info tool
>> to debug some hangs reported on openmpi.
>>
>> The aim is to produce something like
>>
>> {9F4F7FD2-5E44-4796-ABE0-0785CF76C11E} AF_INET6 (23)
>> flags: up running multicast
>> address: <fe80::9953:b1f5:a643:4497%15>
>> Local Area Connection
>> {9F4F7FD2-5E44-4796-ABE0-0785CF76C11E} AF_INET (2)
>> flags: up broadcast running multicast
>> address: <172.21.188.188>
>> Local Area Connection
>>
>> 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
>>
>> On my pc I see 20 interface, 10 for each type, however
>> only 7 couples shares the same "ifa_name" the others
>> 3+3 shows different ones.
>
> Btw., don't use the friendly names to distinguish interfaces. Only the
> real, GUID-like interface name is a valid, unique identifier under
> Windows.
>
>
> Corinna
That I know, however If I should advise a user to disable by control
panel a virtual interface I can not use the
{9F4F7FD2-5E44-4796-ABE0-0785CF76C11E}
but
"Local Area Connection"
should work ...
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Interface friendly names for AF_INET6
2016-03-10 14:30 ` Marco Atzeri
@ 2016-03-10 17:41 ` Corinna Vinschen
2016-05-13 15:00 ` Marco Atzeri
0 siblings, 1 reply; 9+ messages in thread
From: Corinna Vinschen @ 2016-03-10 17:41 UTC (permalink / raw)
To: cygwin
[-- Attachment #1: Type: text/plain, Size: 1825 bytes --]
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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Interface friendly names for AF_INET6
2016-03-10 17:41 ` Corinna Vinschen
@ 2016-05-13 15:00 ` Marco Atzeri
2016-05-20 16:45 ` Corinna Vinschen
0 siblings, 1 reply; 9+ messages in thread
From: Marco Atzeri @ 2016-05-13 15:00 UTC (permalink / raw)
To: cygwin
On 10/03/2016 18:41, Corinna Vinschen wrote:
>>
>> 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
>
Hi Corinna,
thanks for it
$ ./get-interface-64.exe
internal_name: {EC2ABB5C-42A8-431D-A133-8F4BE0F309AF}
flags: AF_INET6 up multicast
address: fe80::a479:1393:b7d0:fb25%18
friendly_name: Local Area Connection 2
internal_name: {EC2ABB5C-42A8-431D-A133-8F4BE0F309AF}
flags: AF_INET up broadcast multicast
address: 169.254.251.37
friendly_name: Local Area Connection 2
internal_name: {9213DBB8-80C6-4316-AA7A-EBF8AD7661E1}
flags: AF_INET6 up multicast
address: fe80::8c29:45f0:47fa:536%24
friendly_name: Wireless Network Connection 3
internal_name: {9213DBB8-80C6-4316-AA7A-EBF8AD7661E1}
flags: AF_INET up broadcast multicast
address: 169.254.5.54
friendly_name: Wireless Network Connection 3
...
Regards
Marco
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Interface friendly names for AF_INET6
2016-05-13 15:00 ` Marco Atzeri
@ 2016-05-20 16:45 ` Corinna Vinschen
0 siblings, 0 replies; 9+ messages in thread
From: Corinna Vinschen @ 2016-05-20 16:45 UTC (permalink / raw)
To: cygwin
[-- Attachment #1: Type: text/plain, Size: 1518 bytes --]
On May 13 17:00, Marco Atzeri wrote:
> On 10/03/2016 18:41, Corinna Vinschen wrote:
> > >
> > > 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
> >
>
> Hi Corinna,
>
> thanks for it
>
> $ ./get-interface-64.exe
> internal_name: {EC2ABB5C-42A8-431D-A133-8F4BE0F309AF}
> flags: AF_INET6 up multicast
> address: fe80::a479:1393:b7d0:fb25%18
> friendly_name: Local Area Connection 2
>
> internal_name: {EC2ABB5C-42A8-431D-A133-8F4BE0F309AF}
> flags: AF_INET up broadcast multicast
> address: 169.254.251.37
> friendly_name: Local Area Connection 2
>
> internal_name: {9213DBB8-80C6-4316-AA7A-EBF8AD7661E1}
> flags: AF_INET6 up multicast
> address: fe80::8c29:45f0:47fa:536%24
> friendly_name: Wireless Network Connection 3
>
> internal_name: {9213DBB8-80C6-4316-AA7A-EBF8AD7661E1}
> flags: AF_INET up broadcast multicast
> address: 169.254.5.54
> friendly_name: Wireless Network Connection 3
> ...
Glad it works as desired.
Thanks for your feedback,
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2016-05-20 16:45 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-10 11:10 Interface friendly names for AF_INET6 Marco Atzeri
2016-03-10 13:32 ` Corinna Vinschen
2016-03-10 13:49 ` Corinna Vinschen
2016-03-10 14:30 ` Marco Atzeri
2016-03-10 17:41 ` Corinna Vinschen
2016-05-13 15:00 ` Marco Atzeri
2016-05-20 16:45 ` Corinna Vinschen
2016-03-10 14:03 ` Corinna Vinschen
2016-03-10 14:35 ` Marco Atzeri
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).