home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / warphead.zip / H / NETSTATS.H < prev    next >
C/C++ Source or Header  |  1997-09-05  |  10KB  |  203 lines

  1. /**************************************************************************/
  2. /*                                                                        */
  3. /*              IBM OS/2(tm) File and Print Client Services               */
  4. /* (c) Copyright International Business Machines Corporation, 1988, 1996  */
  5. /*                                                                        */
  6. /**************************************************************************/
  7. /********************************************************************/
  8.  
  9. /********************************************************************
  10.  *                                                                  *
  11.  *  About this file ...  NETSTATS.H                                 *
  12.  *                                                                  *
  13.  *  This file contains information about the NetStatistics APIs.    *
  14.  *                                                                  *
  15.  *      Function prototypes.                                        *
  16.  *                                                                  *
  17.  *      Data structure templates.                                   *
  18.  *                                                                  *
  19.  *      Definition of special values.                               *
  20.  *                                                                  *
  21.  *                                                                  *
  22.  *  NOTE:  You must include NETCONS.H before this file, since this  *
  23.  *         file depends on values defined in NETCONS.H.             *
  24.  *                                                                  *
  25.  ********************************************************************/
  26.  
  27.  
  28.  
  29. #ifndef NETSTATS_INCLUDED
  30.  
  31. #define NETSTATS_INCLUDED
  32. #define NETSTATS_INC
  33.  
  34. #ifdef  ANY_32_BIT
  35. #pragma pack(1)
  36. #endif
  37.  
  38.  
  39. /****************************************************************
  40.  *                                                              *
  41.  *              Function prototypes                             *
  42.  *                                                              *
  43.  ****************************************************************/
  44.  
  45. extern API_FUNCTION
  46.   NetStatisticsClear ( const unsigned char LSFAR * pszServer );
  47.  
  48. extern API_FUNCTION
  49.   NetStatisticsGet ( const unsigned char LSFAR *     pszServer,
  50.                      unsigned char LSFAR *           pbBuffer,
  51.                      unsigned short         cbBuffer,
  52.                      unsigned short LSFAR * pcbReturned,
  53.                      unsigned short LSFAR * pcbTotalAvail );
  54.  
  55. extern API_FUNCTION
  56.   NetStatisticsGet2 ( const unsigned char LSFAR *     pszServer,
  57.                       const unsigned char LSFAR *     pszService,
  58.                       unsigned long          ulReserved,
  59.                       short                  sLevel,
  60.                       unsigned long          flOptions,
  61.                       unsigned char LSFAR *           pbBuffer,
  62.                       unsigned short         cbBuffer,
  63.                       unsigned short LSFAR * pcbTotalAvail );
  64.  
  65.  
  66. #ifdef PURE_32
  67. /****************************************************************
  68.  *                                                              *
  69.  *                Function prototypes                           *
  70.  *           For "pure" 32-bit applications                     *
  71.  *                                                              *
  72.  ****************************************************************/
  73.  
  74. extern API32_FUNCTION
  75.   Net32StatisticsGet2 ( const unsigned char * pszServer,
  76.                         const unsigned char * pszService,
  77.                         unsigned long         ulReserved,
  78.                         unsigned long         ulLevel,      /*was signed short*/
  79.                         unsigned long         flOptions,
  80.                         unsigned char       * pbBuffer,
  81.                         unsigned long         ulBuffer,        /*was USHORT*/
  82.                         unsigned long       * pulTotalAvail ); /*was PUSHORT*/
  83. #endif /* PURE_32 */
  84.  
  85.  
  86. /****************************************************************
  87.  *                                                              *
  88.  *              Special values and constants                    *
  89.  *                                                              *
  90.  ****************************************************************/
  91.  
  92.  
  93. #define STATSOPT_CLR    1
  94. #define STATS_NO_VALUE  ((unsigned long) -1L)
  95. #define STATS_OVERFLOW  ((unsigned long) -2L)
  96.  
  97.  
  98. /****************************************************************
  99.  *                                                              *
  100.  *              Data structure templates                        *
  101.  *                                                              *
  102.  ****************************************************************/
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109. struct statistics_info_0 {
  110.     unsigned long   st0_start;        /* time statistics collection started   */
  111.     unsigned long   st0_wknumNCBs;    /* # workstation NCBs issued            */
  112.     unsigned long   st0_wkfiNCBs;     /* # workstation NCBs failed issue      */
  113.     unsigned long   st0_wkfcNCBs;     /* # workstation NCBs failed completion */
  114.     unsigned long   st0_wksesstart;   /* # workstation sessions started       */
  115.     unsigned long   st0_wksessfail;   /* # workstation session failures       */
  116.     unsigned long   st0_wkuses;       /* # workstation uses                   */
  117.     unsigned long   st0_wkusefail;    /* # workstation use failures           */
  118.     unsigned long   st0_wkautorec;    /* # workstation auto-reconnects        */
  119.     unsigned long   st0_rdrnumNCBs;   /* # redir NCBs issued                  */
  120.     unsigned long   st0_srvnumNCBs;   /* # NCBs issued for the server         */
  121.     unsigned long   st0_usrnumNCBs;   /* # user NCBs issued                   */
  122.     unsigned long   st0_reserved4;    /* reserved for future use              */
  123.     unsigned long   st0_reserved5;    /* reserved for future use              */
  124.     unsigned long   st0_reserved6;    /* reserved for future use              */
  125.     unsigned long   st0_reserved7;    /* reserved for future use              */
  126.     unsigned long   st0_reserved8;    /* reserved for future use              */
  127.     unsigned long   st0_svfopens;     /* # of server file opens               */
  128.     unsigned long   st0_svdevopens;   /* # of server device opens             */
  129.     unsigned long   st0_svjobsqueued; /* # of server print jobs spooled       */
  130.     unsigned long   st0_svsopens;     /* # of server session starts           */
  131.     unsigned long   st0_svstimedout;  /* # of server session auto-disconnects */
  132.     unsigned long   st0_svserrorout;  /* # of server sessions errored out     */
  133.     unsigned long   st0_svpwerrors;   /* # of server password violations      */
  134.     unsigned long   st0_svpermerrors; /* # of server access permission errors */
  135.     unsigned long   st0_svsyserrors;  /* # of server system errors            */
  136.     unsigned long   st0_svbytessent;  /* # of server bytes sent to net        */
  137.     unsigned long   st0_svbytesrcvd;  /* # of server bytes received from net  */
  138.     unsigned long   st0_svavresponse; /* average server response time in msec */
  139. }; /* statistics_info_0 */
  140.  
  141.  
  142.  
  143. struct stat_workstation_0  {
  144.         unsigned long  stw0_start;
  145.         unsigned long  stw0_numNCB_r;
  146.         unsigned long  stw0_numNCB_s;
  147.         unsigned long  stw0_numNCB_a;
  148.         unsigned long  stw0_fiNCB_r;
  149.         unsigned long  stw0_fiNCB_s;
  150.         unsigned long  stw0_fiNCB_a;
  151.         unsigned long  stw0_fcNCB_r;
  152.         unsigned long  stw0_fcNCB_s;
  153.         unsigned long  stw0_fcNCB_a;
  154.         unsigned long  stw0_sesstart;
  155.         unsigned long  stw0_sessfailcon;
  156.         unsigned long  stw0_sessbroke;
  157.         unsigned long  stw0_uses;
  158.         unsigned long  stw0_usefail;
  159.         unsigned long  stw0_autorec;
  160.         unsigned long  stw0_bytessent_r_lo;
  161.         unsigned long  stw0_bytessent_r_hi;
  162.         unsigned long  stw0_bytesrcvd_r_lo;
  163.         unsigned long  stw0_bytesrcvd_r_hi;
  164.         unsigned long  stw0_bytessent_s_lo;
  165.         unsigned long  stw0_bytessent_s_hi;
  166.         unsigned long  stw0_bytesrcvd_s_lo;
  167.         unsigned long  stw0_bytesrcvd_s_hi;
  168.         unsigned long  stw0_bytessent_a_lo;
  169.         unsigned long  stw0_bytessent_a_hi;
  170.         unsigned long  stw0_bytesrcvd_a_lo;
  171.         unsigned long  stw0_bytesrcvd_a_hi;
  172.         unsigned long  stw0_reqbufneed;
  173.         unsigned long  stw0_bigbufneed;
  174. }; /* stat_workstation_0 */
  175.  
  176.  
  177. struct stat_server_0  {
  178.         unsigned long  sts0_start;
  179.         unsigned long  sts0_fopens;
  180.         unsigned long  sts0_devopens;
  181.         unsigned long  sts0_jobsqueued;
  182.         unsigned long  sts0_sopens;
  183.         unsigned long  sts0_stimedout;
  184.         unsigned long  sts0_serrorout;
  185.         unsigned long  sts0_pwerrors;
  186.         unsigned long  sts0_permerrors;
  187.         unsigned long  sts0_syserrors;
  188.         unsigned long  sts0_bytessent_low;
  189.         unsigned long  sts0_bytessent_high;
  190.         unsigned long  sts0_bytesrcvd_low;
  191.         unsigned long  sts0_bytesrcvd_high;
  192.         unsigned long  sts0_avresponse;
  193.         unsigned long  sts0_reqbufneed;
  194.         unsigned long  sts0_bigbufneed;
  195. }; /* stat_server_0 */
  196.  
  197.  
  198. #ifdef  ANY_32_BIT
  199. #pragma pack()
  200. #endif
  201.  
  202. #endif /* NETSTATS_INCLUDED */
  203.