From owner-freebsd-net@FreeBSD.ORG Wed Dec 12 23:46:38 2007 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 34D4516A41A for ; Wed, 12 Dec 2007 23:46:38 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outX.internet-mail-service.net (outX.internet-mail-service.net [216.240.47.247]) by mx1.freebsd.org (Postfix) with ESMTP id 2719013C4DB for ; Wed, 12 Dec 2007 23:46:37 +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; Wed, 12 Dec 2007 15:46:37 -0800 Received: from julian-mac.elischer.org (localhost [127.0.0.1]) by idiom.com (Postfix) with ESMTP id 92E84126CA1; Wed, 12 Dec 2007 15:46:36 -0800 (PST) Message-ID: <476072DB.3090600@elischer.org> Date: Wed, 12 Dec 2007 15:46:35 -0800 From: Julian Elischer User-Agent: Thunderbird 2.0.0.9 (Macintosh/20071031) MIME-Version: 1.0 To: Max Laier References: <476061FD.8050500@elischer.org> <200712130007.20720.max@love2party.net> <47606BD0.7050005@elischer.org> <200712130021.56473.max@love2party.net> In-Reply-To: <200712130021.56473.max@love2party.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-net@freebsd.org Subject: Re: bikeshed for all! 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: Wed, 12 Dec 2007 23:46:38 -0000 Max Laier wrote: > On Thursday 13 December 2007, Julian Elischer wrote: >> Max Laier wrote: >>> On Wednesday 12 December 2007, Julian Elischer wrote: >>>> So, I'm playing with some multiple routing table support.. >>>> the first version is a minimal impact version with very limited >>>> functionality. It's done that way so I can put it in RELENG_6/7 >>>> without breaking ABIs (I hope). Later there will be a more flexible >>>> version for-current. >>>> >>>> Here's the question.. >>>> >>>> I need a word to use to describe the network view one is currently >>>> on.. e.g. if you are usinghe second routing table, you could say >>>> I've set xxx to 1 (0 based).. >>>> >>>> >>>> current;y in my code I'm using 'universe' but I don't like that.. >>>> >>>> one could think of it as a routing plane.. >>>> each routing plane has he same interfaces on it but they are >>>> logically treated differently becasue each plane has a different >>>> routing table. >>>> >>>> >>>> so here's an axample of it in use now... >>>> the names should change... >>>> >>>> setuniverse 1 netstat -rn >>>> [shows table 1] >>>> setuniverse 2 route add 10.0.0.0/24 192.168.2.1 >>>> setuinverse 1 route add 10.0.0.0/24 192.168.3.1 >>>> setuniverse 2 route -n get 10.0.0.3 >>>> [shows 192.168.2.1] >>>> setuniverse 1 route -n get 10.0.0.3 >>>> [shows 192.168.3.1] >>>> setuniverse 2 start_apache >>>> [appache starts, always using 192.168.2.1 to reach the 10.0.0 net. >>>> >>>> >>>> also the syscall is setuniverse() >>>> >>>> so, you see I really need a better name.... >>>> setrtab? >>>> >>>> rtab? rtbl? >>>> >>>> and the command should be called "????" >>> FWIW, OpenBSD just added a "-T num" switch to concerned programs like >>> route and netstat. As far as I can tell they rely entirely on pf to >>> select a table - so there is no way to start a program "inside" a >>> certain network view. OTOH, how - in your system - would you decide >>> which table to use for forwarded packets? >> ipfw/pf/ipf rule (not yet added) :-) > > pf has ifdef'ed out code to deal with the OpenBSD version of routing > tables. What it does is adding an mbuf_tag which carries the tableid and > ip_{{in,out}put,forward} take action accordingly. EXACTLY what I plan on doing. > >>> More to the bikeshed pov, "universe" seems rather broad. "netview" >>> comes to mind. "rtabselect", though that has a lot of characters, >>> but then again "setuniverse" is even one char longer ;) >