From owner-freebsd-net@FreeBSD.ORG Mon May 5 23:18:55 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 48E2B106567D for ; Mon, 5 May 2008 23:18:55 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outY.internet-mail-service.net (outy.internet-mail-service.net [216.240.47.248]) by mx1.freebsd.org (Postfix) with ESMTP id 388AE8FC24 for ; Mon, 5 May 2008 23:18:55 +0000 (UTC) (envelope-from julian@elischer.org) Received: from mx0.idiom.com (HELO idiom.com) (216.240.32.160) by out.internet-mail-service.net (qpsmtpd/0.40) with ESMTP; Tue, 06 May 2008 00:21:33 -0700 Received: from julian-mac.elischer.org (localhost [127.0.0.1]) by idiom.com (Postfix) with ESMTP id 0FEA82D601A; Mon, 5 May 2008 16:18:53 -0700 (PDT) Message-ID: <481F95DE.6090201@elischer.org> Date: Mon, 05 May 2008 16:18:54 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.12 (Macintosh/20080213) MIME-Version: 1.0 To: Edwin Groothuis References: <20080503100043.GA68835@k7.mavetju> <481F6AE1.5020408@elischer.org> <20080505231009.GX44028@k7.mavetju> In-Reply-To: <20080505231009.GX44028@k7.mavetju> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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:18:55 -0000 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! > > Edwin 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);