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