bikeshed for all!
bakul at bitblocks.com
Thu Dec 13 12:26:17 PST 2007
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]
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
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
and now all packets going out from cmd will use
/resource/FIB/foo to find their next hop.
FIB == forwarding information base, a pompous name for a
forwarding table. Also because sometimes it fibs, if not up
More information about the freebsd-net