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/device/tty_status.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  * Mach Operating System
    3  * Copyright (c) 1991,1990 Carnegie Mellon University
    4  * All Rights Reserved.
    5  * 
    6  * Permission to use, copy, modify and distribute this software and its
    7  * documentation is hereby granted, provided that both the copyright
    8  * notice and this permission notice appear in all copies of the
    9  * software, derivative works or modified versions, and any portions
   10  * thereof, and that both notices appear in supporting documentation.
   11  * 
   12  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
   13  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
   14  * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
   15  * 
   16  * Carnegie Mellon requests users of this software to return to
   17  * 
   18  *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
   19  *  School of Computer Science
   20  *  Carnegie Mellon University
   21  *  Pittsburgh PA 15213-3890
   22  * 
   23  * any improvements or extensions that they make and grant Carnegie Mellon
   24  * the rights to redistribute these changes.
   25  */
   26 /*
   27  * HISTORY
   28  * $Log:        tty_status.h,v $
   29  * Revision 2.6  93/01/14  17:27:25  danner
   30  *      Use proper types in defining constants.
   31  *      [92/11/30            af]
   32  * 
   33  * Revision 2.5  91/05/14  16:02:15  mrt
   34  *      Correcting copyright
   35  * 
   36  * Revision 2.4  91/02/05  17:10:33  mrt
   37  *      Changed to new Mach copyright
   38  *      [91/01/31  17:31:01  mrt]
   39  * 
   40  * Revision 2.3  90/12/05  23:28:49  af
   41  *      Merge problems.
   42  * 
   43  * Revision 2.2  90/12/05  20:42:12  af
   44  *      Created by dbg, I believe.  Added a couple of modem switches.
   45  *      [90/11/13            af]
   46  * 
   47  */
   48 /*
   49  *      Author: David B. Golub, Carnegie Mellon University
   50  *      Date:   ll/90
   51  *
   52  *      Status information for tty.
   53  */
   54 
   55 struct tty_status {
   56         int     tt_ispeed;              /* input speed */
   57         int     tt_ospeed;              /* output speed */
   58         int     tt_breakc;              /* character to deliver when break
   59                                            detected on line */
   60         int     tt_flags;               /* mode flags */
   61 };
   62 #define TTY_STATUS_COUNT        (sizeof(struct tty_status)/sizeof(int))
   63 #define TTY_STATUS              (dev_flavor_t)(('t'<<16) + 1)
   64 
   65 /*
   66  * Speeds
   67  */
   68 #define B0      0
   69 #define B50     1
   70 #define B75     2
   71 #define B110    3
   72 #define B134    4
   73 #define B150    5
   74 #define B200    6
   75 #define B300    7
   76 #define B600    8
   77 #define B1200   9
   78 #define B1800   10
   79 #define B2400   11
   80 #define B4800   12
   81 #define B9600   13
   82 #define EXTA    14
   83 #define EXTB    15
   84 
   85 #define NSPEEDS 16
   86 
   87 /*
   88  * Flags
   89  */
   90 #define TF_TANDEM       0x00000001      /* send stop character when input
   91                                            queue full */
   92 #define TF_ODDP         0x00000002      /* get/send odd parity */
   93 #define TF_EVENP        0x00000004      /* get/send even parity */
   94 #define TF_ANYP         (TF_ODDP|TF_EVENP)
   95                                         /* get any parity/send none */
   96 #define TF_LITOUT       0x00000008      /* output all 8 bits
   97                                            otherwise, characters >= 0x80
   98                                            are time delays      XXX */
   99 #define TF_MDMBUF       0x00000010      /* start/stop output on carrier
  100                                            interrupt
  101                                            otherwise, dropping carrier
  102                                            hangs up line */
  103 #define TF_NOHANG       0x00000020      /* no hangup signal on carrier drop */
  104 #define TF_HUPCLS       0x00000040      /* hang up (outgoing) on last close */
  105 
  106 /*
  107  * Read-only flags - information about device
  108  */
  109 #define TF_ECHO         0x00000080      /* device wants user to echo input */
  110 #define TF_CRMOD        0x00000100      /* device wants \r\n, not \n */
  111 #define TF_XTABS        0x00000200      /* device does not understand tabs */
  112 
  113 /*
  114  * Modem control
  115  */
  116 #define TTY_MODEM_COUNT         (1)     /* one integer */
  117 #define TTY_MODEM               (dev_flavor_t)(('t'<<16) + 2)
  118 
  119 #define TM_LE           0x0001          /* line enable */
  120 #define TM_DTR          0x0002          /* data terminal ready */
  121 #define TM_RTS          0x0004          /* request to send */
  122 #define TM_ST           0x0008          /* secondary transmit */
  123 #define TM_SR           0x0010          /* secondary receive */
  124 #define TM_CTS          0x0020          /* clear to send */
  125 #define TM_CAR          0x0040          /* carrier detect */
  126 #define TM_RNG          0x0080          /* ring */
  127 #define TM_DSR          0x0100          /* data set ready */
  128 
  129 #define TM_BRK          0x0200          /* set line break (internal) */
  130 #define TM_HUP          0x0000          /* close line (internal) */
  131 
  132 /*
  133  * Other controls
  134  */
  135 #define TTY_FLUSH_COUNT         (1)     /* one integer - D_READ|D_WRITE */
  136 #define TTY_FLUSH               (dev_flavor_t)(('t'<<16) + 3)
  137                                         /* flush input or output */
  138 #define TTY_STOP                (dev_flavor_t)(('t'<<16) + 4)
  139                                         /* stop output */
  140 #define TTY_START               (dev_flavor_t)(('t'<<16) + 5)
  141                                         /* start output */
  142 #define TTY_SET_BREAK           (dev_flavor_t)(('t'<<16) + 6)
  143                                         /* set break condition */
  144 #define TTY_CLEAR_BREAK         (dev_flavor_t)(('t'<<16) + 7)
  145                                         /* clear break condition */
  146 #define TTY_SET_TRANSLATION     (dev_flavor_t)(('t'<<16) + 8)
  147                                         /* set translation table */

Cache object: 96f9b381dfd821338ee37e80350f10a6


[ 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.