diff options
| author | Jacob McDonnell <jacob@jacobmcdonnell.com> | 2026-04-25 21:07:28 -0400 |
|---|---|---|
| committer | Jacob McDonnell <jacob@jacobmcdonnell.com> | 2026-04-25 21:07:28 -0400 |
| commit | 711594636704defae873be1a355a292505585afd (patch) | |
| tree | 59ee13f863830d8beba6cfd02bbe813dd486c26f /static/v10/man4/bk.4 | |
| parent | 3258a063c1f189d7b019e40e525b46bef9b9a7b1 (diff) | |
docs: Added UNIX V10 Manuals
Diffstat (limited to 'static/v10/man4/bk.4')
| -rw-r--r-- | static/v10/man4/bk.4 | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/static/v10/man4/bk.4 b/static/v10/man4/bk.4 new file mode 100644 index 00000000..91dec8bc --- /dev/null +++ b/static/v10/man4/bk.4 @@ -0,0 +1,74 @@ +.TH BK 4 +.UC 4 +.SH NAME +bk \- line discipline for machine-machine communication +.SH SYNOPSIS +.B #include <sgtty.h> +.PP +.B int ldisc = NETLDISC, fildes; +\&... +.PP +.B ioctl(fildes, TIOCSETD, &ldisc); +.SH DESCRIPTION +This line discipline provides a replacement for the old and new +tty drivers described in +.IR tty (4) +when high speed output to +and especially input from another machine is to be transmitted +over a asynchronous communications line. The discipline +was designed for use by the Berkeley network +.IR net (1) +but is +well suited to uploading of data from microprocessors into +the system. If you are going to send data over asynchronous +communications lines at high speed into the system, you must +use this discipline, as the system otherwise may detect high +input data rates on terminal lines and disables the lines; +in any case the processing of such data when normal terminal +mechanisms are involved saturates the system. +.PP +A typical application program then reads a sequence of lines from +the terminal port, checking header and sequencing information on each +line and acknowledging receipt of each line to the sender, who then +transmits another line of data. Typically several hundred bytes of +data and a smaller amount of control information will be received on +each handshake. +.PP +The old standard teletype discipline can be restored by doing: +.sp +.ft B +ldisc = OTTYDISC; + +ioctl(fildes, TIOCSETD, &ldisc); +.ft R +.sp +While in networked mode, normal teletype output functions take place. +Thus, if an 8 bit output data path is desired, it is necessary +to prepare the output line by putting it into RAW mode using +.IR ioctl (2). +This must be done +.B before +changing the discipline with TIOCSETD, as most +.IR ioctl (2) +calls are disabled while in network line-discipline mode. +.PP +When in network mode, input processing is very limited to reduce overhead. +Currently the input path is only 7 bits wide, with newline the only +recognized character, terminating an input record. +Each input record must be read and acknowledged before the next input +is read as the system refuses to accept any new data when there +is a record in the buffer. The buffer is limited in length, but the +system guarantees to always be willing to accept input resulting in +512 data characters and then the terminating newline. +.PP +User level programs should provide sequencing and checksums on the +information to guarantee accurate data transfer. +.SH "SEE ALSO" +tty(4) +.SH BUGS +A standard program and protocol should be defined for +uploading data from microprocessors, so that havoc doesn't +result. +.PP +A full 8-bit input path should be provided with a mechanism +for escaping newlines into an input packet. |
