From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19776 invoked by alias); 9 Aug 2010 09:03:15 -0000 Received: (qmail 19548 invoked by uid 22791); 9 Aug 2010 09:03:14 -0000 X-SWARE-Spam-Status: No, hits=-0.7 required=5.0 tests=AWL,BAYES_00,RCVD_NUMERIC_HELO X-Spam-Check-By: sourceware.org Received: from gse-mta-15-tx.emailfiltering.com (HELO gse-mta-15.emailfiltering.com) (194.116.198.148) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 09 Aug 2010 09:03:09 +0000 Received: from 193.109.72.247 ([193.109.72.247]) by gse-mta-15.emailfiltering.com with emfmta (version 4.5.0.261) by TLS id 1595066720 for cygwin@cygwin.com;489c809c1ab3940c; Mon, 09 Aug 2010 10:03:06 +0100 To: cygwin@cygwin.com Subject: Ethernet interface names with cygwin 1.7.5 MIME-Version: 1.0 X-KeepSent: 47560A7F:E0551056-C125777A:0031B63E; type=4; name=$KeepSent Message-ID: From: laurent.metais@cp.com Date: Mon, 09 Aug 2010 09:03:00 -0000 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable 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/msg00195.txt.bz2 Hello ! I am using a very simple to find all ethernet on my PC with cygwin : #include #include #include #include #include #include #include #include int get_iface_list(struct ifconf *ifconf) { int sock, rval; sock =3D socket(AF_INET,SOCK_STREAM,0); if(sock < 0) { perror("socket"); return (-1); } if((rval =3D ioctl(sock, SIOCGIFCONF , (char*) ifconf )) < 0 ) perror("ioctl(SIOGIFCONF)"); close(sock); return rval; } int main() { static struct ifreq ifreqs[20]; struct ifconf ifconf; int nifaces, i; memset(&ifconf,0,sizeof(ifconf)); ifconf.ifc_buf =3D (char*) (ifreqs); ifconf.ifc_len =3D sizeof(ifreqs); if(get_iface_list(&ifconf) < 0) exit(-1); nifaces =3D ifconf.ifc_len/sizeof(struct ifreq); printf("Interfaces (count =3D %d):\n", nifaces); for(i =3D 0; i < nifaces; i++) { printf("\t%-10s\n", ifreqs[i].ifr_name); } } With cygwin 1.7.5 the result is : $ ./a.exe Interfaces (count =3D 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,= =20 eth1, etc...). How can retrieve the standard names with release 1.7.5 ? Is it a new=20 naming convention ? Thanks for your help. Best Regards, Laurent M=E9tais Software Designer=20 CP Technocenter=20 -- 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