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:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=Mef5kuDGDDabpn9S S92gSTY5XvNfTjvvetul2RSO/zbZc/DFnHLlFjRbhe8mzUet65E/8AdJIK/ockDA RTMFGGRcFOPnYmkJFyVsoy0Lalr+fBwaSndb9921qX46E9gchqlqs2SlNQ5ln/cG 9wUnP5TqFyVykhR+p30U4r+gMfs= 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:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=QbvnxTXs7NbyE/dpZEetAt 4E560=; b=Sny2hH4BwKAP9lejfsN1KffFROkrZpEbOLk+DE6ViJDGyQFtdWLVka O7o8PO036oet+sHrxCihlgeNMEyM2E53J7NucOinYJZ9ml3GVim1UA/h98RqGmA6 9yT41qtd2bsNLwfxTEVDHTwO9UIzI3fQOEq37Zff625Bp87bvhxa0= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , 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=-1.3 required=5.0 tests=AWL,BAYES_40,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=Interface, utilizing, ifa_frndlyname, strruct X-HELO: mail-wm0-f50.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=IPDUGUU+9LOTo0LGjLS2K30A/m+5tfhJZtjpeo5FYLw=; b=URku0aE4m1JLPGcTKIkzqI0a+Rx0HY233wL5OSDsS1SSE4vXhpOE/7KbZ8r0t7clTG mEHZZD/LQxYLKf22AFtEkIEQ6J3+oKlbh25mUSRDuAeUZkVPrUVfiscivprnK1QJJJ8/ gkGdnnmeSEbut77xszpnYuRMwElSVVkHtrxGtO7YuRqRmH0kMMHSsFOm1gDT1OaAAZYv 5bjm9+p47CPgCHhn1P1HgkpP9rmrUjNv7Jm2FvAlxgDGFziUvJYymIojtxc0Mhvej6t6 /cGFUIy8iK4Nm+t5OufPYr4AY1W0JyRetpSOo1H856YjSPXJ08tioCK5stYnV02cD+9a 78CA== X-Gm-Message-State: AD7BkJL5fT0gO5sHNGjHEpl3sTNRMrhN8Wg6UuXDeF3rNWPxwqZgxpq3iaYlaXt66ys89Q== X-Received: by 10.28.91.142 with SMTP id p136mr4431553wmb.76.1457620213759; Thu, 10 Mar 2016 06:30:13 -0800 (PST) Subject: Re: Interface friendly names for AF_INET6 To: cygwin AT cygwin DOT com References: <56E15638 DOT 5080906 AT gmail DOT com> <20160310133223 DOT GB27354 AT calimero DOT vinschen DOT de> <20160310134903 DOT GC27354 AT calimero DOT vinschen DOT de> From: Marco Atzeri Message-ID: <56E184F2.1050703@gmail.com> Date: Thu, 10 Mar 2016 15:30:10 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <20160310134903.GC27354@calimero.vinschen.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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