[EMAIL PROTECTED] writes:

> Hello,
> 
> I'm running OpenBSD, and am interested in the work you guys
> have done with IrDA.

Well, the lab I work in, is filled with FreeBSD people so I hear this every
day. My answer is always "Great! .... but I'm not going to do it!". Until
now, the discussion has ended there ;-)
 
> I'm curious if anyone's ever worked on, or thought of moving the
> ir stack out of the kernel and into userland?  I'd like it for
> obvious reasons, but also, the system would be very portable to 
> other architectures.

Yes, it would be much more portable, but if you just look at serial port
operation (TTY), then you will limit the speed of the stack (from 4Mbps) to
115200 bps. 

My first goal with Linux-IrDA was to get IrLAN up and running. IrLAN is an
Ethernet emulation layer and to Linux it's just a "normal" Ethernet driver,
except that it talks to the IrDA stack instead of some hardware. If you
implement this is user-space then you would need to copy each frame to
user-space, just to write it down to some device which can forward it up
the stack again. At 115200 bps this is OK, for 4Mbps I'm not so sure. At 16
Mbps I don't think it's a good idea.

The same goes for IrDA sockets which you can use by using the "normal"
socket API since the stack (IrTTP and down is in the kernel). If you put it
in user-space, we would have to have a separate library for this. Now we
can make IrDA aware applications in Python or Java which looks (almost) the
same for both Win32 and Linux.

Some parts of the Linux-IrDA stack like IrOBEX is already implemented in
userland (uses IrDA sockets)

> I would be interested in hacking on it myself.  I'm looking at your
> patches to the linux kernel and pondering using it to build this
> in userland.  This will be incredibly difficult to track new changes,
> so I'm hoping, but betting against the existance of any userland
> stack.

It should be no problem porting the stack to userland. You just need to
make some wrappers for the sk_buff (network buffer) handling and timer
support. You have timers in userland, and you can find a wrapper for
sk_buff's in the irda-utils package (called netbuf.c, you can just name it
back to skbuff.c ;-).

I know a person who is using the Linux-IrDA stack without the rest of the
Linux kernel. If he can do it, then your chances are good!

To track changes, you just diff a new version of Linux against the older
version of Linux (in the IrDA dirs) and then you have the patch which you
need to merge into your system.

Soon you're be the one sending me patches, or I will have to diff out your
changes ;-)

Cheers

-- Dag

-- 
   / Dag Brattli                   | The Linux-IrDA Project               /
  // University of Tromsoe, Norway | Infrared communication for Linux    //
 /// http://www.cs.uit.no/~dagb    | http://www.cs.uit.no/linux-irda/   ///

_______________________________________________
Linux-IrDA mailing list  -  [EMAIL PROTECTED]
http://www4.pasta.cs.UiT.No/mailman/listinfo/linux-irda

Reply via email to