home *** CD-ROM | disk | FTP | other *** search
/ C Programming Starter Kit 2.0 / SamsPublishing-CProgrammingStarterKit-v2.0-Win31.iso / bc45 / msinc.pak / LMSTATS.H < prev    next >
C/C++ Source or Header  |  1997-07-23  |  5KB  |  201 lines

  1. /*++ BUILD Version: 0001    // Increment this if a change has global effects
  2.  
  3. Module Name:
  4.  
  5.     lmstats.h
  6.  
  7. Abstract:
  8.  
  9.     This module defines the API function prototypes and data structures
  10.     for the following groups of NT API functions:
  11.         NetStatistics
  12.  
  13. Author:
  14.  
  15.     Dan Lafferty (danl)  29-Mar-1991
  16.  
  17. Environment:
  18.  
  19.     User Mode - Win32
  20.  
  21. Notes:
  22.  
  23.     You must include NETCONS.H before this file, since this file depends
  24.     on values defined in NETCONS.H.
  25.  
  26. Revision History:
  27.  
  28.     28-Mar-1991  Danl
  29.         Ported from LM2.0 and the LMNETAPI spec.
  30.  
  31. --*/
  32.  
  33. /*
  34.  *      C/C++ Run Time Library - Version 6.5
  35.  *
  36.  *      Copyright (c) 1994 by Borland International
  37.  *      All Rights Reserved.
  38.  *
  39.  */
  40.  
  41. #ifndef _LMSTATS_
  42. #define _LMSTATS_
  43. #define __LMSTATS_H
  44.  
  45. #ifdef __cplusplus
  46. extern "C" {
  47. #endif
  48.  
  49. //
  50. // Function Prototypes - Statistics
  51. //
  52.  
  53. NET_API_STATUS NET_API_FUNCTION
  54. NetStatisticsGet (
  55.     IN  LPTSTR  server,
  56.     IN  LPTSTR  service,
  57.     IN  DWORD   level,
  58.     IN  DWORD   options,
  59.     OUT LPBYTE  *bufptr
  60.     );
  61.  
  62. //
  63. // Data Structures - Statistics
  64. //
  65.  
  66. #ifdef LM20_WORKSTATION_STATISTICS
  67. typedef struct _STAT_WORKSTATION_0 {
  68.      DWORD          stw0_start;
  69.      DWORD          stw0_numNCB_r;
  70.      DWORD          stw0_numNCB_s;
  71.      DWORD          stw0_numNCB_a;
  72.      DWORD          stw0_fiNCB_r;
  73.      DWORD          stw0_fiNCB_s;
  74.      DWORD          stw0_fiNCB_a;
  75.      DWORD          stw0_fcNCB_r;
  76.      DWORD          stw0_fcNCB_s;
  77.      DWORD          stw0_fcNCB_a;
  78.      DWORD          stw0_sesstart;
  79.      DWORD          stw0_sessfailcon;
  80.      DWORD          stw0_sessbroke;
  81.      DWORD          stw0_uses;
  82.      DWORD          stw0_usefail;
  83.      DWORD          stw0_autorec;
  84.      DWORD          stw0_bytessent_r_lo;
  85.      DWORD          stw0_bytessent_r_hi;
  86.      DWORD          stw0_bytesrcvd_r_lo;
  87.      DWORD          stw0_bytesrcvd_r_hi;
  88.      DWORD          stw0_bytessent_s_lo;
  89.      DWORD          stw0_bytessent_s_hi;
  90.      DWORD          stw0_bytesrcvd_s_lo;
  91.      DWORD          stw0_bytesrcvd_s_hi;
  92.      DWORD          stw0_bytessent_a_lo;
  93.      DWORD          stw0_bytessent_a_hi;
  94.      DWORD          stw0_bytesrcvd_a_lo;
  95.      DWORD          stw0_bytesrcvd_a_hi;
  96.      DWORD          stw0_reqbufneed;
  97.      DWORD          stw0_bigbufneed;
  98. } STAT_WORKSTATION_0, *PSTAT_WORKSTATION_0, *LPSTAT_WORKSTATION_0;
  99. #else
  100.  
  101. //
  102. // NB: The following structure is REDIR_STATISTICS in sdk\inc\ntddnfs.h. If you
  103. //     change the structure, change it in both places
  104. //
  105.  
  106. typedef struct _STAT_WORKSTATION_0 {
  107.     LARGE_INTEGER   StatisticsStartTime;
  108.  
  109.     LARGE_INTEGER   BytesReceived;
  110.     LARGE_INTEGER   SmbsReceived;
  111.     LARGE_INTEGER   PagingReadBytesRequested;
  112.     LARGE_INTEGER   NonPagingReadBytesRequested;
  113.     LARGE_INTEGER   CacheReadBytesRequested;
  114.     LARGE_INTEGER   NetworkReadBytesRequested;
  115.  
  116.     LARGE_INTEGER   BytesTransmitted;
  117.     LARGE_INTEGER   SmbsTransmitted;
  118.     LARGE_INTEGER   PagingWriteBytesRequested;
  119.     LARGE_INTEGER   NonPagingWriteBytesRequested;
  120.     LARGE_INTEGER   CacheWriteBytesRequested;
  121.     LARGE_INTEGER   NetworkWriteBytesRequested;
  122.  
  123.     DWORD           InitiallyFailedOperations;
  124.     DWORD           FailedCompletionOperations;
  125.  
  126.     DWORD           ReadOperations;
  127.     DWORD           RandomReadOperations;
  128.     DWORD           ReadSmbs;
  129.     DWORD           LargeReadSmbs;
  130.     DWORD           SmallReadSmbs;
  131.  
  132.     DWORD           WriteOperations;
  133.     DWORD           RandomWriteOperations;
  134.     DWORD           WriteSmbs;
  135.     DWORD           LargeWriteSmbs;
  136.     DWORD           SmallWriteSmbs;
  137.  
  138.     DWORD           RawReadsDenied;
  139.     DWORD           RawWritesDenied;
  140.  
  141.     DWORD           NetworkErrors;
  142.  
  143.     //  Connection/Session counts
  144.     DWORD           Sessions;
  145.     DWORD           FailedSessions;
  146.     DWORD           Reconnects;
  147.     DWORD           CoreConnects;
  148.     DWORD           Lanman20Connects;
  149.     DWORD           Lanman21Connects;
  150.     DWORD           LanmanNtConnects;
  151.     DWORD           ServerDisconnects;
  152.     DWORD           HungSessions;
  153.     DWORD           UseCount;
  154.     DWORD           FailedUseCount;
  155.  
  156.     //
  157.     //  Queue Lengths (updates protected by RdrMpxTableSpinLock NOT
  158.     //  RdrStatisticsSpinlock)
  159.     //
  160.  
  161.     DWORD           CurrentCommands;
  162.  
  163. } STAT_WORKSTATION_0, *PSTAT_WORKSTATION_0, *LPSTAT_WORKSTATION_0;
  164. #endif
  165.  
  166. typedef struct _STAT_SERVER_0 {
  167.      DWORD          sts0_start;
  168.      DWORD          sts0_fopens;
  169.      DWORD          sts0_devopens;
  170.      DWORD          sts0_jobsqueued;
  171.      DWORD          sts0_sopens;
  172.      DWORD          sts0_stimedout;
  173.      DWORD          sts0_serrorout;
  174.      DWORD          sts0_pwerrors;
  175.      DWORD          sts0_permerrors;
  176.      DWORD          sts0_syserrors;
  177.      DWORD          sts0_bytessent_low;
  178.      DWORD          sts0_bytessent_high;
  179.      DWORD          sts0_bytesrcvd_low;
  180.      DWORD          sts0_bytesrcvd_high;
  181.      DWORD          sts0_avresponse;
  182.      DWORD          sts0_reqbufneed;
  183.      DWORD          sts0_bigbufneed;
  184. } STAT_SERVER_0, *PSTAT_SERVER_0, *LPSTAT_SERVER_0;
  185.  
  186.  
  187. //
  188. // Special Values and Constants
  189. //
  190.  
  191. #define STATSOPT_CLR    1
  192. #define STATS_NO_VALUE  ((unsigned long) -1L)
  193. #define STATS_OVERFLOW  ((unsigned long) -2L)
  194.  
  195.  
  196. #ifdef __cplusplus
  197. }
  198. #endif
  199.  
  200. #endif // _LMSTATS.H
  201.