Hello !
I want to do communication between tool-like tcp/ip application and a kernel
module. my
idea is to use a named pipe (created by mkpipe /tmp/XXin) i.e. a FIFO.
the communication using /dev/XXmy-module is already used to communicate via a
real device.
is there a better way by creating a Pipe in /proc fs ? or cummincating via
ioctl. i have to transfer streaming data....
this is the read_byte()-function of my module i have written: direction
Pipe --> /dev/XXmy-module
fSource = filp_open( sSource, O_RDONLY | O_NONBLOCK, 0);
if ( IS_ERR( fSource) )
{
printk("Comserver: error %ld opening Pipe %s\n", -PTR_ERR(fSource),
sSource);
elseQuote:}
{
if ( fSource->f_op && fSource->f_op->read)
{
ret = fSource->f_op->read( fSource, buffer , PAGE_SIZE, &fSource->f_pos );
if ( ret < 0)
i'm getting always error 11 (EAGAIN) at the read statement. Why ? how should i
open and use a
Pipe ?
on the other side the write_byte() routine is working well. so i can do a cat
"hello" >/dev/XXmy-modul and it's going throught the module via the PIPE to the
TTCP/IP-appl.
thanks peter