Go to the documentation of this file.
27 #include <linux/types.h>
28 #include <linux/wait.h>
30 #include <linux/tty.h>
42 #define SEQ_MASK (SEQ_MAX-1)
47 #define TBUF_MASK (TBUF_MAX-1)
48 #define RBUF_MASK (RBUF_MAX-1)
57 #define MON_MASK (MON_MAX-1)
60 #define DPA_MASK (DPA_MAX-1)
61 #define DPA_HIGH_WATER 58000
65 #define IDLE_MAX (20 * HZ)
67 #define MAX_DESC_LEN 100
71 #define WRITEBUFLEN ((4096) + 4)
111 #define PORT_NUM(dev) ((dev) & 0x3f)
113 #define OPEN_CATEGORY(dev) ((((dev) & 0x80) & 0x40))
114 #define IS_PRINT(dev) (((dev) & 0xff) >= 0x80)
116 #define OPEN_WAIT_AVAIL(cat) (((cat) & 0x40) == 0x000)
117 #define OPEN_WAIT_CARRIER(cat) (((cat) & 0x40) == 0x000)
118 #define OPEN_FORCES_CARRIER(cat) (((cat) & 0x40) != 0x000)
130 #define DM_RTS_TOGGLE 0x04
145 #define EV_OPU 0x0001
146 #define EV_OPS 0x0002
147 #define EV_OPX 0x0004
148 #define EV_OPH 0x0008
149 #define EV_IPU 0x0010
150 #define EV_IPS 0x0020
151 #define EV_TXB 0x0040
152 #define EV_TXI 0x0080
153 #define EV_TXF 0x0100
154 #define EV_RXB 0x0200
161 #define CF_CS5 0x0000
162 #define CF_CS6 0x0010
163 #define CF_CS7 0x0020
164 #define CF_CS8 0x0030
165 #define CF_CSIZE 0x0030
166 #define CF_CSTOPB 0x0040
167 #define CF_CREAD 0x0080
168 #define CF_PARENB 0x0100
169 #define CF_PARODD 0x0200
170 #define CF_HUPCL 0x0400
177 #define XF_XPAR 0x0001
178 #define XF_XMODEM 0x0002
179 #define XF_XCASE 0x0004
180 #define XF_XEDATA 0x0008
181 #define XF_XTOSS 0x0010
182 #define XF_XIXON 0x0020
189 #define IF_IGNBRK 0x0001
190 #define IF_BRKINT 0x0002
191 #define IF_IGNPAR 0x0004
192 #define IF_PARMRK 0x0008
193 #define IF_INPCK 0x0010
194 #define IF_ISTRIP 0x0020
195 #define IF_IXON 0x0400
196 #define IF_IXANY 0x0800
197 #define IF_IXOFF 0x1000
198 #define IF_DOSMODE 0x8000
205 #define OF_OLCUC 0x0002
206 #define OF_ONLCR 0x0004
207 #define OF_OCRNL 0x0008
208 #define OF_ONOCR 0x0010
209 #define OF_ONLRET 0x0020
210 #define OF_TAB3 0x1800
211 #define OF_TABDLY 0x1800
218 #define UN_EXCL 0x00010000
219 #define UN_STICKY 0x00020000
220 #define UN_BUSY 0x00040000
221 #define UN_PWAIT 0x00080000
222 #define UN_TIME 0x00100000
223 #define UN_EMPTY 0x00200000
224 #define UN_LOW 0x00400000
225 #define UN_DIGI_MASK 0x00FF0000
233 #define UN_HUP_NOTIFY 0x0001
236 #define UN_FOURPORT 0x0002
237 #define UN_SAK 0x0004
238 #define UN_SPLIT_TERMIOS 0x0008
240 #define UN_SPD_MASK 0x0030
241 #define UN_SPD_HI 0x0010
242 #define UN_SPD_VHI 0x0020
243 #define UN_SPD_CUST 0x0030
245 #define UN_SKIP_TEST 0x0040
246 #define UN_AUTO_IRQ 0x0080
248 #define UN_SESSION_LOCKOUT 0x0100
249 #define UN_PGRP_LOCKOUT 0x0200
250 #define UN_CALLOUT_NOHUP 0x0400
252 #define UN_FLAGS 0x0FFF
253 #define UN_USR_MASK 0x0430
257 #define UN_INITIALIZED 0x80000000
258 #define UN_CALLOUT_ACTIVE 0x40000000
259 #define UN_NORMAL_ACTIVE 0x20000000
260 #define UN_BOOT_AUTOCONF 0x10000000
261 #define UN_CLOSING 0x08000000
262 #define UN_CTS_FLOW 0x04000000
263 #define UN_CHECK_CD 0x02000000
264 #define UN_SHARE_IRQ 0x01000000
334 #define CH_HANGUP 0x00002
336 #define CH_VIRT_CD 0x00004
337 #define CH_PHYS_CD 0x00008
339 #define CH_CLOCAL 0x00010
340 #define CH_BAUD0 0x00020
342 #define CH_FAST_READ 0x00040
343 #define CH_FAST_WRITE 0x00080
345 #define CH_PRON 0x00100
346 #define CH_RX_FLUSH 0x00200
347 #define CH_LOW 0x00400
348 #define CH_EMPTY 0x00800
349 #define CH_DRAIN 0x01000
350 #define CH_INPUT 0x02000
351 #define CH_RXSTOP 0x04000
352 #define CH_PARAM 0x08000
353 #define CH_WAITING_SYNC 0x10000
356 #define CH_PORT_GONE 0x20000
357 #define CH_TX_BREAK 0x40000
365 #define OTYPE_IMMEDIATE 0
366 #define OTYPE_PERSISTENT 1
367 #define OTYPE_INCOMING 2
374 #define RR_SEQUENCE 0x0001
375 #define RR_STATUS 0x0002
376 #define RR_BUFFER 0x0004
377 #define RR_CAPABILITY 0x0008
379 #define RR_TX_FLUSH 0x0040
380 #define RR_RX_FLUSH 0x0080
382 #define RR_TX_STOP 0x0100
383 #define RR_RX_STOP 0x0200
384 #define RR_TX_START 0x0400
385 #define RR_RX_START 0x0800
387 #define RR_TX_BREAK 0x1000
388 #define RR_TX_ICHAR 0x2000
524 #define ND_STATE_STR(x) \
525 ((x) == NS_CLOSED ? "CLOSED" : \
526 ((x) == NS_IDLE ? "IDLE" : \
527 ((x) == NS_SEND_QUERY ? "SEND_QUERY" : \
528 ((x) == NS_WAIT_QUERY ? "WAIT_QUERY" : \
529 ((x) == NS_READY ? "READY" : \
530 ((x) == NS_SEND_ERROR ? "SEND_ERROR" : "UNKNOWN"))))))
536 #define ND_SELECT 0x0001
537 #define ND_DEB_WAIT 0x0002
544 #define MON_WAIT_DATA 0x0001
545 #define MON_WAIT_SPACE 0x0002
551 #define DPA_WAIT_DATA 0x0001
552 #define DPA_WAIT_SPACE 0x0002
559 #define RPDUMP_MAGIC "Digi-RealPort-1.0"
561 #define RPDUMP_MESSAGE 0xE2
562 #define RPDUMP_RESET 0xE7
563 #define RPDUMP_CLIENT 0xE8
564 #define RPDUMP_SERVER 0xE9
571 #define NR_ECHO 0x0001
572 #define NR_IDENT 0x0002
573 #define NR_CAPABILITY 0x0004
574 #define NR_VPD 0x0008
575 #define NR_PASSWORD 0x0010
580 #define SERIAL_TTDRV_REG 0x0001
581 #define CALLOUT_TTDRV_REG 0x0002
582 #define XPRINT_TTDRV_REG 0x0004