root/include/linux/comstats.h

/* [previous][next][first][last][top][bottom][index][help] */

INCLUDED FROM


   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 typedef struct {
  35         unsigned long   brd;
  36         unsigned long   panel;
  37         unsigned long   port;
  38         unsigned long   hwid;
  39         unsigned long   type;
  40         unsigned long   txtotal;
  41         unsigned long   rxtotal;
  42         unsigned long   txbuffered;
  43         unsigned long   rxbuffered;
  44         unsigned long   rxoverrun;
  45         unsigned long   rxparity;
  46         unsigned long   rxframing;
  47         unsigned long   rxlost;
  48         unsigned long   txbreaks;
  49         unsigned long   rxbreaks;
  50         unsigned long   txxon;
  51         unsigned long   txxoff;
  52         unsigned long   rxxon;
  53         unsigned long   rxxoff;
  54         unsigned long   txctson;
  55         unsigned long   txctsoff;
  56         unsigned long   rxrtson;
  57         unsigned long   rxrtsoff;
  58         unsigned long   modem;
  59         unsigned long   state;
  60         unsigned long   flags;
  61         unsigned long   ttystate;
  62         unsigned long   cflags;
  63         unsigned long   iflags;
  64         unsigned long   oflags;
  65         unsigned long   lflags;
  66         unsigned long   signals;
  67 } comstats_t;
  68 
  69 
  70 /*
  71  *      Board stats structure. Returns useful info about the board.
  72  */
  73 
  74 #define COM_MAXPANELS   8
  75 
  76 typedef struct {
  77         unsigned long   panel;
  78         unsigned long   type;
  79         unsigned long   hwid;
  80         unsigned long   nrports;
  81 } companel_t;
  82 
  83 typedef struct {
  84         unsigned long   brd;
  85         unsigned long   type;
  86         unsigned long   hwid;
  87         unsigned long   state;
  88         unsigned long   ioaddr;
  89         unsigned long   ioaddr2;
  90         unsigned long   memaddr;
  91         unsigned long   irq;
  92         unsigned long   nrpanels;
  93         unsigned long   nrports;
  94         companel_t      panels[COM_MAXPANELS];
  95 } combrd_t;
  96 
  97 
  98 /*
  99  *      Define the ioctl operations for stats stuff.
 100  */
 101 #include <linux/ioctl.h>
 102 
 103 #define COM_GETPORTSTATS        _IO('c',30)
 104 #define COM_CLRPORTSTATS        _IO('c',31)
 105 #define COM_GETBRDSTATS         _IO('c',32)
 106 
 107 
 108 /*
 109  *      Define the set of ioctls that give user level access to the
 110  *      private port, panel and board structures. The argument required
 111  *      will be driver dependent!  
 112  */
 113 #define COM_READPORT            _IO('c',40)
 114 #define COM_READBOARD           _IO('c',41)
 115 #define COM_READPANEL           _IO('c',42)
 116 
 117 /*****************************************************************************/
 118 #endif

/* [previous][next][first][last][top][bottom][index][help] */