The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/sys/ttycom.h

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

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

Cache object: 5ee7d0255ac7664429e4858095226199


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.