delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/04/21/18:26:02

X-Spam-Check-By: sourceware.org
To: cygwin AT cygwin DOT com
From: =?ISO-8859-1?Q?Ren=E9_Berber?= <r DOT berber AT computer DOT org>
Subject: Re: network interface names
Date: Fri, 21 Apr 2006 17:25:22 -0500
Lines: 42
Message-ID: <e2bm4j$pgr$1@sea.gmane.org>
References: <44491B3E DOT 5090506 AT nrl DOT navy DOT mil>
Mime-Version: 1.0
User-Agent: Thunderbird 1.5.0.2 (Windows/20060308)
In-Reply-To: <44491B3E.5090506@nrl.navy.mil>
OpenPGP: url=hkp://random.sks.keyserver.penguin.de
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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

Ian wrote:

> How does cygwin's eth(whatever) relate to the windows interface names?
>=20
> For example, on my laptop, eth0 is tied to my wireless network
> connection and eth1 is tied to my wired local area connection.
>=20
> I'm developing DHCP software for cygwin, and I need to be able to derive
> the cygwin network interface name (e.g. eth0, or eth1...) given either
> the connection's MAC address, its IP address, or its windows interface
> name (e.g. "Local Area Connection", or "Gigabit Integrated Controller",
> or "WLAN Mini-PCI Card #2", or something like).

I don't know the answer, but I would like to know how did you determine that
eth0 (is it /dev/eth0?) is the wireless, etc.

What I have used comes with WinPCAP, with WpdPack there are several example=
s, in
Examples-pcap/iflist the resulting program lists your network interfaces, a=
s this:

\Device\NPF_{9E387891-E631-4411-B604-0DE577B8EA67}
        Description: Intel(R) PRO/1000 MT Desktop Adapter (Microsoft's Pack=
et
Scheduler)
        Loopback: no
        Address Family: #2
        Address Family Name: AF_INET
        Address: 192.168.10.2
        Netmask: 255.255.255.0
        Broadcast Address: 255.255.255.255

As you can see, there is no MAC address, or info about the address being se=
t by
DHCP, but that probably could be obtained.  My question above is because I =
would
prefer to use /dev/eth1 that "\Device\NPF_...".
--=20
Ren=E9 Berber


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019