Dr Andrew Scott G7VAV

My photo
 
June 2025
Mo Tu We Th Fr Sa Su
26 27 28 29 30 31 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 1 2 3 4 5 6


comstats.h
001: /*****************************************************************************/
002: 
003: /*
004:  *      comstats.h  -- Serial Port Stats.
005:  *
006:  *      Copyright (C) 1996-1998  Stallion Technologies
007:  *      Copyright (C) 1994-1996  Greg Ungerer.
008:  *
009:  *      This program is free software; you can redistribute it and/or modify
010:  *      it under the terms of the GNU General Public License as published by
011:  *      the Free Software Foundation; either version 2 of the License, or
012:  *      (at your option) any later version.
013:  *
014:  *      This program is distributed in the hope that it will be useful,
015:  *      but WITHOUT ANY WARRANTY; without even the implied warranty of
016:  *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
017:  *      GNU General Public License for more details.
018:  *
019:  *      You should have received a copy of the GNU General Public License
020:  *      along with this program; if not, write to the Free Software
021:  *      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
022:  */
023: 
024: /*****************************************************************************/
025: #ifndef _COMSTATS_H
026: #define _COMSTATS_H
027: /*****************************************************************************/
028: 
029: /*
030:  *      Serial port stats structure. The structure itself is UART
031:  *      independent, but some fields may be UART/driver specific (for
032:  *      example state).
033:  */
034: 
035: typedef struct {
036:         unsigned long   brd;
037:         unsigned long   panel;
038:         unsigned long   port;
039:         unsigned long   hwid;
040:         unsigned long   type;
041:         unsigned long   txtotal;
042:         unsigned long   rxtotal;
043:         unsigned long   txbuffered;
044:         unsigned long   rxbuffered;
045:         unsigned long   rxoverrun;
046:         unsigned long   rxparity;
047:         unsigned long   rxframing;
048:         unsigned long   rxlost;
049:         unsigned long   txbreaks;
050:         unsigned long   rxbreaks;
051:         unsigned long   txxon;
052:         unsigned long   txxoff;
053:         unsigned long   rxxon;
054:         unsigned long   rxxoff;
055:         unsigned long   txctson;
056:         unsigned long   txctsoff;
057:         unsigned long   rxrtson;
058:         unsigned long   rxrtsoff;
059:         unsigned long   modem;
060:         unsigned long   state;
061:         unsigned long   flags;
062:         unsigned long   ttystate;
063:         unsigned long   cflags;
064:         unsigned long   iflags;
065:         unsigned long   oflags;
066:         unsigned long   lflags;
067:         unsigned long   signals;
068: } comstats_t;
069: 
070: 
071: /*
072:  *      Board stats structure. Returns useful info about the board.
073:  */
074: 
075: #define COM_MAXPANELS   8
076: 
077: typedef struct {
078:         unsigned long   panel;
079:         unsigned long   type;
080:         unsigned long   hwid;
081:         unsigned long   nrports;
082: } companel_t;
083: 
084: typedef struct {
085:         unsigned long   brd;
086:         unsigned long   type;
087:         unsigned long   hwid;
088:         unsigned long   state;
089:         unsigned long   ioaddr;
090:         unsigned long   ioaddr2;
091:         unsigned long   memaddr;
092:         unsigned long   irq;
093:         unsigned long   nrpanels;
094:         unsigned long   nrports;
095:         companel_t      panels[COM_MAXPANELS];
096: } combrd_t;
097: 
098: 
099: /*
100:  *      Define the ioctl operations for stats stuff.
101:  */
102: #include <linux/ioctl.h>
103: 
104: #define COM_GETPORTSTATS        _IO('c',30)
105: #define COM_CLRPORTSTATS        _IO('c',31)
106: #define COM_GETBRDSTATS         _IO('c',32)
107: 
108: 
109: /*
110:  *      Define the set of ioctls that give user level access to the
111:  *      private port, panel and board structures. The argument required
112:  *      will be driver dependent!  
113:  */
114: #define COM_READPORT            _IO('c',40)
115: #define COM_READBOARD           _IO('c',41)
116: #define COM_READPANEL           _IO('c',42)
117: 
118: /*****************************************************************************/
119: #endif
120: 


for client (none)
© Andrew Scott 2006 - 2025,
All Rights Reserved
http://www.andrew-scott.uk/
Andrew Scott
http://www.andrew-scott.co.uk/