Search                        Top                                  Index
HELP IOCTL                                     Chris Slymon, August 1984
                                     Revised by Robert Duncan, June 1992

Interface to the BSD 4.2 TTY ioctl calls.


    CONTENTS - (Use <ENTER> g to access required sections)

 -- Introduction
 -- ioctl_tchars
 -- ioctl_ltchars
 -- ioctl_sgttyb
 -- ioctl_locals


-- Introduction -------------------------------------------------------

This file describes the four library files which define constants for
use with -sys_io_control-. Calls of -sys_io_control- may then have the
same form as the "ioctl" calls described in section tty(4) of the Unix
Programmers manual.

This library is, basically, the original BSD 4.2 version of the include
file <sys/ioctl.h> translated into POP-11, and split into chunks based
(broadly) on the structures required by the -sys_io_control- call.

See REF * SYSIO for full details of -sys_io_control-.


-- ioctl_tchars -------------------------------------------------------

    lib ioctl_tchars;

This defines the constants used for setting/reading the 'tchars'
structure, i.e. interrupt characters. These are:

    TIOCSETC     /* set special chars */
    TIOCGETC     /* get special chars */

The structure required for these -sys_io_control- operations is a 6
character string. E.g.

    vars buffer = inits(6);
    sys_io_control(poprawdevin, TIOCGETC, buffer) =>

reads the interrupt characters.


-- ioctl_ltchars ------------------------------------------------------

    lib ioctl_ltchars;

This defines the constants used for setting/reading the 'ltchars'
structure, i.e. the 'local' interrupt characters for the 'new' tty
driver. These are:

    TIOCSLTC     /* set local special chars */
    TIOCGLTC     /* get local special chars */

As above, a 6-character string is a suitable structure for these
operations.


-- ioctl_sgttyb -------------------------------------------------------

    lib ioctl_sgttyb;

This defines the constants used for setting/reading the 'sgttyb'
structure, i.e. the basic mode settings for the new tty driver. E.g.

    TIOCGETP        /* get parameters -- gtty */
    B9600           /* Terminal speed 9600 baud */
    CRMOD           /* map \r to \r\n on output */

The structure to be used with this last call must be "byte-accessible"
and have four 8-bit fields and one 16-bit field, e.g.

    recordclass sgttyb
        dummy       : full  /* dummy first field */
        sg_ispeed   : 8     /* input speed */
        sg_ospeed   : 8     /* output speed */
        sg_erase    : 8     /* erase character */
        sg_kill     : 8     /* kill character */
        sg_flags    : 16    /* mode flags */
    ;


-- ioctl_locals -------------------------------------------------------

    lib ioctl_locals;

This defines the constants used for setting/reading the local mode word
of the tty driver. E.g.

    TIOCLGET      /* get the local mode word */
    TIOCLSET      /* set entire local mode word */
    LDECCTQ       /* only ^Q starts after ^S */
    LNOFLSH       /* no output flush on signal */
    TIOCLBIC      /* bic local mode bits */

The structure required for this call must have one 32-bit field, e.g.

    vars buffer = initintvec(1);
    sys_io_control(poprawdevin, TIOCLGET, buffer) =>


--- C.unix/help/ioctl
--- Copyright University of Sussex 1992. All rights reserved. ----------