2009/4/15 Nathaniel W Filardo <n...@cs.jhu.edu>:
> On Wed, Apr 15, 2009 at 02:03:35PM +0200, Patrick Kristiansen wrote:
>> I'm thinking of writing a NAT implementation for plan 9.
>
> I would suggest instead that it might be easier to write an adaptor program
> for non-Plan 9 hosts which made their network stacks talk to a /net.  That
> is, you'd want a program which spoke TAP/TUN out one end to the host kernel
> and out the other dialed and imported /net from the Plan 9 gateway.  AFAIK
> TAP/TUN-like things exist on most OSes, and there's good example code in
> OpenVPN (for example).

It's not simpler, requiring N implementations for heterogeneity, where
N is the number of non-Plan 9 hosts you support. Certainly Windows,
Linux, OS X, and FreeBSD would all need separate implementations. OS X
doesn't have a tap(4) device per default, and Windows needs a driver
as well. Of course some code can be shared, but I believe this will
simply lead to bloat.

If we want Plan 9 to work with other operating systems, let's make it
work with other operating systems... I don't think forcing everyone
else to conform to us is the right answer, in this case. NAT is
well-defined, well-understood, and honestly not that difficult to
implement.

> The program would have to know enough about the on-the-wire representation
> of TCP/IP and UDP/IP to do connection tracking etc. (much like NAT, I
> suppose) but the advantage is that it wouldn't impact the Plan 9 kernel.

NAT can be implemented in userland in Plan 9 as is.

> --nwf;
>
> P.S. This idea shamelessly stolen from vsrinivas, but he's mailing-list shy.

Not trying to come off as catty, I just don't think this is a
practical idea. Might be a fun project, nonetheless.

--dho

Reply via email to