public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Marco Atzeri <marco.atzeri@gmail.com>
To: cygwin@cygwin.com
Subject: Re: Interface friendly names for AF_INET6
Date: Thu, 10 Mar 2016 14:30:00 -0000	[thread overview]
Message-ID: <56E184F2.1050703@gmail.com> (raw)
In-Reply-To: <20160310134903.GC27354@calimero.vinschen.de>



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

  reply	other threads:[~2016-03-10 14:30 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-10 11:10 Marco Atzeri
2016-03-10 13:32 ` Corinna Vinschen
2016-03-10 13:49   ` Corinna Vinschen
2016-03-10 14:30     ` Marco Atzeri [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56E184F2.1050703@gmail.com \
    --to=marco.atzeri@gmail.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).