blob: 76f9fbb7b1fc9fe3dc75cbc6505b0b2f6c100dc8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
|
/*
* tty.h:
*
* Copyright (c) 2008 James McKenzie <james@fishsoup.dhs.org>,
* All rights reserved.
*
*/
/*
* $Id$
*/
/*
* $Log$
* Revision 1.11 2008/02/23 11:48:37 james
* *** empty log message ***
*
* Revision 1.10 2008/02/22 23:39:27 james
* *** empty log message ***
*
* Revision 1.9 2008/02/22 19:12:05 james
* *** empty log message ***
*
* Revision 1.8 2008/02/15 23:52:12 james
* *** empty log message ***
*
* Revision 1.7 2008/02/14 10:36:18 james
* *** empty log message ***
*
* Revision 1.6 2008/02/14 10:34:30 james
* *** empty log message ***
*
* Revision 1.5 2008/02/13 09:12:21 james
* *** empty log message ***
*
* Revision 1.4 2008/02/13 01:08:18 james
* *** empty log message ***
*
* Revision 1.3 2008/02/09 15:47:28 james
* *** empty log message ***
*
* Revision 1.2 2008/02/07 00:43:27 james
* *** empty log message ***
*
* Revision 1.1 2008/02/06 20:26:58 james
* *** empty log message ***
*
*/
#ifndef __TTY_H__
#define __TTY_H__
#define SYM_CHAR_RESET (-1)
#define TTY_SIGNATURE \
char name[1024]; \
int blocked; \
CRT_Pos size; \
void (*close)(struct TTY_struct *); \
int (*recv)(struct TTY_struct *,void *buf,int len); \
int (*xmit)(struct TTY_struct *,void *buf,int len); \
int rfd; \
int wfd; \
int hanging_up; \
struct timeval hangup_clock;
#define TTY_BITFREQ_LEN 10
typedef struct
{
int in_dle;
int in_errmark;
int bitfreq[TTY_BITFREQ_LEN];
int biterrs;
struct timeval lasterr;
int guessed_baud;
} TTY_Parser;
typedef struct TTY_struct
{
TTY_SIGNATURE;
} TTY;
typedef struct
{
int lines;
int blocked;
struct termios termios;
int baud;
} TTY_Status;
#endif /* __TTY_H__ */
|