delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2016/03/10/08:50:18

X-Recipient: archive-cygwin AT delorie DOT 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 AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT 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 AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Interface friendly names for AF_INET6
Message-ID: <20160310134903.GC27354@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <56E15638 DOT 5080906 AT gmail DOT com> <20160310133223 DOT GB27354 AT calimero DOT vinschen DOT de>
MIME-Version: 1.0
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--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019