| delorie.com/archives/browse.cgi | search |
| X-Recipient: | archive-cygwin AT delorie DOT com |
| X-SWARE-Spam-Status: | No, hits=-1.3 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,SPF_HELO_PASS,T_RP_MATCHES_RCVD,T_TO_NO_BRKTS_FREEMAIL |
| X-Spam-Check-By: | sourceware.org |
| To: | cygwin AT cygwin DOT com |
| From: | Jason Curl <jcurlnews AT arcor DOT de> |
| Subject: | Difference in behaviour between getifaddrs() and ioctl(SIOCGIFCONF) |
| Date: | Wed, 01 Dec 2010 22:30:46 +0100 |
| Lines: | 54 |
| Message-ID: | <id6eq6$un5$1@dough.gmane.org> |
| Mime-Version: | 1.0 |
| User-Agent: | Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.12) Gecko/20101027 Thunderbird/3.1.6 |
| X-IsSubscribed: | yes |
| 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 |
Hello,
I've seen an issue when using getifaddrs() using Cygwin 1.7.x (snapshot
build from 2010-11-24, shortly after the ARP fixes from Corinna).
Operating System is Windows 7 x64_86 Ultimate.
When I use getifaddrs() I get a list of interface names, some are
appended with ":1".
Getting the list with ioctl(SIOCGIFCONF) provides a different list of
names, where interface names only differ sometimes by ":1".
The list from ioctl() is correct, that from getifaddrs() is incorrect,
in that the name cannot be used to resolve the HWADDR, SIOCGIFFRNDLYNAM
with ioctl().
Using getifaddrs():
device: {4ED54D4E-1024-4BDF-A926-67D2895D2DC4};
ioctl(SIOCGIFFRNDLYNAM)=0 Local Area Connection 4
device: {A045DC0F-A979-49B3-954C-D0678365FF26}:1; ioctl(SIOCGIFFRNDLYNAM)=-1
device: {4EB69B61-C791-434A-8FCE-8F4859EA8DFC};
ioctl(SIOCGIFFRNDLYNAM)=0 Local Area Connection 3
device: {85C2CEC7-A2B9-47D4-9A50-D63E9F9ED007};
ioctl(SIOCGIFFRNDLYNAM)=0 Bluetooth Network Connection
device: {56D2E68A-4173-4117-A719-65123B973C65}:1; ioctl(SIOCGIFFRNDLYNAM)=-1
device: {7E5203E8-97DE-4822-9A2E-380BD258D97E}:1; ioctl(SIOCGIFFRNDLYNAM)=-1
device: {8424F604-4FAE-4541-9D8E-7B0A583A0956}:1; ioctl(SIOCGIFFRNDLYNAM)=-1
device: {846EE342-7039-11DE-9D20-806E6F6E6963}:1; ioctl(SIOCGIFFRNDLYNAM)=-1
Using ioctl(SIOCGIFCONF):
device: {4ED54D4E-1024-4BDF-A926-67D2895D2DC4};
ioctl(SIOCGIFFRNDLYNAM)=0 Local Area Connection 4
device: {A045DC0F-A979-49B3-954C-D0678365FF26};
ioctl(SIOCGIFFRNDLYNAM)=0 Bluetooth Network Connection 2
device: {4EB69B61-C791-434A-8FCE-8F4859EA8DFC};
ioctl(SIOCGIFFRNDLYNAM)=0 Local Area Connection 3
device: {85C2CEC7-A2B9-47D4-9A50-D63E9F9ED007};
ioctl(SIOCGIFFRNDLYNAM)=0 Bluetooth Network Connection
device: {56D2E68A-4173-4117-A719-65123B973C65};
ioctl(SIOCGIFFRNDLYNAM)=0 Local Area Connection
device: {7E5203E8-97DE-4822-9A2E-380BD258D97E};
ioctl(SIOCGIFFRNDLYNAM)=0 VMware Network Adapter VMnet1
device: {8424F604-4FAE-4541-9D8E-7B0A583A0956};
ioctl(SIOCGIFFRNDLYNAM)=0 VMware Network Adapter VMnet8
device: {846EE342-7039-11DE-9D20-806E6F6E6963};
ioctl(SIOCGIFFRNDLYNAM)=0 Loopback Pseudo-Interface 1
My control panel shows only interfaces
* Bluetooth Network Connection 2
* Local Area Connection
* VMware Network Adapter VMnet1
* VMware Network Adapter VMnet8
--
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
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |