Date: Thu, 13 Dec 2007 12:26:16 -0800 From: Bakul Shah <bakul@bitblocks.com> To: "Bruce M. Simpson" <bms@FreeBSD.org> Cc: FreeBSD Net <freebsd-net@freebsd.org>, Julian Elischer <julian@elischer.org> Subject: Re: bikeshed for all! Message-ID: <20071213202616.1C7A25B2E@mail.bitblocks.com> In-Reply-To: Your message of "Thu, 13 Dec 2007 10:31:11 GMT." <476109EF.10808@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Here is another idea spurred by this: > I understand that this feature is something which swaps in a different > forwarding table for the application one is currently running? > > And that it works in a manner similar to chroot()? Swapping in a different forwarding table is very much like swapping in a different root as in chroot. In that case how about a more general command "with-resource" or just "with"? with (-<resource name> <resource-id>)* command [args] or with (<resource-name>=<resource-id>)* command [args] The latter syntax will allow a dynamic resource list (like what you can do with sysctl). So "chroot foo cmd" becomes "with root=foo cmd" and Julian's baby can be "with net.FIB=bar cmd". And if you want, even "with root=foo net.FIB=bar cmd" will work! And if ever forwarding tables are associated with specific interfaces you can do something like "with net.int.fe0.FIB=foo cmd" too! I suggest this in the hope that more kernel things can be resourcified and that we have a uniform way of dealing with them all. Now if resources were represented in the file system namespace and mounts were local to a process, you could achieve the above simply by doing a few mounts (or binds as in plan9) such as bind /resource/FIB/foo /net/FIB/default exec cmd and now all packets going out from cmd will use /resource/FIB/foo to find their next hop. -- bakul FIB == forwarding information base, a pompous name for a forwarding table. Also because sometimes it fibs, if not up to date.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20071213202616.1C7A25B2E>