http://www.azstarnet.com/~ymg/files/slsnif-0.4.0.tar.gz
[slsnif.git] / src / common.h
1 /*  common.h
2  *  Copyright (C) 2001 Yan "Warrior" Gurtovoy (ymg@azstarnet.com)
3  *
4  *  This program is free software; you can redistribute it and/or modify
5  *  it under the terms of the GNU General Public License as published by
6  *  the Free Software Foundation; either version 2 of the License, or
7  *  (at your option) any later version.
8  *
9  *  This program is distributed in the hope that it will be useful,
10  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  *  GNU General Public License for more details.
13  *
14  *  You should have received a copy of the GNU General Public License
15  *  along with this program; if not, write to the Free Software
16  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17  */
18
19 #ifndef _COMMON_H
20 #include <termios.h>
21 #include <string.h>
22
23 #ifndef FALSE
24 #define FALSE       0
25 #endif
26 #ifndef TRUE
27 #define TRUE        1
28 #endif
29
30 typedef struct _tty_struct {
31     int             ptyfd;
32     int             portfd;
33     int             logfd;
34     int             ptyraw;
35     int             portraw;
36     int             ptypipefd[2];
37     int             portpipefd[2];
38     int             dspbytes;
39     int             tstamp;
40     int             nolock;
41     char            *portName;
42     char            *ptyName;
43     struct termios  ptystate_orig;
44     struct termios  portstate_orig;
45     speed_t         baudrate;
46     char            clr[8];
47     char            bclr[8];
48     char            tclr[8];
49 } tty_struct;
50
51 /*colors*/
52 typedef struct _clr_struct {
53     char *name;
54     char *color;
55 } clr_struct;
56
57 #define _COMMON_H
58 #endif