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.

96 lines
2.3 KiB

  1. /*++
  2. Copyright (c) 1995-1996 Microsoft Corporation
  3. Module Name :
  4. auxctrs.h
  5. Abstract:
  6. This module defines the auxiliary counters for FTP server
  7. Author:
  8. Murali R. Krishnan ( MuraliK ) 06-Feb-1996
  9. Environment:
  10. Windows NT - User Mode
  11. Project:
  12. FTP Server DLL
  13. Revision History:
  14. --*/
  15. # ifndef _FTP_AUX_COUNTERS_HXX_
  16. # define _FTP_AUX_COUNTERS_HXX_
  17. /************************************************************
  18. * Include Headers
  19. ************************************************************/
  20. /************************************************************
  21. * Symbolic Definitions
  22. ************************************************************/
  23. typedef enum { // Fac - stands for Ftp Aux Counters
  24. FacUnknownCommands = 0, // cumulative counter
  25. CacTimeoutWhenProcessing, // cumulative
  26. CacTimeoutInDisconnect, // cumulative
  27. FacPassiveDataListens, // active counter
  28. FacSimulatedAborts, // cumulative counter
  29. FacPassiveDataConnections, // cumulative counter
  30. FacActiveDataConnections, // cumulative counter
  31. FacFilesOpened, // cumulative counter
  32. FacFilesClosed, // cumulative counter
  33. FacFilesInvalid, // cumulative counter
  34. FacMaxCounters
  35. } ENUM_FTP_AUX_COUNTER;
  36. #ifdef FTP_AUX_COUNTERS
  37. # define NUM_AUX_COUNTERS (FacMaxCounters)
  38. //
  39. // Macros for operating on these counters
  40. //
  41. # define FacIncrement( facCounter) \
  42. (((facCounter) < FacMaxCounters) ? \
  43. InterlockedIncrement( g_AuxCounters+(facCounter)) : \
  44. 0)
  45. # define FacDecrement( facCounter) \
  46. (((facCounter) < FacMaxCounters) ? \
  47. InterlockedDecrement( g_AuxCounters+(facCounter)) : \
  48. 0)
  49. # define FacCounter( facCounter) \
  50. (((facCounter) < FacMaxCounters) ? g_AuxCounters[facCounter] : 0)
  51. extern LONG g_AuxCounters[];
  52. # else // FTP_AUX_COUNTERS
  53. # define NUM_AUX_COUNTERS (0)
  54. # define FacIncrement( facCounter) (0) /* do nothing */
  55. # define FacDecrement( facCounter) (0) /* do nothing */
  56. # define FacCounter(facCounter) (0) /* do nothing */
  57. #endif // FTP_AUX_COUNTERS
  58. # endif // _FTP_AUX_COUNTERS_HXX_
  59. /************************ End of File ***********************/