bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: first shot at tunnel interface for pfinet


From: Daniel E. Baumann
Subject: Re: first shot at tunnel interface for pfinet
Date: Wed, 4 Oct 2000 00:10:57 -0500

On Tue, 03 Oct 2000, Marcus Brinkmann wrote:
> 
> Hi,
> 
> in light of the recent discussions, and considering that no code resulted
> from them, I had a go at the Hurd related changes for a tunnel interface in
> pfinet.
> 
> NOTE: This is an early-development-stage-patch-for-interested-hacker, NOT
> a user-consumable-ready-to-go-patch-to-get-ppp-working.
> 
> The tunnel interface is almost done[1]. What is missing? Well, there are some
> interface options for the linux kernel code we glue to, that need to be
> adjusted to get the correct input/output for a BSD tunnel interface. At
> least I think that is necessary. Currently, the interface emits ethernet
> frames, if I am not completely mistaken, and who knows what happens with the
> data you send to it. Apropos sending: Writing seems to be quite unstable,
> there are a couple of callbacks missing, and if you try to write with tools
> like "cat > /dev/tun0" you will get EIOIO and Resource lost and other
> inconvient stuff. However, normal write() seems to work fine. Mmmh.
> 
> What do you get with this patch? Well, a new interface type,
> --interface=tunX, where X is something. This creates a new translated node,
> /dev/tunX, which you can read and write to. There is a new option to set the
> peer address (-p, --peer). This is used like this:
> 
> settrans -fg /servers/socket/2 -i tun0 -a 192.168.0.1 -p 192.168.1.1
> 
> The netmask must not be set (it will be set to 255.255.255.255
> automatically). I did not try setting the gateway, but it should work.
> 
> If you have screen, try "cat /dev/tun0" on one screen, and "ping 192.168.1.1"
> on the other. You will see how the packages appear on the first screen when
> pfinet sends them. Testing if write works correctly is harder, as you need
> to produce valid network packages in user space. I expect that some further
> debugging is necessary to make it work with ppp.
> 
> What else? select() works! As well as reading in O_NONBLOCK mode. This is
> required for ppp as well.
> 
> What's to be done?
> * Implement all other required callbacks for trivfs.
> * If this doesn't fix write(), check it out.
> * Correct protocol details, see tunnel.c::tunnel_xmit (for packages
>   from the IP layer to the tunnel device), tunnel.c::trivfs_S_io_write
>   (for packages from the tunnel device in the IP layer) and probably
>   tunnel.c::setup_tunnel_device for initial setup of the interface.
> 
> Especially with the latter I could use help. This is NOT Hurd specific, but
> rather requires some knowledge about the Linux networking code in general
> and the BSD tunnel device in particular. Both areas are quite new to me, and
> I really would appreciate help here.
> 
> * Porting user space ppp.
>   This should be a piece of cake, but requires some careful code reading and
>   debugging. There are generic porting issues, as well as the need to turn
>   ioctls into fsysopts calls.
> 
> So. 'nuff said. The patch is attached.
> 
> Further discussion will happen on bug-hurd@gnu.org ONLY, so please subscribe
> if you haven't already.
> 
> Thanks,
> Marcus
> 
> [1] But remember that the remaining 10% take 90% of the time.
> 
> -- 
> `Rhubarb is no Egyptian god.' Debian http://www.debian.org Check Key server 
> Marcus Brinkmann              GNU    http://www.gnu.org    for public PGP Key 
> Marcus.Brinkmann@ruhr-uni-bochum.de,     marcus@gnu.org    PGP Key ID 36E7CD09
> http://homepage.ruhr-uni-bochum.de/Marcus.Brinkmann/       brinkmd@debian.org
> 
> 

----------------------------------------
Content-Type: application/octet-stream; name="unnamed"
Content-Transfer-Encoding: base64
Content-Description: 
----------------------------------------

Is this the correct way in which PPP will be implemented in the HURD then
(that is to say for good)? Or would the libchannel stuff that Roland and
others discussed previously be the ideal solution? Should I go with this and
add the rest of the functionality?

Dan
----------------------------------------------------------------------------
Daniel E. Baumann
E-mail: baumannd@msoe.edu (preferred)
        baumannd@users.sourceforge.net
        baumannd@penguinpowered.com
        baumannd@obfuscation.penguinpowered.com (caution: dynamic DNS)

Web location:   http://www.msoe.edu/~baumannd
                http://www.linuxfreak.com/~baumannd

"Life would be so much easier if we could just look at the source code." 

      -- Dave Olson
---------------------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]