[From nobody Sat Mar 24 09:36:40 2007 Return-Path: <itojun@itojun.org> X-Original-To: erno@erno.iki.fi Delivered-To: erno@erno.iki.fi Received: from ainavaan.iki.fi (ainavaan.iki.fi [212.16.98.51]) by erno.iki.fi (Postfix) with ESMTP id BEBD91889AF for <erno@erno.iki.fi>; Fri, 23 Mar 2007 11:36:35 +0200 (EET) Received: from coconut.itojun.org (coconut.itojun.org [221.249.121.227]) by ainavaan.iki.fi (8.13.8/8.13.8) with ESMTP id l2N9abMS022078 for <erno@iki.fi>; Fri, 23 Mar 2007 11:36:38 +0200 (EET) Received: by coconut.itojun.org (Postfix, from userid 501) id BC6A61C04E; Fri, 23 Mar 2007 18:36:28 +0900 (JST) To: erno@iki.fi Cc: itojun@itojun.org Subject: Re: (fwd) Re: [Python-3000] IPv6 address tuple In-Reply-To: Your message of "Fri, 23 Mar 2007 08:56:36 +0200" <20070323065636.GN14803@erno.iki.fi> References: <20070323065636.GN14803@erno.iki.fi> X-Mailer: Cue version 0.8 (061214-1013/itojun) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Message-Id: <20070323093628.BC6A61C04E@coconut.itojun.org> Date: Fri, 23 Mar 2007 18:36:28 +0900 (JST) From: itojun@itojun.org (Jun-ichiro itojun Hagino) X-Spambayes-Classification: ham; 0.11 > Hello, > > Enclosed is a message exchange I had on the python-3000 list (in > which I mistyped Python 2.0 instead of Python 3.0). > > I'd like to see the IPv6 address tuple in Python 3000 aka Python 3.0 > changed to be (adddress, port) so that socket code written for > IPv4 would work with it. The 4-tuple with additional flowinfo and scopeid > elements in my opinion isn't worth it compared to the hardship caused. > Another approach could be to allow both 2-tuple and 4-tuple, and > always generate a 2-tuple for global addresses without flowinfo... > What is your take on this proposal? i understand your concern. current 4-tuple is direct mapping from struct sockaddr_in6 (which has those two additional members). scopeid element is very important and we cannot just drop it. IPv6 includes "scoped" addresses, i.e. you may see the same address (fe80::1) on two of your ethernets, and they are different entity, therefore you need to disambiguate with scopeid (usually interface name). luckily there is a way to handle address+scopeid as single string - see RFC4007 section 11. this way, we can remove scopeid field. noone uses flowinfo at this point of time (it is for QoS - diffserv, intserv, and that kind of stuff) but i'm not sure about future use. please discuss it with python guys (cc: to me if needed). as for actual code change, i'm willing to help but i got my right hand injured so i can't work on anything seriously for a couple of weeks. please keep me posted. itojun ]