home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / lansystk.zip / INCLUDE / LANSERV / NETSTATS.H < prev    next >
C/C++ Source or Header  |  1998-05-08  |  9KB  |  211 lines

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