Software devices.[Application level]

Peter Enderborg (pme@ufh.se)
Sun, 14 Mar 1999 21:55:05 +0100


This is a multi-part message in MIME format.
--------------994ECD9E9C314B4D0C9EBE63
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hi! I'm trying to write some code that is tryging to act as a hardware
device. There
are some devices that is a full duplex thrugh a file. Like any terminal
or midi or what
ever you like. What I want is to write a user level program that acts as
a hardware
device. But I can't figure out howto. I have tryed to use mkfifo. That
is not
working, if I open the fifo in a readwrite mode everything I send to it
comes back
and is removed from the fifo. Next try was to use PF_UNIX sockets. And
that
will not work ether. For example cat will not operate on the type of
file. Not
very strange, it is socket semantics. What else could I try ?! I have
though about
useing pty's. But that will not work ether. I can not create them in a
user space
there for I can't get a safe reference. I got new one everytime. My idea
is that
it might be a nice idea that all types of hardware devices should be
able to
be emulated. Some generic software device that could catch ioctl's and
all kind of file operations. Is there anything like that ? This could be
some useful
tool for many things. One thing that i realy missing in linux is a way
to monitor disk
activities. This could solve that problem, mount a software device that
mirroring
everything to a hardware device, and then you can do all the monitoring
things
very easy in user space. Any comments ?! Need it badly on the first
part...

--
foo!

--------------994ECD9E9C314B4D0C9EBE63 Content-Type: text/x-vcard; charset=us-ascii; name="pme.vcf" Content-Transfer-Encoding: 7bit Content-Description: Card for Peter Enderborg Content-Disposition: attachment; filename="pme.vcf"

begin:vcard n:Enderborg;Peter x-mozilla-html:FALSE org:; adr:;;;;;; version:2.1 email;internet:pme@ufh.se x-mozilla-cpt:;0 fn:Peter Enderborg end:vcard

--------------994ECD9E9C314B4D0C9EBE63--

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/