bk.4
来自「<B>Digital的Unix操作系统VAX 4.2源码</B>」· 4 代码 · 共 72 行
4
72 行
.\" SCCSID: @(#)bk.4 8.1 9/11/90.TH bk 4 VAX "" Unsupported.SH Namebk \- line discipline for machine-machine communication (obsolete).SH Syntax.B pseudo-device bk.SH DescriptionThis line discipline provides a replacement for the old and newtty drivers described in.MS tty 4when high speed output toand especially input from another machine is to be transmittedover a asynchronous communications line. The disciplinewas designed for use by the Berkeley network.It may be suitable for uploading of data from microprocessors intothe system. If you are going to send data over asynchronouscommunications lines at high speed into the system, you mustuse this discipline, as the system otherwise may detect highinput data rates on terminal lines and disables the lines;in any case the processing of such data when normal terminalmechanisms are involved saturates the system..PPThe line discipline is enabled by a sequence:.PP.nf.ft B #include <sgtty.h> int ldisc = NETLDISC, fildes; ... ioctl(fildes, TIOCSETD, &ldisc);.fi.ft R.PPA typical application program then reads a sequence of lines fromthe terminal port, checking header and sequencing information on eachline and acknowledging receipt of each line to the sender, who thentransmits another line of data. Typically several hundred bytes ofdata and a smaller amount of control information will be received oneach handshake..PPThe old standard teletype discipline can be restored by doing:.PP.nf.ft B ldisc = OTTYDISC; ioctl(fildes, TIOCSETD, &ldisc);.fi.ft R.PPWhile in networked mode, normal teletype output functions take place.Thus, if an 8 bit output data path is desired, it is necessaryto prepare the output line by putting it into RAW mode using.MS ioctl 2 .This must be done.B beforechanging the discipline with TIOCSETD, as most.MS ioctl 2calls are disabled while in network line-discipline mode..PPWhen in network mode, input processing is very limited to reduce overhead.Currently the input path is only 7 bits wide, with newline the onlyrecognized character, terminating an input record.Each input record must be read and acknowledged before the next inputis read as the system refuses to accept any new data when thereis a record in the buffer. The buffer is limited in length, but thesystem guarantees to always be willing to accept input resulting in512 data characters and then the terminating newline..PPUser level programs should provide sequencing and checksums on theinformation to guarantee accurate data transfer..SH See Alsotty(4)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?