home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / detk45he.zip / NETSTATS.H < prev    next >
C/C++ Source or Header  |  1999-04-29  |  10KB  |  205 lines

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