wanting to use named pipe for telnet link to modem
Mike Gourlay
mike at penguin.gatech.edu
Sat Dec 8 07:46:52 AEST 1990
Hello,
I've never used a named pipe, and I lack sufficient
documentation. Here's my project:
There is are modems which can be connected to
through telnet ports. I am using expect to interface with telnet
in a popen like fashion from a C program. My intention is to
have a program make a connection to the modem, and have
a stream going to a file go to the modem, and the stream comming
from the modem go out of the file. In other words, ideally, I would
like someone to be able to
fd=open("/dev/remote_modem", O_RDWR|O_NDELAY);
if(read(fd, buff, size)!=0) {printf("%s", buff); fflush(stdout);}
/* here's a trick part */
/* do a non-blocking read of stdin, and if data came in, put it through to*/
/* /dev/remote_modem */
write(fd, otherbuff, size);
If you understand that, let's talk.
I already have the telnet connection made. I'd like
to now know how to make unblocking reads from stdin, and also
how to use FIFOs (named pipes.)
Thanks for your help.
Mike Gourlay
mike at penguin.gedu
More information about the Comp.unix.questions
mailing list