X-Recipient: archive-cygwin@delorie.com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:date:from:to:subject:message-id:reply-to
	:references:mime-version:content-type:in-reply-to; q=dns; s=
	default; b=qpp4/ZYNkA8VXzruTxW5YQRY+5127CT5uZ/I0JLoVDGY2n58u5d1W
	0/Y6nH4s9F4A1vHUqBfVQjgzqRlLKUwGO5dAvNHAFCERYsYwrcl0X+MPJPiPwduk
	I17TEVbpA/vCzw4ZioZT5Ry1CVzeO/1xOiLb89B3z6RyFjUL/CMD5A=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:date:from:to:subject:message-id:reply-to
	:references:mime-version:content-type:in-reply-to; s=default;
	 bh=c/KW7i8FVk3bOnupHBvly5jId+o=; b=L7xcnM6kfhpQw51mO1TgZDWHZwjB
	FTtgoRZkebkEHYm9h98dL7gL6G6/wGTClQrVoK6hcbmk5MuT8P5c9/yQnFF0Qh62
	ZinxydZOoN9MivMNonCnVTy/isuJAnZDuvJreb+EtaTksNqYoUUJRyRfuqrS8qUu
	aZDw+X4K+K86b4A=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-93.9 required=5.0 tests=BAYES_50,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_PBL,RDNS_DYNAMIC,USER_IN_WHITELIST autolearn=no version=3.3.2 spammy=DOT, Maintainer, Interface, utilizing
X-HELO: calimero.vinschen.de
Date: Thu, 10 Mar 2016 14:49:03 +0100
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: Interface friendly names for AF_INET6
Message-ID: <20160310134903.GC27354@calimero.vinschen.de>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <56E15638.5080906@gmail.com> <20160310133223.GB27354@calimero.vinschen.de>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha256;	protocol="application/pgp-signature"; boundary="K8nIJk4ghYZn606h"
Content-Disposition: inline
In-Reply-To: <20160310133223.GB27354@calimero.vinschen.de>
User-Agent: Mutt/1.5.24 (2015-08-30)

--K8nIJk4ghYZn606h
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mar 10 14:32, Corinna Vinschen wrote:
> Hi Marco,
>=20
> 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.
> >=20
> > The aim is to produce something like
> >=20
> > {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
> >=20
> > 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
>=20
> 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 =3D pointer to ifall_data;

Would that help to get this into Cygwin 2.5.0?


Corinna

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

--K8nIJk4ghYZn606h
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJW4XtOAAoJEPU2Bp2uRE+ggdgQAKD1IcSoGSK9+r4XDfAt4ZHD
nt0Z5xfn3dfakCexSU1wTbqcIxNqw+r7QfDC0ZaxeOAfzVCXoSy7ZgGTT5EbbdlL
r85TKPXvYb+7y+JQsdTZ6ri605wmTnGV/pkAiGzBk62ODdKYZoY+UdTXvQyqaIjs
4o4w/Y6WGGZcOkrtvzy+8RNT4yGeeMu/d0UFd5a2ojddUqbWeGpKfmaYI/X3boQu
/pdxHCsXwlN5IpKihkTJOFl+o4nKpdDZsWoCWcy3GkIfL5738bxdzz3lZ8Njl8l0
5lhi2bWsA00YCaYyX/do4jXJRwaJCbNmHVNVlLDxXt7aQWwChNa+bMZcTyz3Ntve
gtXITlc2gYUGPN+ZzhLXn/cOF6XX6sIV+lme2/DXAEWA0JJ0JtTqsSKkXI5/Hblq
m1l6XUsj006TF5xEuRkgZcRzCmus5PaDV8aZK0N1nfssz9aJWi2SiGLrM0mDNBmk
kcoV7w0R2pFCuc1ln0hwgVZr+L5tuBspxlHDhUPz8XmlKgvNNSclZ7zvc4PAGVtq
GsZvgqOaFJ8WFYV3RuOlAb+foGLY8pI61bh1c/oXbm6rj0HqYcavw+bpt+Kl/meZ
cL4p2GKwDK/x7gy52cVpj+KnXXe3UjbbRSXcOiu7naqiRM9wJGW8sAkBQhtf+fxo
lTlQEL1pKPfgEVnNEJcg
=HK+g
-----END PGP SIGNATURE-----

--K8nIJk4ghYZn606h--
