home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / unix / programm / 4249 next >
Encoding:
Text File  |  1992-08-12  |  2.4 KB  |  63 lines

  1. Newsgroups: comp.unix.programmer
  2. Path: sparky!uunet!psgrain!hippo!ucthpx!aim1!aim1!gram
  3. From: gram@aim1.aztec.co.za (Graham Wheeler)
  4. Subject: termio confusion
  5. Message-ID: <gram.713611381@aim1>
  6. Organization: Aztec Information Management
  7. Date: Wed, 12 Aug 1992 09:23:01 GMT
  8. Lines: 53
  9.  
  10. Hi all
  11.  
  12. I just need someone to confirm (or refute) my understanding of just what
  13. constitutes input and output in termio. I need this as I want to implement 
  14. termio ioctls in a Triple-X PAD device driver.
  15.  
  16. Here is how I understand it:
  17.  
  18.                             Normal Serial
  19.                             Device Driver
  20.             --------------------
  21.             |                  |
  22.         <-------|--- INPUT --------|-------- Standard Input
  23.         Program         |                  |
  24.                 --------|--- OUTPUT -------|-------> Standard Output
  25.                         |                  |
  26.                         --------------------
  27.  
  28. Now, when it comes to the PAD (let's say we have a cu connection),
  29. I think it is like this:
  30.  
  31.                               _____________
  32.                    /----\    /             \
  33. Standard Input --->|    |--->|-- OUTPUT ---|---------> X.25 Tx
  34.                    | CU |    |             |
  35. Standard Output <--|    |----|--- INPUT ---|<--------- X.25 Rx
  36.                    \____/    \_____________/
  37.  
  38.  
  39. In both cases, INPUT is the stream in which input termio processing is done,
  40. while OUTPUT is the stream in which output termio processing is done.
  41. What is not shown in the second diagram is the serial device driver sitting
  42. between standard input and output, and the cu process, which in turn looks
  43. like the top figure. In other words:
  44.  
  45. * characters read from the keyboard have /dev/tty's INPUT termio processing
  46.     applied, are then passed to cu, which writes them to the PAD, which
  47.     applies its OUTPUT termio processing, before sending them over the
  48.     network as X.25 data packets.
  49.  
  50. * data packets received over the X.25 connection are converted into a character
  51.     stream, which has the PAD's INPUT termio processing applied, before
  52.     being passed to cu, which writes them to standard output, which results
  53.     in /dev/tty's OUTPUT termio processing being applied before they are
  54.     finally output.
  55.  
  56. Is this correct?
  57.  
  58. -- 
  59. Graham Wheeler                     | "That which is weak conquers the strong,
  60. Software Systems Engineer/Student  | that which is soft conquers the hard."
  61. Aztec Information Management/UCT   |         Lao Tzu - Tao Te Ching Ch. 78
  62. gram@aim1.aztec.co.za / gram@cs.uct.ac.za 
  63.