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.

236 lines
5.4 KiB

  1. /**********************************************************************/
  2. /** Microsoft Windows NT **/
  3. /** Copyright(c) Microsoft Corp., 1993 **/
  4. /**********************************************************************/
  5. /*
  6. DHCPdata.c
  7. Constant data structures for the FTP Server's counter objects &
  8. counters.
  9. FILE HISTORY:
  10. KeithMo 07-Jun-1993 Created.
  11. */
  12. #define UNICODE 1
  13. #include <windows.h>
  14. #include <winperf.h>
  15. #include "dhcpctrs.h"
  16. #include "datadhcp.h"
  17. //
  18. // Initialize the constant portitions of these data structure.
  19. // Certain parts (especially the name/help indices) will be
  20. // updated at initialization time.
  21. //
  22. //
  23. // DO NOT CHANGE THE ORDER HERE --- THAT WILL GIVE TROBULE TO
  24. // THE SERVICE (global.h struct Stats definition).
  25. //
  26. DHCPDATA_DATA_DEFINITION DhcpDataDataDefinition =
  27. {
  28. { // DHCPDataObjectType
  29. sizeof(DHCPDATA_DATA_DEFINITION) + DHCPDATA_SIZE_OF_PERFORMANCE_DATA,
  30. sizeof(DHCPDATA_DATA_DEFINITION),
  31. sizeof(PERF_OBJECT_TYPE),
  32. DHCPCTRS_COUNTER_OBJECT,
  33. 0,
  34. DHCPCTRS_COUNTER_OBJECT,
  35. 0,
  36. PERF_DETAIL_ADVANCED,
  37. NUMBER_OF_DHCPDATA_COUNTERS,
  38. 2, // Default = Bytes Total/sec
  39. PERF_NO_INSTANCES,
  40. 0,
  41. { 0, 0 },
  42. { 0, 0 }
  43. },
  44. { // PacketsReceived
  45. sizeof(PERF_COUNTER_DEFINITION),
  46. DHCPCTRS_PACKETS_RECEIVED,
  47. 0,
  48. DHCPCTRS_PACKETS_RECEIVED,
  49. 0,
  50. 0,
  51. PERF_DETAIL_ADVANCED,
  52. PERF_COUNTER_COUNTER,
  53. sizeof(DWORD),
  54. DHCPDATA_PACKETS_RECEIVED_OFFSET,
  55. },
  56. { // PacketsDuplicate
  57. sizeof(PERF_COUNTER_DEFINITION),
  58. DHCPCTRS_PACKETS_DUPLICATE,
  59. 0,
  60. DHCPCTRS_PACKETS_DUPLICATE,
  61. 0,
  62. 0,
  63. PERF_DETAIL_ADVANCED,
  64. PERF_COUNTER_COUNTER,
  65. sizeof(DWORD),
  66. DHCPDATA_PACKETS_DUPLICATE_OFFSET,
  67. },
  68. { // PacketsExpired
  69. sizeof(PERF_COUNTER_DEFINITION),
  70. DHCPCTRS_PACKETS_EXPIRED,
  71. 0,
  72. DHCPCTRS_PACKETS_EXPIRED,
  73. 0,
  74. 0,
  75. PERF_DETAIL_ADVANCED,
  76. PERF_COUNTER_COUNTER,
  77. sizeof(DWORD),
  78. DHCPDATA_PACKETS_EXPIRED_OFFSET,
  79. },
  80. { // MilliSecondsPerPacket
  81. sizeof(PERF_COUNTER_DEFINITION),
  82. DHCPCTRS_MILLISECONDS_PER_PACKET,
  83. 0,
  84. DHCPCTRS_MILLISECONDS_PER_PACKET,
  85. 0,
  86. 0,
  87. PERF_DETAIL_ADVANCED,
  88. PERF_SIZE_DWORD | PERF_TYPE_NUMBER | PERF_NUMBER_DECIMAL,
  89. sizeof(DWORD),
  90. DHCPDATA_MILLISECONDS_PER_PACKET_OFFSET,
  91. },
  92. { // ActiveQueuePackets
  93. sizeof(PERF_COUNTER_DEFINITION),
  94. DHCPCTRS_PACKETS_IN_ACTIVE_QUEUE,
  95. 0,
  96. DHCPCTRS_PACKETS_IN_ACTIVE_QUEUE,
  97. 0,
  98. 0,
  99. PERF_DETAIL_ADVANCED,
  100. PERF_SIZE_DWORD | PERF_TYPE_NUMBER | PERF_NUMBER_DECIMAL,
  101. sizeof(DWORD),
  102. DHCPDATA_PACKETS_IN_ACTIVE_QUEUE_OFFSET,
  103. },
  104. { // PingQueuePackets
  105. sizeof(PERF_COUNTER_DEFINITION),
  106. DHCPCTRS_PACKETS_IN_PING_QUEUE,
  107. 0,
  108. DHCPCTRS_PACKETS_IN_PING_QUEUE,
  109. 0,
  110. 0,
  111. PERF_DETAIL_ADVANCED,
  112. PERF_SIZE_DWORD | PERF_TYPE_NUMBER | PERF_NUMBER_DECIMAL,
  113. sizeof(DWORD),
  114. DHCPDATA_PACKETS_IN_PING_QUEUE_OFFSET,
  115. },
  116. { // Discovers
  117. sizeof(PERF_COUNTER_DEFINITION),
  118. DHCPCTRS_DISCOVERS,
  119. 0,
  120. DHCPCTRS_DISCOVERS,
  121. 0,
  122. 0,
  123. PERF_DETAIL_ADVANCED,
  124. PERF_COUNTER_COUNTER,
  125. sizeof(DWORD),
  126. DHCPDATA_DISCOVERS_OFFSET,
  127. },
  128. { // Offers
  129. sizeof(PERF_COUNTER_DEFINITION),
  130. DHCPCTRS_OFFERS,
  131. 0,
  132. DHCPCTRS_OFFERS,
  133. 0,
  134. 0,
  135. PERF_DETAIL_ADVANCED,
  136. PERF_COUNTER_COUNTER,
  137. sizeof(DWORD),
  138. DHCPDATA_OFFERS_OFFSET,
  139. },
  140. { // Requests
  141. sizeof(PERF_COUNTER_DEFINITION),
  142. DHCPCTRS_REQUESTS,
  143. 0,
  144. DHCPCTRS_REQUESTS,
  145. 0,
  146. 0,
  147. PERF_DETAIL_ADVANCED,
  148. PERF_COUNTER_COUNTER,
  149. sizeof(DWORD),
  150. DHCPDATA_REQUESTS_OFFSET,
  151. },
  152. { // Informs
  153. sizeof(PERF_COUNTER_DEFINITION),
  154. DHCPCTRS_INFORMS,
  155. 0,
  156. DHCPCTRS_INFORMS,
  157. 0,
  158. 0,
  159. PERF_DETAIL_ADVANCED,
  160. PERF_COUNTER_COUNTER,
  161. sizeof(DWORD),
  162. DHCPDATA_INFORMS_OFFSET,
  163. },
  164. { // Acks
  165. sizeof(PERF_COUNTER_DEFINITION),
  166. DHCPCTRS_ACKS,
  167. 0,
  168. DHCPCTRS_ACKS,
  169. 0,
  170. 0,
  171. PERF_DETAIL_ADVANCED,
  172. PERF_COUNTER_COUNTER,
  173. sizeof(DWORD),
  174. DHCPDATA_ACKS_OFFSET,
  175. },
  176. { // Nacks
  177. sizeof(PERF_COUNTER_DEFINITION),
  178. DHCPCTRS_NACKS,
  179. 0,
  180. DHCPCTRS_NACKS,
  181. 0,
  182. 0,
  183. PERF_DETAIL_ADVANCED,
  184. PERF_COUNTER_COUNTER,
  185. sizeof(DWORD),
  186. DHCPDATA_NACKS_OFFSET
  187. },
  188. { // Declines
  189. sizeof(PERF_COUNTER_DEFINITION),
  190. DHCPCTRS_DECLINES,
  191. 0,
  192. DHCPCTRS_DECLINES,
  193. 0,
  194. 0,
  195. PERF_DETAIL_ADVANCED,
  196. PERF_COUNTER_COUNTER,
  197. sizeof(DWORD),
  198. DHCPDATA_DECLINES_OFFSET
  199. },
  200. { // Releases
  201. sizeof(PERF_COUNTER_DEFINITION),
  202. DHCPCTRS_RELEASES,
  203. 0,
  204. DHCPCTRS_RELEASES,
  205. 0,
  206. 0,
  207. PERF_DETAIL_ADVANCED,
  208. PERF_COUNTER_COUNTER,
  209. sizeof(DWORD),
  210. DHCPDATA_RELEASES_OFFSET,
  211. }
  212. };