epoc32/include/stdapis/sys/ttycom.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:27:01 +0100
branchSymbian2
changeset 3 e1b950c65cb4
parent 0 061f57f2323e
permissions -rw-r--r--
Attempt to represent the S^2->S^3 header reorganisation as a series of "hg rename" operations
williamr@2
     1
/*-
williamr@2
     2
 * Copyright (c) 1982, 1986, 1990, 1993, 1994
williamr@2
     3
 *	The Regents of the University of California.  All rights reserved.
williamr@2
     4
 * (c) UNIX System Laboratories, Inc.
williamr@2
     5
 * All or some portions of this file are derived from material licensed
williamr@2
     6
 * to the University of California by American Telephone and Telegraph
williamr@2
     7
 * Co. or Unix System Laboratories, Inc. and are reproduced herein with
williamr@2
     8
 * the permission of UNIX System Laboratories, Inc.
williamr@2
     9
 *
williamr@2
    10
 * Redistribution and use in source and binary forms, with or without
williamr@2
    11
 * modification, are permitted provided that the following conditions
williamr@2
    12
 * are met:
williamr@2
    13
 * 1. Redistributions of source code must retain the above copyright
williamr@2
    14
 *    notice, this list of conditions and the following disclaimer.
williamr@2
    15
 * 2. Redistributions in binary form must reproduce the above copyright
williamr@2
    16
 *    notice, this list of conditions and the following disclaimer in the
williamr@2
    17
 *    documentation and/or other materials provided with the distribution.
williamr@2
    18
 * 4. Neither the name of the University nor the names of its contributors
williamr@2
    19
 *    may be used to endorse or promote products derived from this software
williamr@2
    20
 *    without specific prior written permission.
williamr@2
    21
 *
williamr@2
    22
 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
williamr@2
    23
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
williamr@2
    24
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
williamr@2
    25
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
williamr@2
    26
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
williamr@2
    27
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
williamr@2
    28
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
williamr@2
    29
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
williamr@2
    30
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
williamr@2
    31
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
williamr@2
    32
 * SUCH DAMAGE.
williamr@2
    33
 *
williamr@2
    34
 *	@(#)ttycom.h	8.1 (Berkeley) 3/28/94
williamr@2
    35
 * $FreeBSD: src/sys/sys/ttycom.h,v 1.23 2004/06/25 21:54:49 phk Exp $
williamr@2
    36
 */
williamr@2
    37
williamr@2
    38
#ifndef	_SYS_TTYCOM_H_
williamr@2
    39
#define	_SYS_TTYCOM_H_
williamr@2
    40
williamr@2
    41
#include <sys/ioccom.h>
williamr@2
    42
williamr@2
    43
/*
williamr@2
    44
 * Tty ioctl's except for those supported only for backwards compatibility
williamr@2
    45
 * with the old tty driver.
williamr@2
    46
 */
williamr@2
    47
williamr@2
    48
/*
williamr@2
    49
 * Window/terminal size structure.  This information is stored by the kernel
williamr@2
    50
 * in order to provide a consistent interface, but is not used by the kernel.
williamr@2
    51
 */
williamr@2
    52
struct winsize {
williamr@2
    53
	unsigned short	ws_row;		/* rows, in characters */
williamr@2
    54
	unsigned short	ws_col;		/* columns, in characters */
williamr@2
    55
	unsigned short	ws_xpixel;	/* horizontal size, pixels */
williamr@2
    56
	unsigned short	ws_ypixel;	/* vertical size, pixels */
williamr@2
    57
};
williamr@2
    58
williamr@2
    59
						/* 0-2 compat */
williamr@2
    60
						/* 3-4 obsolete */
williamr@2
    61
						/* 5-7 obsolete or unused */
williamr@2
    62
						/* 8-10 compat */
williamr@2
    63
						/* 11-12 obsolete or unused */
williamr@2
    64
#define	TIOCEXCL	 _IO('t', 13)		/* set exclusive use of tty */
williamr@2
    65
#define	TIOCNXCL	 _IO('t', 14)		/* reset exclusive use of tty */
williamr@2
    66
						/* 15 unused */
williamr@2
    67
#define	TIOCFLUSH	_IOW('t', 16, int)	/* flush buffers */
williamr@2
    68
						/* 17-18 compat */
williamr@2
    69
#define	TIOCGETA	_IOR('t', 19, struct termios) /* get termios struct */
williamr@2
    70
#define	TIOCSETA	_IOW('t', 20, struct termios) /* set termios struct */
williamr@2
    71
#define	TIOCSETAW	_IOW('t', 21, struct termios) /* drain output, set */
williamr@2
    72
#define	TIOCSETAF	_IOW('t', 22, struct termios) /* drn out, fls in, set */
williamr@2
    73
						/* 23-25 obsolete or unused */
williamr@2
    74
#define	TIOCGETD	_IOR('t', 26, int)	/* get line discipline */
williamr@2
    75
#define	TIOCSETD	_IOW('t', 27, int)	/* set line discipline */
williamr@2
    76
						/* 28-69 free */
williamr@2
    77
						/* 127-124 compat */
williamr@2
    78
#define	TIOCSBRK	 _IO('t', 123)		/* set break bit */
williamr@2
    79
#define	TIOCCBRK	 _IO('t', 122)		/* clear break bit */
williamr@2
    80
#define	TIOCSDTR	 _IO('t', 121)		/* set data terminal ready */
williamr@2
    81
#define	TIOCCDTR	 _IO('t', 120)		/* clear data terminal ready */
williamr@2
    82
#define	TIOCGPGRP	_IOR('t', 119, int)	/* get pgrp of tty */
williamr@2
    83
#define	TIOCSPGRP	_IOW('t', 118, int)	/* set pgrp of tty */
williamr@2
    84
						/* 117-116 compat */
