delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-Spam-Check-By: | sourceware.org |
Date: | Mon, 9 Jun 2008 19:33:03 +0200 |
From: | Corinna Vinschen <corinna-cygwin AT cygwin DOT com> |
To: | cygwin AT cygwin DOT com |
Subject: | Re: XP + cygwin version 1.7: problem with /proc/net/if_inet6 format and if_indextoname |
Message-ID: | <20080609173303.GA22164@calimero.vinschen.de> |
Reply-To: | cygwin AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
References: | <484C3B1B DOT 8000907 AT fliegl DOT de> |
MIME-Version: | 1.0 |
In-Reply-To: | <484C3B1B.8000907@fliegl.de> |
User-Agent: | Mutt/1.5.16 (2007-06-09) |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
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 |
On Jun 8 22:03, Deti Fliegl wrote: > Hi, > > according to http://tldp.org/HOWTO/Linux+IPv6-HOWTO/proc-net.html the > format of /proc/net/if_inet6 contains scope and interface flags in position > 4 and 5. > > In Windows XP it looks like this (excerpt): > fe80000000000000020b5dfffea4902b 08 40 08 01 > {8C302852-0093-4ED1-8BBD-BAEA630C3A2A} > fe8000000000000002ffa4fffe224702 06 40 06 01 > {A4224702-1783-4CE5-B0BE-E02885C29AA1} > fe80000000000000020000fffe000001 05 40 05 04 > {2C2F83B8-BEF7-4B7B-AED6-E87A8B4252D2} > fe80000000000000020b5dfffe96a55c 04 40 04 01 > {AB80DBF9-46A7-463C-933C-5CD48E9B583E} > fe8000000000000000005efec0a80266 02 40 02 04 > {48FCE3FC-EC30-E50E-F1A7-71172AEEE3AE} > 00000000000000000000000000000001 01 80 00 04 > {6BD113CC-5EC2-7638-B953-0B889DA72014} > > In Windows Vista it looks like this (full): > 20014c50fffe000589223b7d1c32bf30 08 40 00 04 > {92F7E3A1-A7C4-4D89-A80F-C62EF31CE0DE} > 20014c50fffe00058c77167371f63d08 08 80 00 04 > {92F7E3A1-A7C4-4D89-A80F-C62EF31CE0DE} > fe8000000000000089223b7d1c32bf30 08 40 08 04 > {92F7E3A1-A7C4-4D89-A80F-C62EF31CE0DE} > 00000000000000000000000000000001 01 80 00 04 > {3D4E88D4-6A70-11DB-B1BA-806E6F6E6963} > fe8000000000000000000100007ffffe 0A 40 0A 03 > {B3B050EF-8A68-4ECC-8FEB-7E6C0EDB93F2} > > As you can see in XP the interface index (netlink device number) in > position 2 is equal to the scope value in position 4. > Vista shows different values for index and scope - this seems to be > correct. The scope values are not always equal to the index, as you can see in your above output as well for the loopback. It's also 0 for the addresses with global scope. The values are taken from the sin6_scope_id field returned by the Win32 function GetAdaptersAddresses. Compare with the scope values printed by `ipconfig /all'. Apparently the v6 stack in XP uses (not quite) arbitrary numbers for local interfaces. I don't know the rules behind the choice, but apparently it has been fixed in Vista. > My question: Did I hit a bug? Is there any documentation what's the meaning > of the values for scope and interface flags (they don't seem to follow the > referenced definitions of the Linux kernel). The flags field is the DAD state right now. I'm looking through what I did when I implemented that but I can't figure out anymore why I put the DAD state into this field. It looks like it should actually contain the interface flags (IFF_* values). Can somebody confirm or deny that? If that's correct, it's probably not a big deal to change that. > Further it seems that if_indextoname(...) does not work for XP while it > works for Vista. Don't know if this problem is related. Did I miss > something? I would appreciate any hint. *How* does it not work. A *very* simply testcase in plain C might be helpful... Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat -- 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/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |