Subject: Re: I/O functions in C
To: None <port-i386@netbsd.org>
From: Christos Zoulas <christos@zoulas.com>
List: port-i386
Date: 07/23/1999 03:48:18
In article <3.0.5.32.19990722203517.007da210@datacruz.com>,
Mike Sienicki <mike@cpdist.com> wrote:
>Dear NetBSD,
>
>At a radio station that I work for they are using two computers and two
>modems to access two different AM transmitter facilities to gather data
>from each.  To top this off they are both running DOS. I want to get rid of
>one PC and load NetBSD on the other and write my own C program to do all of
>this. Not a difficult task, but, I am not familiar with what high level I/O
>functions in C would handle a modem connected to either COM0 or COM1. If
>anybody can help man-o-man that would be really sooper dooper!
>

You need to open("/dev/ttyXX", ...), tcgetattr(), tcsetattr(), read(), write()
etc. Look for an example program that does tty/IO like
/usr/src/usr.sbin/pppd/chat/chat.c...

christos