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.

174 lines
6.2 KiB

  1. /*++
  2. copyright (c) 2002 Microsoft Corporation
  3. Module Name:
  4. dataipsec.h
  5. Abstract:
  6. Header file for IPSec Extensible Object Data Definitions
  7. Author:
  8. Avnish Kumar Chhabra 07/03/2002
  9. Revision History:
  10. --*/
  11. #ifndef _DATAIPSEC_H_
  12. #define _DATAIPSEC_H_
  13. #include <winperf.h>
  14. #include <winipsec.h>
  15. #define IPSEC_NUM_PERF_OBJECT_TYPES 1
  16. //
  17. // IPSec Counter definitions
  18. //
  19. //
  20. // Following is used in counter definitions to describe relative
  21. // position of each counter in the returned data for IPSec Driver
  22. //
  23. #define NUM_ACTIVESA_OFFSET (FIELD_OFFSET(IPSEC_DRIVER_PM_STATS,ActiveSA))
  24. #define NUM_OFFLOADEDSA_OFFSET (FIELD_OFFSET(IPSEC_DRIVER_PM_STATS,OffloadedSA))
  25. #define NUM_PENDINGKEYOPS_OFFSET (FIELD_OFFSET(IPSEC_DRIVER_PM_STATS,PendingKeyOps))
  26. #define NUM_REKEYNUM_OFFSET (FIELD_OFFSET(IPSEC_DRIVER_PM_STATS,Rekey))
  27. #define NUM_BADSPIPKTS_OFFSET (FIELD_OFFSET(IPSEC_DRIVER_PM_STATS,BadSPIPackets))
  28. #define NUM_PKTSNOTDECRYPTED_OFFSET (FIELD_OFFSET(IPSEC_DRIVER_PM_STATS,PacketsNotDecrypted))
  29. #define NUM_PKTSNOTAUTHENTICATED_OFFSET (FIELD_OFFSET(IPSEC_DRIVER_PM_STATS,PacketsNotAuthenticated))
  30. #define NUM_PKTSFAILEDREPLAY_OFFSET (FIELD_OFFSET(IPSEC_DRIVER_PM_STATS,PacketsWithReplayDetection))
  31. #define NUM_TPTBYTESSENT_OFFSET (FIELD_OFFSET(IPSEC_DRIVER_PM_STATS,TptBytesSent))
  32. #define NUM_TPTBYTESRECV_OFFSET (FIELD_OFFSET(IPSEC_DRIVER_PM_STATS,TptBytesRecv))
  33. #define NUM_TUNBYTESSENT_OFFSET (FIELD_OFFSET(IPSEC_DRIVER_PM_STATS,TunBytesSent))
  34. #define NUM_TUNBYTESRECV_OFFSET (FIELD_OFFSET(IPSEC_DRIVER_PM_STATS,TunBytesRecv))
  35. #define NUM_OFFLOADBYTESSENT_OFFSET (FIELD_OFFSET(IPSEC_DRIVER_PM_STATS,OffloadedBytesSent))
  36. #define NUM_OFFLOADBYTESRECV_OFFSET (FIELD_OFFSET(IPSEC_DRIVER_PM_STATS,OffloadedBytesRecv))
  37. #define SIZEOF_IPSEC_TOTAL_DRIVER_DATA (sizeof(IPSEC_DRIVER_PM_STATS))
  38. #define NUM_OF_IPSEC_DRIVER_COUNTERS 14 // Update this if a new IPSec Driver Counter is added
  39. //
  40. // IKE Counter definitions
  41. //
  42. //
  43. // Following is used in counter definitions to describe relative
  44. // position of each counter in the returned data for IKE keying module
  45. //
  46. #define NUM_ACQUIREHEAPSIZE_OFFSET (FIELD_OFFSET(IKE_PM_STATS,AcquireHeapSize))
  47. #define NUM_RECEIVEHEAPSIZE_OFFSET (FIELD_OFFSET(IKE_PM_STATS,ReceiveHeapSize))
  48. #define NUM_NEGFAILURE_OFFSET (FIELD_OFFSET(IKE_PM_STATS,NegFailure))
  49. #define NUM_AUTHFAILURE_OFFSET (FIELD_OFFSET(IKE_PM_STATS,AuthFailure))
  50. #define NUM_ISADBSIZE_OFFSET (FIELD_OFFSET(IKE_PM_STATS,ISADBSize))
  51. #define NUM_CONNLSIZE_OFFSET (FIELD_OFFSET(IKE_PM_STATS,ConnLSize))
  52. #define NUM_MMSA_OFFSET (FIELD_OFFSET(IKE_PM_STATS,MmSA))
  53. #define NUM_QMSA_OFFSET (FIELD_OFFSET(IKE_PM_STATS,QmSA))
  54. #define NUM_SOFTSA_OFFSET (FIELD_OFFSET(IKE_PM_STATS,SoftSA))
  55. #define SIZEOF_IPSEC_TOTAL_IKE_DATA ( sizeof(IKE_PM_STATS))
  56. #define NUM_OF_IKE_COUNTERS 9 //Update this if a new IKE counter is added
  57. typedef struct _IPSEC_DRIVER_DATA_DEFINITION
  58. {
  59. PERF_OBJECT_TYPE IPSecObjectType;
  60. PERF_COUNTER_DEFINITION ActiveSA;
  61. PERF_COUNTER_DEFINITION OffloadedSA;
  62. PERF_COUNTER_DEFINITION PendingKeyOps;
  63. PERF_COUNTER_DEFINITION Rekey;
  64. PERF_COUNTER_DEFINITION NumBadSPIPackets;
  65. PERF_COUNTER_DEFINITION NumPacketsNotDecrypted;
  66. PERF_COUNTER_DEFINITION NumPacketsNotAuthenticated;
  67. PERF_COUNTER_DEFINITION NumPacketsWithReplayDetection;
  68. PERF_COUNTER_DEFINITION TptBytesSent;
  69. PERF_COUNTER_DEFINITION TptBytesRecv;
  70. PERF_COUNTER_DEFINITION TunBytesSent;
  71. PERF_COUNTER_DEFINITION TunBytesRecv;
  72. PERF_COUNTER_DEFINITION OffloadedBytesSent;
  73. PERF_COUNTER_DEFINITION OffloadedbytesRecv;
  74. } IPSEC_DRIVER_DATA_DEFINITION, *PIPSEC_DRIVER_DATA_DEFINITION;
  75. typedef struct _IPSEC_DRIVER_PM_STATS
  76. {
  77. PERF_COUNTER_BLOCK CounterBlock;
  78. DWORD ActiveSA;
  79. DWORD OffloadedSA;
  80. DWORD PendingKeyOps;
  81. DWORD Rekey;
  82. DWORD BadSPIPackets;
  83. DWORD PacketsNotDecrypted;
  84. DWORD PacketsNotAuthenticated;
  85. DWORD PacketsWithReplayDetection;
  86. ULARGE_INTEGER TptBytesSent;
  87. ULARGE_INTEGER TptBytesRecv;
  88. ULARGE_INTEGER TunBytesSent;
  89. ULARGE_INTEGER TunBytesRecv;
  90. ULARGE_INTEGER OffloadedBytesSent;
  91. ULARGE_INTEGER OffloadedBytesRecv;
  92. } IPSEC_DRIVER_PM_STATS, * PIPSEC_DRIVER_PM_STATS;
  93. typedef struct _IKE_DATA_DEFINITION
  94. {
  95. PERF_OBJECT_TYPE IKEObjectType;
  96. PERF_COUNTER_DEFINITION AcquireHeapSize;
  97. PERF_COUNTER_DEFINITION ReceiveHeapSize;
  98. PERF_COUNTER_DEFINITION NegFailure;
  99. PERF_COUNTER_DEFINITION AuthFailure;
  100. PERF_COUNTER_DEFINITION ISADBSize;
  101. PERF_COUNTER_DEFINITION ConnLSize;
  102. PERF_COUNTER_DEFINITION MmSA;
  103. PERF_COUNTER_DEFINITION QmSA;
  104. PERF_COUNTER_DEFINITION SoftSA;
  105. } IKE_DATA_DEFINITION , *PIKE_DATA_DEFINITION ;
  106. typedef struct _IKE_PM_STATS
  107. {
  108. PERF_COUNTER_BLOCK CounterBlock;
  109. DWORD AcquireHeapSize;
  110. DWORD ReceiveHeapSize;
  111. DWORD NegFailure;
  112. DWORD AuthFailure;
  113. DWORD ISADBSize;
  114. DWORD ConnLSize;
  115. DWORD MmSA;
  116. DWORD QmSA;
  117. DWORD SoftSA;
  118. } IKE_PM_STATS, * PIKE_PM_STATS;
  119. //
  120. // Macro used to create the Perf object counter definitions
  121. //
  122. #define CREATE_COUNTER(counter,scale,detail,type,size) \
  123. { \
  124. sizeof(PERF_COUNTER_DEFINITION), \
  125. counter , \
  126. 0, \
  127. counter , \
  128. 0, \
  129. scale, \
  130. detail, \
  131. type, \
  132. size, \
  133. NUM_##counter##_OFFSET \
  134. }
  135. extern IPSEC_DRIVER_DATA_DEFINITION gIPSecDriverDataDefinition;
  136. extern IKE_DATA_DEFINITION gIKEDataDefinition;
  137. #endif //_DATAIPSEC_H_