From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17495 invoked by alias); 9 Aug 2010 09:36:01 -0000 Received: (qmail 17476 invoked by uid 22791); 9 Aug 2010 09:36:00 -0000 X-Spam-Check-By: sourceware.org Received: from aquarius.hirmke.de (HELO calimero.vinschen.de) (217.91.18.234) by sourceware.org (qpsmtpd/0.83/v0.83-20-g38e4449) with ESMTP; Mon, 09 Aug 2010 09:35:55 +0000 Received: by calimero.vinschen.de (Postfix, from userid 500) id AC9756D4364; Mon, 9 Aug 2010 11:35:52 +0200 (CEST) Date: Mon, 09 Aug 2010 09:36:00 -0000 From: Corinna Vinschen To: cygwin@cygwin.com Subject: Re: Ethernet interface names with cygwin 1.7.5 Message-ID: <20100809093552.GA17038@calimero.vinschen.de> Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com X-SW-Source: 2010-08/txt/msg00197.txt.bz2 On Aug 9 11:03, laurent.metais@cp.com wrote: > I am using a very simple to find all ethernet on my PC with cygwin : > [...] > With cygwin 1.7.5 the result is : > $ ./a.exe > Interfaces (count = 5): > {EE0A9E93-9A06-4CCB-B957-074C921D39FB} > {46D151B0-33BB-4706-A450-B29F50F8095A} > {B9BDEE37-C781-447B-B457-D4B17C576948} > {A46ED7E6-A8A7-431E-BDE0-68DBEA2D334D} > MS TCP Loopback interface > > with release 1.5.25, the result was using the well-known names (lo0, eth0, > eth1, etc...). > > How can retrieve the standard names with release 1.7.5 ? Is it a new > naming convention ? The problem with the well-known names is that they are not guaranteed to be unique, because the order of the interfaces returned by the Windows API can change arbitrarily. Therefore Cygwin 1.7 starts to return the really unique Win32 interface names, which are the above UUID-based names (plus the old "MS TCP Loopback" name). The uniqueness of the interface name is quite important in a couple of circumstances, so, starting wit Windows XP, there's no way anymore to retrieve the old well-known names since they are just not generated. What's left is a Cygwin-specific extension, the SIOCGIFFRNDLYNAM ioctl, which is documented in /usr/include/cygwin/if.h, see the comment preceeding the definition of IFRF_FRIENDLYNAMESIZ. This extension returns the so-called "FriendlyName", which is the interface name as shown in the Windows network properties. Btw., Cygwin 1.7 also has the getifaddrs/freeifaddrs API to retrieve the interface list (and the /proc/net/if_inet6 file). Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat -- 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