Functions of a Line Discipline

  • To parse input string into lines.
  • To process erase characters.
  • To process a “kill” character that invalidates all characters typed so far on the current line.
  • To echo (write) received characters to the terminal.
  • To expand output such as tab characters to a sequence of blank spaces.
  • To generate signals to processes for terminal hangups, line breaks, or in response to a user hitting the delete key.
  • to allow a raw mode that does not interpret special characters such as erase, kill or carriage return.

Line Discipline in Data Link Layer

Line Discipline is function of Data link layer. It simply determines and identifies the direction of communication. It is simply process of coordinating half-duplex transmission i.e. data can be transmitted in both directions on network of data communication but not at the same time just by establishing and developing continuity among sender and receiver stations before transfer of data. It also makes sure that whether or not receiver is ready to accept or signal sender to start. Line discipline is generally sequence of various operations of network among devices that usually transfers and receives data, controls errors occurred during the transmission, deals with message sets sequence, and also ensures confirmation that data is being received. It is also used to determine which of device can transfer or transmit, and when it can transfer data.

Terminal drivers contain an internal interface to line discipline modules, which interpret input and output. In canonical mode, the line discipline converts the raw data sequence typed at the keyboard to a canonical form before sending the data to the receiving process; the line discipline also converts the raw output sequences written by a process to a format that the user expects. In raw mode, the line discipline passes data between processes and the terminal without such conversions.

Similar Reads

Functions of a Line Discipline

To parse input string into lines. To process erase characters. To process a “kill” character that invalidates all characters typed so far on the current line. To echo (write) received characters to the terminal. To expand output such as tab characters to a sequence of blank spaces. To generate signals to processes for terminal hangups, line breaks, or in response to a user hitting the delete key. to allow a raw mode that does not interpret special characters such as erase, kill or carriage return....

Methods for Line Discipline

There are basically two ways of doing Line discipline as given below:...