#include <sys/ioctl_compat.h>

sys/ioctl_compat.h

includes: sys/ttychars.h, sys/ttydev.h
82 macros · 3 structs

structtchars

size 6, align 1
chart_intrcinterrupt
chart_quitcquit
chart_startcstart output
chart_stopcstop output
chart_eofcend-of-file
chart_brkcinput delimiter (like nl)

structltchars

size 6, align 1
chart_suspcstop process signal
chart_dsuspcdelayed stop process signal
chart_rprntcreprint line
chart_flushcflush output (toggles)
chart_werascword erase
chart_lnextcliteral next character

macro_SGTTYB_

Structure for TIOCGETP and TIOCSETP ioctls.
#define _SGTTYB_ 

structsgttyb

size 6, align 2
charsg_ispeedinput speed
charsg_ospeedoutput speed
charsg_eraseerase character
charsg_killkill character
shortsg_flagsmode flags

macroOTIOCGETD

#define OTIOCGETD _IOR('t', 0, int)
get line discipline

macroOTIOCSETD

#define OTIOCSETD _IOW('t', 1, int)
set line discipline

macroTIOCHPCL

#define TIOCHPCL _IO('t', 2)
hang up on last close

macroTIOCGETP

#define TIOCGETP _IOR('t', 8,struct sgttyb)
get parameters -- gtty

macroTIOCSETP

#define TIOCSETP _IOW('t', 9,struct sgttyb)
set parameters -- stty

macroTIOCSETN

#define TIOCSETN _IOW('t',10,struct sgttyb)
as above, but no flushtty

macroTIOCSETC

#define TIOCSETC _IOW('t',17,struct tchars)
set special characters

macroTIOCGETC

#define TIOCGETC _IOR('t',18,struct tchars)
get special characters

macroTANDEM

#define TANDEM 0x00000001
send stopc on out q full

macroCBREAK

#define CBREAK 0x00000002
half-cooked mode

macroLCASE

#define LCASE 0x00000004
simulate lower case

macroECHO

#define ECHO 0x00000008
echo input

macroCRMOD

#define CRMOD 0x00000010
map \r to \r\n on output

macroRAW

#define RAW 0x00000020
no i/o processing

macroODDP

#define ODDP 0x00000040
get/send odd parity

macroEVENP

#define EVENP 0x00000080
get/send even parity

macroANYP

#define ANYP 0x000000c0
get any parity/send none

macroNLDELAY

#define NLDELAY 0x00000300
\n delay

macroTBDELAY

#define TBDELAY 0x00000c00
horizontal tab delay

macroXTABS

#define XTABS 0x00000c00
expand tabs on output

macroCRDELAY

#define CRDELAY 0x00003000
\r delay

macroVTDELAY

#define VTDELAY 0x00004000
vertical tab delay

macroBSDELAY

#define BSDELAY 0x00008000
\b delay

macroNL0

These manifest constants have the same names as those in <sys/termios.h>, so you are not permitted to have both definitions in scope simultaneously in the same compilation unit.
#define NL0 0x00000000

macroNL1

#define NL1 0x00000100
tty 37

macroNL2

#define NL2 0x00000200
vt05

macroNL3

#define NL3 0x00000300

macroTAB0

#define TAB0 0x00000000

macroTAB1

#define TAB1 0x00000400
tty 37

macroTAB2

#define TAB2 0x00000800

macroCR0

#define CR0 0x00000000

macroCR1

#define CR1 0x00001000
tn 300

macroCR2

#define CR2 0x00002000
tty 37

macroCR3

#define CR3 0x00003000
concept 100

macroFF0

#define FF0 0x00000000

macroFF1

#define FF1 0x00004000
tty 37

macroBS0

#define BS0 0x00000000

macroBS1

#define BS1 0x00008000

macroCRTBS

#define CRTBS 0x00010000
do backspacing for crt

macroPRTERA

#define PRTERA 0x00020000
\ ... / erase

macroCRTERA

#define CRTERA 0x00040000
" \b " to wipe out char

macroTILDE

#define TILDE 0x00080000
hazeltine tilde kludge

macroMDMBUF

#define MDMBUF 0x00100000
start/stop output on carrier

macroLITOUT

#define LITOUT 0x00200000
literal output

macroTOSTOP

#define TOSTOP 0x00400000
SIGSTOP on background output

macroFLUSHO

#define FLUSHO 0x00800000
flush output to terminal

macroNOHANG

#define NOHANG 0x01000000
(no-op) was no SIGHUP on carrier drop

macroL001000

#define L001000 0x02000000

macroCRTKIL

#define CRTKIL 0x04000000
kill line with " \b "

macroPASS8

#define PASS8 0x08000000

macroCTLECH

#define CTLECH 0x10000000
echo control chars as ^X

macroPENDIN

#define PENDIN 0x20000000
tp->t_rawq needs reread

macroDECCTQ

#define DECCTQ 0x40000000
only ^Q starts after ^S

macroNOFLSH

#define NOFLSH 0x80000000
no output flush on signal

macroTIOCLBIS

#define TIOCLBIS _IOW('t', 127, int)
bis local mode bits

macroTIOCLBIC

#define TIOCLBIC _IOW('t', 126, int)
bic local mode bits

macroTIOCLSET

#define TIOCLSET _IOW('t', 125, int)
set entire local mode word

macroTIOCLGET

#define TIOCLGET _IOR('t', 124, int)
get local modes

macroLCRTBS

#define LCRTBS (CRTBS>>16)

macroLPRTERA

#define LPRTERA (PRTERA>>16)

macroLCRTERA

#define LCRTERA (CRTERA>>16)

macroLTILDE

#define LTILDE (TILDE>>16)

macroLMDMBUF

#define LMDMBUF (MDMBUF>>16)

macroLLITOUT

#define LLITOUT (LITOUT>>16)

macroLTOSTOP

#define LTOSTOP (TOSTOP>>16)

macroLFLUSHO

#define LFLUSHO (FLUSHO>>16)

macroLNOHANG

#define LNOHANG (NOHANG>>16)

macroLCRTKIL

#define LCRTKIL (CRTKIL>>16)

macroLPASS8

#define LPASS8 (PASS8>>16)

macroLCTLECH

#define LCTLECH (CTLECH>>16)

macroLPENDIN

#define LPENDIN (PENDIN>>16)

macroLDECCTQ

#define LDECCTQ (DECCTQ>>16)

macroLNOFLSH

#define LNOFLSH (NOFLSH>>16)

macroTIOCSLTC

#define TIOCSLTC _IOW('t',117,struct ltchars)
set local special chars

macroTIOCGLTC

#define TIOCGLTC _IOR('t',116,struct ltchars)
get local special chars

macroOTIOCCONS

#define OTIOCCONS _IO('t', 98)
for hp300 -- sans int arg

macroOTTYDISC

#define OTTYDISC 0

macroNETLDISC

#define NETLDISC 1

macroNTTYDISC

#define NTTYDISC 2

macroTIOCGSID

#define TIOCGSID _IOR('t', 99, int)
For svr4 -- get session id