Date: Thu, 23 Jul 1998 18:40:39 EST From: "M.C Wong" <mcwong@hotmail.com> To: questions@FreeBSD.ORG Cc: mcwong@hotmail.com Subject: modem ioctl operation over pty or socket ? Message-ID: <19980723084040.7547.qmail@hotmail.com>
next in thread | raw e-mail | index | archive | help
Hi,
I am having a bit of difficulty writing a program that will establish
a connection to a modem on the remote host A and create another
connection to a user at another host B.
What I wanna do is to use socket or perhaps pty to pass the open
modem over a socket connection or pty session to the actual user.
The program in between is just like a middle man that relays data
back and forth between user and the modem.
What I found is that most terminal programs that deal with modems
will do modem specific ioctl and also do non-blocking I/O.
So, the question is can I set the slave pty side of thing where
the actual terminal program expects to talk to modem to have attributes
that are normally setable/queriable with modem specific
ioctl operation ?
The picture looks like the following:
hostA:modem <--- socket ---> hostB <--- terminal program ---> user
< XYZ process>
where the XYZ process is basically the end that open a normal socket
or more specifically telnet session to a modem on host A, and XYZ
also open a master pty on host B to listen to I/O to/from slave pty
half of the open pty.
However, programs like seyon, ppp etc all seem to want to do a few
of the following:
1) open with non-blocking I/O
2) do modem specific ioctl(), such as TIOCMGET, TIOCMSET etc.
The question here is, am I trying to do the impossible or not ? If
not can someone tell me how I should proceed ? I am trying to write
and make this thing more portable across more UNIX as possible.
Many many thanks in advance.
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19980723084040.7547.qmail>
