Source code of Windows XP (NT5)
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.

120 lines
3.5 KiB

  1. /**********************************************************************/
  2. /** Microsoft Windows NT **/
  3. /** Copyright(c) Microsoft Corp., 1993 **/
  4. /**********************************************************************/
  5. /*
  6. ftpdata.h
  7. Extensible object definitions for the FTP Server's counter
  8. objects & counters.
  9. FILE HISTORY:
  10. KeithMo 07-Jun-1993 Created.
  11. */
  12. #ifndef _FTPDATA_H_
  13. #define _FTPDATA_H_
  14. #pragma pack(8)
  15. //
  16. // The counter structure returned.
  17. //
  18. typedef struct _FTPD_DATA_DEFINITION
  19. {
  20. PERF_OBJECT_TYPE FtpdObjectType;
  21. PERF_COUNTER_DEFINITION FtpdBytesSent;
  22. PERF_COUNTER_DEFINITION FtpdBytesReceived;
  23. PERF_COUNTER_DEFINITION FtpdBytesTotal;
  24. PERF_COUNTER_DEFINITION FtpdFilesSent;
  25. PERF_COUNTER_DEFINITION FtpdFilesReceived;
  26. PERF_COUNTER_DEFINITION FtpdFilesTotal;
  27. PERF_COUNTER_DEFINITION FtpdCurrentAnonymous;
  28. PERF_COUNTER_DEFINITION FtpdCurrentNonAnonymous;
  29. PERF_COUNTER_DEFINITION FtpdTotalAnonymous;
  30. PERF_COUNTER_DEFINITION FtpdTotalNonAnonymous;
  31. PERF_COUNTER_DEFINITION FtpdMaxAnonymous;
  32. PERF_COUNTER_DEFINITION FtpdMaxNonAnonymous;
  33. PERF_COUNTER_DEFINITION FtpdCurrentConnections;
  34. PERF_COUNTER_DEFINITION FtpdMaxConnections;
  35. PERF_COUNTER_DEFINITION FtpdConnectionAttempts;
  36. PERF_COUNTER_DEFINITION FtpdLogonAttempts;
  37. PERF_COUNTER_DEFINITION FtpdServiceUptime;
  38. // These counters are currently meaningless, but should be restored if we
  39. // ever enable per-FTP-instance bandwidth throttling.
  40. /*
  41. PERF_COUNTER_DEFINITION FtpdAllowedRequests;
  42. PERF_COUNTER_DEFINITION FtpdRejectedRequests;
  43. PERF_COUNTER_DEFINITION FtpdBlockedRequests;
  44. PERF_COUNTER_DEFINITION FtpdCurrentBlockedRequests;
  45. PERF_COUNTER_DEFINITION FtpdMeasuredBandwidth;
  46. */
  47. } FTPD_DATA_DEFINITION;
  48. typedef struct _FTPD_COUNTER_BLOCK
  49. {
  50. PERF_COUNTER_BLOCK PerfCounterBlock;
  51. LONGLONG BytesSent;
  52. LONGLONG BytesReceived;
  53. LONGLONG BytesTotal;
  54. DWORD FilesSent;
  55. DWORD FilesReceived;
  56. DWORD FilesTotal;
  57. DWORD CurrentAnonymous;
  58. DWORD CurrentNonAnonymous;
  59. DWORD TotalAnonymous;
  60. DWORD TotalNonAnonymous;
  61. DWORD MaxAnonymous;
  62. DWORD MaxNonAnonymous;
  63. DWORD CurrentConnections;
  64. DWORD MaxConnections;
  65. DWORD ConnectionAttempts;
  66. DWORD LogonAttempts;
  67. DWORD ServiceUptime;
  68. // These counters are currently meaningless, but should be restored if we
  69. // ever enable per-FTP-instance bandwidth throttling.
  70. /*
  71. DWORD AllowedRequests;
  72. DWORD RejectedRequests;
  73. DWORD BlockedRequests;
  74. DWORD CurrentBlockedRequests;
  75. DWORD MeasuredBandwidth;
  76. */
  77. } FTPD_COUNTER_BLOCK;
  78. //
  79. // The routines that load these structures assume that all fields
  80. // are DWORD packed & aligned.
  81. //
  82. extern FTPD_DATA_DEFINITION FtpdDataDefinition;
  83. #define NUMBER_OF_FTPD_COUNTERS ((sizeof(FTPD_DATA_DEFINITION) - \
  84. sizeof(PERF_OBJECT_TYPE)) / \
  85. sizeof(PERF_COUNTER_DEFINITION))
  86. //
  87. // Restore default packing & alignment.
  88. //
  89. #pragma pack()
  90. #endif // _FTPDATA_H_