williamr@2
    85
#define	TIOCOUTQ	_IOR('t', 115, int)	/* output queue size */
williamr@2
    86
#define	TIOCSTI		_IOW('t', 114, char)	/* simulate terminal input */
williamr@2
    87
#define	TIOCNOTTY	 _IO('t', 113)		/* void tty association */
williamr@2
    88
#define	TIOCPKT		_IOW('t', 112, int)	/* pty: set/clear packet mode */
williamr@2
    89
#define		TIOCPKT_DATA		0x00	/* data packet */
williamr@2
    90
#define		TIOCPKT_FLUSHREAD	0x01	/* flush packet */
williamr@2
    91
#define		TIOCPKT_FLUSHWRITE	0x02	/* flush packet */
williamr@2
    92
#define		TIOCPKT_STOP		0x04	/* stop output */
williamr@2
    93
#define		TIOCPKT_START		0x08	/* start output */
williamr@2
    94
#define		TIOCPKT_NOSTOP		0x10	/* no more ^S, ^Q */
williamr@2
    95
#define		TIOCPKT_DOSTOP		0x20	/* now do ^S ^Q */
williamr@2
    96
#define		TIOCPKT_IOCTL		0x40	/* state change of pty driver */
williamr@2
    97
#define	TIOCSTOP	 _IO('t', 111)		/* stop output, like ^S */
williamr@2
    98
#define	TIOCSTART	 _IO('t', 110)		/* start output, like ^Q */
williamr@2
    99
#define	TIOCMSET	_IOW('t', 109, int)	/* set all modem bits */
williamr@2
   100
#define	TIOCMBIS	_IOW('t', 108, int)	/* bis modem bits */
williamr@2
   101
#define	TIOCMBIC	_IOW('t', 107, int)	/* bic modem bits */
williamr@2
   102
#define	TIOCMGET	_IOR('t', 106, int)	/* get all modem bits */
williamr@2
   103
#define		TIOCM_LE	0001		/* line enable */
williamr@2
   104
#define		TIOCM_DTR	0002		/* data terminal ready */
williamr@2
   105
#define		TIOCM_RTS	0004		/* request to send */
williamr@2
   106
#define		TIOCM_ST	0010		/* secondary transmit */
williamr@2
   107
#define		TIOCM_SR	0020		/* secondary receive */
williamr@2
   108
#define		TIOCM_CTS	0040		/* clear to send */
williamr@2
   109
#define		TIOCM_DCD	0100		/* data carrier detect */
williamr@2
   110
#define		TIOCM_RI 	0200		/* ring indicate */
williamr@2
   111
#define		TIOCM_DSR	0400		/* data set ready */
williamr@2
   112
#define		TIOCM_CD	TIOCM_DCD
williamr@2
   113
#define		TIOCM_CAR	TIOCM_DCD
williamr@2
   114
#define		TIOCM_RNG	TIOCM_RI
williamr@2
   115
#define	TIOCGWINSZ	_IOR('t', 104, struct winsize)	/* get window size */
williamr@2
   116
#define	TIOCSWINSZ	_IOW('t', 103, struct winsize)	/* set window size */
williamr@2
   117
#define	TIOCUCNTL	_IOW('t', 102, int)	/* pty: set/clr usr cntl mode */
williamr@2
   118
#define	TIOCSTAT	 _IO('t', 101)		/* simulate ^T status message */
williamr@2
   119
#define		UIOCCMD(n)	_IO('u', n)	/* usr cntl op "n" */
williamr@2
   120
						/* 100 see consio.h */
williamr@2
   121
						/* 99 obsolete or unused */
williamr@2
   122
#define	TIOCCONS	_IOW('t', 98, int)	/* become virtual console */
williamr@2
   123
#define	TIOCSCTTY	 _IO('t', 97)		/* become controlling tty */
williamr@2
   124
						/* 97-90 tun; some conflicts */
williamr@2
   125
#define	TIOCEXT		_IOW('t', 96, int)	/* pty: external processing */
williamr@2
   126
#define	TIOCSIG		 _IO('t', 95)		/* pty: generate signal */
williamr@2
   127
#define	TIOCDRAIN	 _IO('t', 94)		/* wait till output drained */
williamr@2
   128
						/* 92-90 tap; some conflicts */
williamr@2
   129
#define	TIOCMSDTRWAIT	_IOW('t', 91, int)	/* modem: set wait on close */
williamr@2
   130
#define	TIOCMGDTRWAIT	_IOR('t', 90, int)	/* modem: get wait on close */
williamr@2
   131
						/* 90-70 ppp; many conflicts */
williamr@2
   132
#define	TIOCTIMESTAMP	_IOR('t', 89, struct timeval)	/* enable/get timestamp
williamr@2
   133
						 * of last input event */
williamr@2
   134
						/* 88 slip, ppp; conflicts */
williamr@2
   135
#define	TIOCSDRAINWAIT	_IOW('t', 87, int)	/* set ttywait timeout */
williamr@2
   136
#define	TIOCGDRAINWAIT	_IOR('t', 86, int)	/* get ttywait timeout */
williamr@2
   137
						/* 84-80 slip */
williamr@2
   138
williamr@2
   139
#define	TTYDISC		0		/* termios tty line discipline */
williamr@2
   140
#define	SLIPDISC	4		/* serial IP discipline */
williamr@2
   141
#define	PPPDISC		5		/* PPP discipline */
williamr@2
   142
#define	NETGRAPHDISC	6		/* Netgraph tty node discipline */
williamr@2
   143
#define	H4DISC		7		/* Netgraph Bluetooth H4 discipline */
williamr@2
   144
williamr@2
   145
#endif /* !_SYS_TTYCOM_H_ */