1 /*****************************************************************************/ 2
3 /* 4 * comstats.h -- Serial Port Stats. 5 * 6 * Copyright (C) 1994-1996 Greg Ungerer (gerg@stallion.oz.au). 7 * 8 * This program is free software; you can redistribute it and/or modify 9 * it under the terms of the GNU General Public License as published by 10 * the Free Software Foundation; either version 2 of the License, or 11 * (at your option) any later version. 12 * 13 * This program is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 * GNU General Public License for more details. 17 * 18 * You should have received a copy of the GNU General Public License 19 * along with this program; if not, write to the Free Software 20 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 21 */ 22
23 /*****************************************************************************/ 24 #ifndef_COMSTATS_H 25 #define_COMSTATS_H 26 /*****************************************************************************/ 27
28 /* 29 * Serial port stats structure. The structure itself is UART 30 * independent, but some fields may be UART/driver specific (for 31 * example state). 32 */ 33
34 typedefstruct{ 35 unsignedlongbrd;
36 unsignedlongpanel;
37 unsignedlongport;
38 unsignedlonghwid;
39 unsignedlongtype;
40 unsignedlongtxtotal;
41 unsignedlongrxtotal;
42 unsignedlongtxbuffered;
43 unsignedlongrxbuffered;
44 unsignedlongrxoverrun;
45 unsignedlongrxparity;
46 unsignedlongrxframing;
47 unsignedlongrxlost;
48 unsignedlongtxbreaks;
49 unsignedlongrxbreaks;
50 unsignedlongtxxon;
51 unsignedlongtxxoff;
52 unsignedlongrxxon;
53 unsignedlongrxxoff;
54 unsignedlong txctson;
55 unsignedlong txctsoff;
56 unsignedlongrxrtson;
57 unsignedlongrxrtsoff;
58 unsignedlongmodem;
59 unsignedlongstate;
60 unsignedlongflags;
61 unsignedlongttystate;
62 unsignedlongcflags;
63 unsignedlongiflags;
64 unsignedlongoflags;
65 unsignedlonglflags;
66 unsignedlongsignals;
67 }comstats_t;
68
69
70 /* 71 * Board stats structure. Returns usefull info about the board. 72 */ 73
74 #defineCOM_MAXPANELS 8
75
76 typedefstruct{ 77 unsignedlongpanel;
78 unsignedlongtype;
79 unsignedlonghwid;
80 unsignedlongnrports;
81 }companel_t;
82
83 typedefstruct{ 84 unsignedlongbrd;
85 unsignedlongtype;
86 unsignedlonghwid;
87 unsignedlongstate;
88 unsignedlongioaddr;
89 unsignedlongioaddr2;
90 unsignedlongmemaddr;
91 unsignedlongirq;
92 unsignedlongnrpanels;
93 unsignedlongnrports;
94 companel_tpanels[COM_MAXPANELS];
95 }combrd_t;
96
97
98 /* 99 * Define the ioctl operations for stats stuff. 100 */ 101 #include <linux/ioctl.h>
102
103 #defineCOM_GETPORTSTATS_IO('c',30)
104 #defineCOM_CLRPORTSTATS_IO('c',31)
105 #defineCOM_GETBRDSTATS_IO('c',32)
106
107 /*****************************************************************************/ 108 #endif