BK(4) 1985 BK(4) NNAAMMEE bk - line discipline for machine-machine communication (obsolete) SSYYNNOOPPSSIISS ppsseeuuddoo--ddeevviiccee bbkk DDEESSCCRRIIPPTTIIOONN This line discipline provides a replacement for the old and new tty drivers described in _t_t_y(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. It may be suitable for uploading of data from microprocessors into the system. If you are going to send data over asyn- chronous 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 nor- mal terminal mechanisms are involved saturates the system. The line discipline is enabled by a sequence: ##iinncclluuddee <<ssggttttyy..hh>> iinntt llddiisscc == NNEETTLLDDIISSCC,, ffiillddeess;; ...... iiooccttll((ffiillddeess,, TTIIOOCCSSEETTDD,, &&llddiisscc));; 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. The old standard teletype discipline can be restored by doing: llddiisscc == OOTTTTYYDDIISSCC;; iiooccttll((ffiillddeess,, TTIIOOCCSSEETTDD,, &&llddiisscc));; 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 _i_o_c_t_l(2). This must be done bbeeffoorree changing the discipline with TIOCSETD, as most _i_o_c_t_l(2) calls are disabled while in network line-discipline mode. 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, terminat- ing an input record. Each input record must be read and acknowledged before the next input is read as the system Printed 7/27/90 May 1 BK(4) 1985 BK(4) 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. User level programs should provide sequencing and checksums on the information to guarantee accurate data transfer. SSEEEE AALLSSOO tty(4) DDIIAAGGNNOOSSTTIICCSS None. BBUUGGSS The Purdue uploading line discipline, which provides 8 bits and uses timeout's to terminate uploading should be incor- porated into the standard system, as it is much more suit- able for microprocessor connections. Printed 7/27/90 May 2