home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.programmer
- Path: sparky!uunet!psgrain!hippo!ucthpx!aim1!aim1!gram
- From: gram@aim1.aztec.co.za (Graham Wheeler)
- Subject: termio confusion
- Message-ID: <gram.713611381@aim1>
- Organization: Aztec Information Management
- Date: Wed, 12 Aug 1992 09:23:01 GMT
- Lines: 53
-
- Hi all
-
- I just need someone to confirm (or refute) my understanding of just what
- constitutes input and output in termio. I need this as I want to implement
- termio ioctls in a Triple-X PAD device driver.
-
- Here is how I understand it:
-
- Normal Serial
- Device Driver
- --------------------
- | |
- <-------|--- INPUT --------|-------- Standard Input
- Program | |
- --------|--- OUTPUT -------|-------> Standard Output
- | |
- --------------------
-
- Now, when it comes to the PAD (let's say we have a cu connection),
- I think it is like this:
-
- _____________
- /----\ / \
- Standard Input --->| |--->|-- OUTPUT ---|---------> X.25 Tx
- | CU | | |
- Standard Output <--| |----|--- INPUT ---|<--------- X.25 Rx
- \____/ \_____________/
-
-
- In both cases, INPUT is the stream in which input termio processing is done,
- while OUTPUT is the stream in which output termio processing is done.
- What is not shown in the second diagram is the serial device driver sitting
- between standard input and output, and the cu process, which in turn looks
- like the top figure. In other words:
-
- * characters read from the keyboard have /dev/tty's INPUT termio processing
- applied, are then passed to cu, which writes them to the PAD, which
- applies its OUTPUT termio processing, before sending them over the
- network as X.25 data packets.
-
- * data packets received over the X.25 connection are converted into a character
- stream, which has the PAD's INPUT termio processing applied, before
- being passed to cu, which writes them to standard output, which results
- in /dev/tty's OUTPUT termio processing being applied before they are
- finally output.
-
- Is this correct?
-
- --
- Graham Wheeler | "That which is weak conquers the strong,
- Software Systems Engineer/Student | that which is soft conquers the hard."
- Aztec Information Management/UCT | Lao Tzu - Tao Te Ching Ch. 78
- gram@aim1.aztec.co.za / gram@cs.uct.ac.za
-