1BK(4)                      Kernel Interfaces Manual                      BK(4)
2
3
4

NAME

6       bk - line discipline for machine-machine communication (obsolete)
7

SYNOPSIS

9       Not currently supported under 2.11BSD
10

DESCRIPTION

12       This  line  discipline  provides  a replacement for the old and new tty
13       drivers described in tty(4) when high speed output  to  and  especially
14       input  from  another  machine  is to be transmitted over a asynchronous
15       communications line.  The discipline was designed for use by the Berke‐
16       ley  network.   It may be suitable for uploading of data from micropro‐
17       cessors into the system.  If you are going to send data over  asynchro‐
18       nous  communications  lines at high speed into the system, you must use
19       this discipline, as the system otherwise may  detect  high  input  data
20       rates  on  terminal  lines and disables the lines; in any case the pro‐
21       cessing of such data when normal terminal mechanisms are involved satu‐
22       rates the system.
23
24       The line discipline is enabled by a sequence:
25
26            #include <sgtty.h>
27            int ldisc = NETLDISC, fildes; ...
28            ioctl(fildes, TIOCSETD, &ldisc);
29
30       A  typical  application program then reads a sequence of lines from the
31       terminal port, checking header and sequencing information on each  line
32       and  acknowledging  receipt of each line to the sender, who then trans‐
33       mits another line of data.  Typically several hundred bytes of data and
34       a  smaller amount of control information will be received on each hand‐
35       shake.
36
37       The old standard teletype discipline can be restored by doing:
38
39            ldisc = OTTYDISC;
40            ioctl(fildes, TIOCSETD, &ldisc);
41
42       While in networked mode, normal teletype output functions  take  place.
43       Thus,  if an 8 bit output data path is desired, it is necessary to pre‐
44       pare the output line by putting it into RAW mode using ioctl(2).   This
45       must  be  done  before  changing  the discipline with TIOCSETD, as most
46       ioctl(2) calls are disabled while in network line-discipline mode.
47
48       When in network mode, input processing is very limited to reduce  over‐
49       head.   Currently  the input path is only 7 bits wide, with newline the
50       only recognized character, terminating an  input  record.   Each  input
51       record  must  be read and acknowledged before the next input is read as
52       the system refuses to accept any new data when there is a record in the
53       buffer.   The buffer is limited in length, but the system guarantees to
54       always be willing to accept input resulting in 512 data characters  and
55       then the terminating newline.
56
57       User  level  programs  should  provide  sequencing and checksums on the
58       information to guarantee accurate data transfer.
59

SEE ALSO

61       tty(4)
62

DIAGNOSTICS

64       None.
65

BUGS

67       The Purdue uploading line discipline, which provides 8  bits  and  uses
68       timeout's  to terminate uploading should be incorporated into the stan‐
69       dard system, as it is much more  suitable  for  microprocessor  connec‐
70       tions.
71
72
73
744th Berkeley Distribution      January 27, 1996                          BK(4)
Impressum