Line discipline

Line discipline

A line discipline (LDISC) is a layer in the terminal subsystem in some Unix-like systems. [ [http://www.linusakesson.net/programming/tty The TTY demystified] ] The terminal subsystem consists of three layers: the upper layer to provide the character device interface, the lower hardware driver to communicate with the hardware or pseudo terminal, and the middle line discipline to specify a policy for the driver.

The line discipline glues the low level device driver code with the high level generic interface routines (such as read(2), write(2) and ioctl(2)), and is responsible for implementing the semantics associated with the device. [man|4|tty|FreeBSD] The policy is separated from the device driver so that the same serial hardware driver can be used by devices that require different data handling.

For example, the standard line discipline processes the data it receives from the hardware driver and from applications writing to the device according to the requirements of a terminal on a Unix-like system. On input, it handles special characters such as the interrupt character (typically Control-C) and the erase and kill characters (typically backspace or delete, and Control-U, respectively) and, on output, it replaces all the LF characters with a CR/LF sequence.

A serial port could also be used for a dial-up Internet connection using a serial modem and PPP. In this case, a PPP line discipline would be used; it would accumulate input data from the serial line into PPP input packets, delivering them to the networking stack rather than to the character device, and would transmit packets delivered to it by the networking stack on the serial line.

Some Unix-like systems use STREAMS to implement line disciplines.

References


Wikimedia Foundation. 2010.

Игры ⚽ Поможем написать реферат

Look at other dictionaries:

  • Discipline (Nine Inch Nails song) — Discipline Single by Nine Inch Nails from the album …   Wikipedia

  • discipline — I (field of study) noun area of education, area of learning, branch of instruction, branch of knowledge, course, curriculum, doctrine, education, field of interest, field of learning, learning, lore, teaching II (obedience) noun acquiescence,… …   Law dictionary

  • discipline — Synonyms and related words: Spartanism, academic discipline, academic specialty, accommodate, accommodate with, accord, adapt, adapt to, adjust, adjust to, administer, administrate, administration, agree with, anality, aplomb, apple pie order,… …   Moby Thesaurus

  • line — [[t]la͟ɪn[/t]] ♦ lines, lining, lined 1) N COUNT A line is a long thin mark which is drawn or painted on a surface. Draw a line down that page s center. ...a dotted line... The ball had clearly crossed the line. 2) N COUNT: usu pl The lines on… …   English dictionary

  • discipline — 1. noun 1) a lack of proper parental discipline Syn: control, training, teaching, instruction, regulation, direction, order, authority, rule, strictness, a firm hand; routine, regimen, drill, drilling 2) …   Thesaurus of popular words

  • line — I n 1. rule, bar, score, underline, underscore, hairline; mark, stroke, streak, dash, hyphen, virgule, diagonal; marking, inscription, inscript, engraving, incision; scratch, notch, slash, etch, hatching. 2. band, stripe, strip, belt, zone, layer …   A Note on the Style of the synonym finder

  • Discipline sportive — Sport Pour les articles homonymes, voir Sport (homonymie).  Pour l’article homophone, voir Spore. Le sport est un ensemble d exercices le plus souvent physiques se pratiquant sous forme de jeux individuels ou collectifs pouvant donner lieu à …   Wikipédia en Français

  • line — adrénaline agneline alcaline aniline armeline autodiscipline aveline berline borderline bouline cameline camélines capeline capitoline carline carmeline chevaline choline clean colline cornaline crinoline cristalline câline dicline digitaline… …   Dictionnaire des rimes

  • discipline — I (New American Roget s College Thesaurus) n. training, regimen, drill, practice; obedience, restraint, control, repression; punishment, correction; course of study. See teaching, business, order. II (Roget s IV) n. 1. [A state of order or… …   English dictionary for students

  • discipline — n 1. drilling, training, coaching, exercise; development, preparation, instruction, schooling; inculcation, indoctrination, systematization; drill, routine, method, practice, procedure. 2. direction, rule, government, subjection; control,… …   A Note on the Style of the synonym finder

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”