It's "useful" not "usefull".
[dragonfly.git] / sys / platform / pc32 / include / comstats.h
blob008ab41cee698dfb17cbbc0ffff806e0a495ff00
1 /*****************************************************************************/
3 /*
4 * comstats.h -- Serial Port Stats.
6 * Copyright (c) 1994-1996 Greg Ungerer (gerg@stallion.oz.au).
7 * All rights reserved.
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions
11 * are met:
12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright
15 * notice, this list of conditions and the following disclaimer in the
16 * documentation and/or other materials provided with the distribution.
17 * 3. All advertising materials mentioning features or use of this software
18 * must display the following acknowledgement:
19 * This product includes software developed by Greg Ungerer.
20 * 4. Neither the name of the author nor the names of any co-contributors
21 * may be used to endorse or promote products derived from this software
22 * without specific prior written permission.
24 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
25 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 * SUCH DAMAGE.
36 * $FreeBSD: src/sys/i386/include/comstats.h,v 1.5 1999/08/28 00:44:09 peter Exp $
37 * $DragonFly: src/sys/platform/pc32/include/comstats.h,v 1.4 2008/05/18 03:02:53 pavalos Exp $
40 #ifndef _COMSTATS_H_
41 #define _COMSTATS_H_
44 * Serial port stats structure. The structure itself is UART
45 * independent, but some fields may be UART/driver specific (for
46 * example state).
49 typedef struct {
50 unsigned long brd;
51 unsigned long panel;
52 unsigned long port;
53 unsigned long hwid;
54 unsigned long type;
55 unsigned long txtotal;
56 unsigned long rxtotal;
57 unsigned long txbuffered;
58 unsigned long rxbuffered;
59 unsigned long rxoverrun;
60 unsigned long rxparity;
61 unsigned long rxframing;
62 unsigned long rxlost;
63 unsigned long txbreaks;
64 unsigned long rxbreaks;
65 unsigned long txxon;
66 unsigned long txxoff;
67 unsigned long rxxon;
68 unsigned long rxxoff;
69 unsigned long txctson;
70 unsigned long txctsoff;
71 unsigned long rxrtson;
72 unsigned long rxrtsoff;
73 unsigned long modem;
74 unsigned long state;
75 unsigned long flags;
76 unsigned long ttystate;
77 unsigned long cflags;
78 unsigned long iflags;
79 unsigned long oflags;
80 unsigned long lflags;
81 unsigned long signals;
82 } comstats_t;
86 * Board stats structure. Returns useful info about the board.
89 #define COM_MAXPANELS 8
91 typedef struct {
92 unsigned long panel;
93 unsigned long type;
94 unsigned long hwid;
95 unsigned long nrports;
96 } companel_t;
98 typedef struct {
99 unsigned long brd;
100 unsigned long type;
101 unsigned long hwid;
102 unsigned long state;
103 unsigned long ioaddr;
104 unsigned long ioaddr2;
105 unsigned long memaddr;
106 unsigned long irq;
107 unsigned long nrpanels;
108 unsigned long nrports;
109 companel_t panels[COM_MAXPANELS];
110 } combrd_t;
114 * Define the ioctl operations for stats stuff.
116 #define COM_GETPORTSTATS _IOWR('c', 30, comstats_t)
117 #define COM_CLRPORTSTATS _IOWR('c', 31, comstats_t)
118 #define COM_GETBRDSTATS _IOWR('c', 32, combrd_t)
120 /*****************************************************************************/
122 #endif