[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]
Files Reference

termio.h File

Purpose

Defines the structure of the termio file, which provides the terminal interface for AIX Version 2 compatibility.

Description

The /usr/include/sys/termio.h file contains the termio structure, which defines special characters as well as the basic input, output, control, and line discipline modes. The termio.h file is provided for compatibility with AIX Version 2 applications.

AIX Version 2 applications that include the termio.h file can use the AIX Version 2 terminal interface provided by the POSIX line discipline. The following AIX Version 2 terminal interface operations are not supported by the POSIX line discipline:

The termio structure in the termio.h file contains the following fields:

The primary ioctl subroutines have the form:

ioctl (FileDescriptor, Command, Structure)
struct termio *Structure;

The operations using this form are:

TCGETA Gets the parameters associated with the terminal and stores them in the termio structure referenced by the Structure parameter.
TCSETA Sets the parameters associated with the terminal from the structure referenced by the Structure parameter. The change is immediate.
TCSETAF Waits for the output to drain, and then flushes the input queue and sets the new parameters.
TCSETAW Waits for the output to drain before setting the new parameters. This form should be used when changing parameters that will affect output.

Other ioctl subroutines have the form:

ioctl (FileDescriptor, Command, Value)
int Value;

The operations using this form are:

Attention: If the user writes an application that performs a TCSBRK operation followed by a TCFLSH operation prior to closing a port, the last data left in the concentrator box on the 64-port adapter is lost. However, no problem occurs if an SIO, 8-port, or 16-port adapter is used.
TCSBRK Waits for the output to drain. If the Value parameter has a value of 0, it sends a break of 0.25 seconds. A nonzero value causes a break condition of that many milliseconds.
TCSBREAK Waits for the output to drain. If the Value parameter has a value of 0, it sends a break of .25 seconds. A nonzero value causes a break condition of that many milliseconds.
TCXONC Starts and stops control. If the Value parameter has a value of 0, it suspends output. If the Value parameter has a value of 1, it restarts suspended output. If the Value parameter has a value of 2, it blocks input. If the Value parameter has a value of 3, it unblocks input.
TCFLSH If the Value parameter has a value of 0, it flushes the input queue. If the Value parameter has a value of 1, it flushes the output queue. If the Value parameter has a value of 2, it flushes both the input and output queues.

Another form for ioctl subroutines is:

ioctl (FileDescriptor, Command, Structure)
struct csmap* Structure;
TCSCSMAP Sets the code set map from the structure referenced by the structure parameter and rejects any invalid map (any map with 0 length/width or a length greater than MB_LEN_MAX). The /usr/include/sys/tty.h file contains the structure used for TCSCSMAP and TCGCSMAP operations.
TCGCSMAP Returns a copy of the current code set map in the structure referenced by the structure parameter. The /usr/include/sys/tty.h file contains the structure used for TCSCSMAP and TCGCSMAP operations.

The following ioctl operations are used for trusted communications path operations:

TCSAK Points to an integer that enables the Secure Attention Key (SAK) sequence (Ctrl-X, Ctrl-R) to provide a clean terminal to which only trusted processes can read or write. When SAK is enabled and the user types this sequence, all processes that are currently running are ended. The TCSAKON operation turns the SAK sequence on; the TCSAKOFF operation turns the SAK sequence off.
TCQSAK Queries the state (TCSAKON or TCSAKOFF) of the SAK sequence.
TCTRUST Sets a bit by which another process can query, (with the TCQTRUST operation), the state of the terminal, (TCTRUSTED or TCUNTRUSTED).
TCQTRUST Queries the state of the terminal (TCTRUSTED or TCUNTRUSTED).

Implementation Specifics

This file is for compatibility with AIX Version 2.

This file is part of Base Operating System (BOS) Runtime.

Related Information

The fork subroutine, ioctl subroutine, setpgrp subroutine, sigvec subroutine.

The csh command, getty command, stty command, tset command.

The tty Subsystem Overview in AIX General Programming Concepts: Writing and Debugging Programs.


[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]