From owner-freebsd-questions Thu Jul 23 01:41:35 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id BAA08375 for freebsd-questions-outgoing; Thu, 23 Jul 1998 01:41:35 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from hotmail.com (f236.hotmail.com [207.82.251.127]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id BAA08370 for ; Thu, 23 Jul 1998 01:41:34 -0700 (PDT) (envelope-from mcwong@hotmail.com) Received: (qmail 7548 invoked by uid 0); 23 Jul 1998 08:40:40 -0000 Message-ID: <19980723084040.7547.qmail@hotmail.com> Received: from 203.22.110.22 by www.hotmail.com with HTTP; Thu, 23 Jul 1998 01:40:39 PDT X-Originating-IP: [203.22.110.22] From: "M.C Wong" To: questions@FreeBSD.ORG Cc: mcwong@hotmail.com Subject: modem ioctl operation over pty or socket ? Content-Type: text/plain Date: Thu, 23 Jul 1998 18:40:39 EST Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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