The data path between a user's shell and the terminal is called a stream. The data on a stream contain characters and control information that affect data handling, such as the control sequences that precede a change in code set or communication protocols. Data entering the stream from the terminal is raw or unprocessed. Data is sequentially processed by STREAMS modules for appropriate use by the shell or an application.
STREAMS provides a way to modularize the processing on a line, allowing processing instructions to be grouped in functional modules. These modules can be added or removed from the line so that different environments can be provided to a terminal according to the user's needs.
The traditional STREAMS TTY environment contains a raw device driver, a line discipline module, and a stream head. The raw device driver provides an I/O interface between the kernel and the hardware. Because the driver is closest to the physical hardware, it provides basic communication protocols, baud rate switching, and other low level services. The line discipline module is a set of instructions or disciplines that transforms the raw data to processed data. This module includes handling the delete character, line kill character, and others. The stream head provides an interface between the user's process and the stream.
The Traditional Chinese Solaris Operating System uses the modular nature of STREAMS to support Traditional Chinese. In addition to the traditional TTY modules, this product implements code conversion in STREAMS. Chinese input is typically supplied by many existing Traditional Chinese TTYs and is not available in the Traditional Chinese Solaris TTY environment.
The Traditional Chinese Solaris Operating System enhances the traditional modules. Its line discipline handles proper cursor movement for wide characters as well as normal protocols. The Traditional Chinese Solaris software code conversion modules convert between two different character code formats, such as between BIG5 and EUC.
Code conversion depends on the appropriate flags or parameters being set. For example, if a BIG5 code terminal is being used, the input from the terminal is converted to EUC and the output to the terminal is converted to BIG5 code.
The major modules that can be pushed onto the stream are ldterm and big5euc.
ldterm is a generic EUC line discipline module. It processes all normal line discipline functions and also handles proper cursor movement and backspacing for wide characters (EUC)
big5euc controls code conversion between BIG5 and EUC