Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

153 lines
2.8 KiB

  1. /*++
  2. Copyright (c) 1996 Microsoft Corporation
  3. Module Name :
  4. pwsdata.hxx
  5. Abstract:
  6. Contains the declaration of the data structures used by the
  7. PWS admin.
  8. Author:
  9. Johnson Apacible (JohnsonA) 09-Dec-1996
  10. Boyd Multerer (BoydM) Feb - April 1997
  11. Environment:
  12. Win32 User Mode
  13. --*/
  14. #ifndef _PWS_DATA_HXX_
  15. #define _PWS_DATA_HXX_
  16. #include <time.h>
  17. //
  18. // Signature
  19. //
  20. #define PWS_DATA_SIGNATURE (DWORD)'DSWP'
  21. //
  22. // name of shared memory structure
  23. //
  24. #define PWS_DATA_SPACE_NAME "Pws_DataSpace"
  25. //
  26. // Contains info on the URLs accessed
  27. //
  28. typedef struct _URL_PAGES_DATA {
  29. CHAR Page[MAX_PATH+1];
  30. DWORD nAccessed;
  31. } URL_PAGES_DATA, *PURL_PAGES_DATA;
  32. #define MAX_URL_PAGES 5
  33. #define MAX_CLIENTS 10
  34. // stucture use by client to access data for one time period
  35. typedef struct _PWS_DATA_PERIOD
  36. {
  37. // total number of sessions
  38. DWORD nTotalSessions;
  39. // number of hits
  40. DWORD nHits;
  41. // number of bytes
  42. DWORD nBytesSent;
  43. } PWS_DATA_PERIOD, *PPWS_DATA_PERIOD;
  44. //
  45. // structure used by client to get data
  46. //
  47. typedef struct _PWS_DATA {
  48. // time the server was started
  49. SYSTEMTIME timeStart;
  50. // time of last increment
  51. // DWORD year;
  52. // DWORD dayofyear;
  53. // DWORD hour;
  54. time_t time_hour;
  55. time_t time_day;
  56. // total number of sessions since server start
  57. DWORD nTotalSessionsStart;
  58. // max number of concurrent sessions since server start
  59. DWORD nMaxSessionsStart;
  60. // number of hits since server start
  61. DWORD nHitsStart;
  62. // number of bytes since server start
  63. DWORD nBytesSentStart;
  64. // current number of sessions this time period
  65. DWORD nSessions;
  66. // total number of sessions this time period
  67. // DWORD nTotalSessions;
  68. // number of hits this time period
  69. // DWORD nHits;
  70. // number of bytes this time period
  71. // DWORD nBytesSent;
  72. // recorded data for the last 24 hours
  73. PWS_DATA_PERIOD rgbHourData[24];
  74. // recorded data for the last 7 days
  75. PWS_DATA_PERIOD rgbDayData[7];
  76. } PWS_DATA, *PPWS_DATA;
  77. //
  78. // The shared memory between app and filter
  79. //
  80. typedef struct _PWS_DATA_PRIVATE {
  81. //
  82. // size of this shared memory
  83. //
  84. DWORD dwSize;
  85. //
  86. // Signature
  87. //
  88. DWORD Signature;
  89. //
  90. // Data
  91. //
  92. PWS_DATA PwsStats;
  93. } PWS_DATA_PRIVATE, *PPWS_DATA_PRIVATE;
  94. //
  95. // Gets PWS data
  96. //
  97. BOOL
  98. GetPwsData(
  99. IN OUT PPWS_DATA Data
  100. );
  101. #endif // PWS_DATA