From owner-freebsd-net@FreeBSD.ORG Mon May 5 23:59:02 2008 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3CD291065677 for ; Mon, 5 May 2008 23:59:02 +0000 (UTC) (envelope-from edwin@mavetju.org) Received: from mail5out.barnet.com.au (mail5.barnet.com.au [202.83.178.78]) by mx1.freebsd.org (Postfix) with ESMTP id 013748FC1E for ; Mon, 5 May 2008 23:59:01 +0000 (UTC) (envelope-from edwin@mavetju.org) Received: by mail5out.barnet.com.au (Postfix, from userid 1001) id B18A12218A9B; Tue, 6 May 2008 09:58:59 +1000 (EST) X-Viruscan-Id: <481F9F430000BE5B8A7751@BarNet> Received: from mail5auth.barnet.com.au (mail5.barnet.com.au [202.83.178.78]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mail5auth.barnet.com.au", Issuer "*.barnet.com.au" (verified OK)) by mail5.barnet.com.au (Postfix) with ESMTP id 8455221B2893; Tue, 6 May 2008 09:58:59 +1000 (EST) Received: from k7.mavetju (k7.mavetju.org [10.251.1.18]) by mail5auth.barnet.com.au (Postfix) with ESMTP id 333322218A84; Tue, 6 May 2008 09:58:59 +1000 (EST) Received: by k7.mavetju (Postfix, from userid 1001) id E7177387; Tue, 6 May 2008 09:58:58 +1000 (EST) Date: Tue, 6 May 2008 09:58:58 +1000 From: Edwin Groothuis To: Julian Elischer Message-ID: <20080505235858.GB46427@k7.mavetju> References: <20080503100043.GA68835@k7.mavetju> <481F6AE1.5020408@elischer.org> <20080505231009.GX44028@k7.mavetju> <481F95DE.6090201@elischer.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <481F95DE.6090201@elischer.org> User-Agent: Mutt/1.4.2.3i Cc: freebsd-net@freebsd.org Subject: Re: IPPROTO_DIVERT and PF_INET6 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 May 2008 23:59:02 -0000 On Mon, May 05, 2008 at 04:18:54PM -0700, Julian Elischer wrote: > Edwin Groothuis wrote: > >On Mon, May 05, 2008 at 01:15:29PM -0700, Julian Elischer wrote: > >>>This should provide a direct answer to you question of "why"? But I > >>>suspect the underlying question is why divert sockets aren't supported > >>>for IPv6. I don't know why. > >>because no=one has done it and because divert sockaddrs are ipv4 sockaddrs > >> > >>you would have to make a new divert6 protocol. > >>That's not impossible, but no-one has done it. > > > >I've been looking at it, with hints from rwatson@ and bms@, but the > >problem right now lays in the way you can do dynamic protocol > >registrations with IPv4 but not yet with IPv6. Every time when I > >get one step further I end up with a new problem :-( > > > >Let's call it a learning excercise! My adventures are written down at http://www.mavetju.org/weblog/html/00231.html > you could implement a whole new protocol family of which there > was a single protocol.. divert. > so you would open a socket of type. > > sock = socket(PF_DIVERT, SOCK_RAW, DIVPROTO_6); > instead of > > sin = socket(PF_INET6, SOCK_RAW, IPPROTO_DIVERT); Euhm... that would make my goal more noble but certainly near impossible for me. Edwin -- Edwin Groothuis | Personal website: http://www.mavetju.org edwin@mavetju.org | Weblog: http://www.mavetju.org/weblog/