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.

536 lines
14 KiB

  1. /*++ BUILD Version: 0002 // Increment this if a change has global effects
  2. Copyright (c) 1998-1999 Microsoft Corporation
  3. Module Name:
  4. PschdDat.c
  5. Abstract:
  6. This file declares and initializes object and counter data definitions
  7. Author:
  8. Eliot Gillum (t-eliotg) July 5, 1998
  9. Revision History
  10. --*/
  11. #include <windows.h>
  12. #include <ntddndis.h>
  13. #include "PschdPrf.h"
  14. #include "PSchdCnt.h"
  15. //
  16. // Pipe object and counter definition declarations
  17. //
  18. PERF_OBJECT_TYPE PsPipeObjType = {
  19. sizeof(PERF_OBJECT_TYPE), // TotalByteLength - to be modified later
  20. sizeof(PERF_OBJECT_TYPE), // DefinitionLength - to be modified later
  21. sizeof(PERF_OBJECT_TYPE), // HeaderLength
  22. PSCHED_PIPE_OBJ, // ObjectNameTitleIndex
  23. 0, // ObjectNameTitle
  24. PSCHED_PIPE_OBJ, // ObjectHelpTitleIndex
  25. 0, // ObjectHelpTitle
  26. PERF_DETAIL_NOVICE, // DetailLevel
  27. 0, // NumCounters - to be modified later
  28. 0, // DefaultCounter
  29. 0, // Number of object instances ( seq #)
  30. 0, // CodePage
  31. {0,0}, // Perf Time
  32. {0,0} // Perf Freq
  33. };
  34. PS_PIPE_PIPE_STAT_DEF PsPipePipeStatDef = {
  35. {
  36. sizeof(PERF_COUNTER_DEFINITION),
  37. PIPE_OUT_OF_PACKETS,
  38. 0,
  39. PIPE_OUT_OF_PACKETS,
  40. 0,
  41. 0,
  42. PERF_DETAIL_NOVICE,
  43. PERF_COUNTER_RAWCOUNT,
  44. sizeof(DWORD),
  45. PIPE_OUT_OF_PACKETS_OFFSET
  46. },
  47. {
  48. sizeof(PERF_COUNTER_DEFINITION),
  49. PIPE_FLOWS_OPENED,
  50. 0,
  51. PIPE_FLOWS_OPENED,
  52. 0,
  53. 0,
  54. PERF_DETAIL_NOVICE,
  55. PERF_COUNTER_RAWCOUNT,
  56. sizeof(DWORD),
  57. PIPE_FLOWS_OPENED_OFFSET
  58. },
  59. {
  60. sizeof(PERF_COUNTER_DEFINITION),
  61. PIPE_FLOWS_CLOSED,
  62. 0,
  63. PIPE_FLOWS_CLOSED,
  64. 0,
  65. 0,
  66. PERF_DETAIL_NOVICE,
  67. PERF_COUNTER_RAWCOUNT,
  68. sizeof(DWORD),
  69. PIPE_FLOWS_CLOSED_OFFSET
  70. },
  71. {
  72. sizeof(PERF_COUNTER_DEFINITION),
  73. PIPE_FLOWS_REJECTED,
  74. 0,
  75. PIPE_FLOWS_REJECTED,
  76. 0,
  77. 0,
  78. PERF_DETAIL_NOVICE,
  79. PERF_COUNTER_RAWCOUNT,
  80. sizeof(DWORD),
  81. PIPE_FLOWS_REJECTED_OFFSET
  82. },
  83. {
  84. sizeof(PERF_COUNTER_DEFINITION),
  85. PIPE_FLOWS_MODIFIED,
  86. 0,
  87. PIPE_FLOWS_MODIFIED,
  88. 0,
  89. 0,
  90. PERF_DETAIL_NOVICE,
  91. PERF_COUNTER_RAWCOUNT,
  92. sizeof(DWORD),
  93. PIPE_FLOWS_MODIFIED_OFFSET
  94. },
  95. {
  96. sizeof(PERF_COUNTER_DEFINITION),
  97. PIPE_FLOW_MODS_REJECTED,
  98. 0,
  99. PIPE_FLOW_MODS_REJECTED,
  100. 0,
  101. 0,
  102. PERF_DETAIL_NOVICE,
  103. PERF_COUNTER_RAWCOUNT,
  104. sizeof(DWORD),
  105. PIPE_FLOW_MODS_REJECTED_OFFSET
  106. },
  107. {
  108. sizeof(PERF_COUNTER_DEFINITION),
  109. PIPE_MAX_SIMULTANEOUS_FLOWS,
  110. 0,
  111. PIPE_MAX_SIMULTANEOUS_FLOWS,
  112. 0,
  113. 0,
  114. PERF_DETAIL_NOVICE,
  115. PERF_COUNTER_RAWCOUNT,
  116. sizeof(DWORD),
  117. PIPE_MAX_SIMULTANEOUS_FLOWS_OFFSET
  118. }
  119. };
  120. PS_PIPE_CONFORMER_STAT_DEF PsPipeConformerStatDef = {
  121. {
  122. sizeof(PERF_COUNTER_DEFINITION),
  123. PIPE_NONCONF_PACKETS_SCHEDULED,
  124. 0,
  125. PIPE_NONCONF_PACKETS_SCHEDULED,
  126. 0,
  127. 0,
  128. PERF_DETAIL_NOVICE,
  129. PERF_COUNTER_RAWCOUNT,
  130. sizeof(DWORD),
  131. PIPE_NONCONF_PACKETS_SCHEDULED_OFFSET
  132. },
  133. {
  134. sizeof(PERF_COUNTER_DEFINITION),
  135. PIPE_NONCONF_PACKETS_SCHEDULED_PERSEC,
  136. 0,
  137. PIPE_NONCONF_PACKETS_SCHEDULED_PERSEC,
  138. 0,
  139. 0,
  140. PERF_DETAIL_NOVICE,
  141. PERF_COUNTER_COUNTER,
  142. sizeof(DWORD),
  143. PIPE_NONCONF_PACKETS_SCHEDULED_OFFSET
  144. }
  145. };
  146. PS_PIPE_SHAPER_STAT_DEF PsPipeShaperStatDef = {
  147. {
  148. sizeof(PERF_COUNTER_DEFINITION),
  149. PIPE_AVE_PACKETS_IN_SHAPER,
  150. 0,
  151. PIPE_AVE_PACKETS_IN_SHAPER,
  152. 0,
  153. 0,
  154. PERF_DETAIL_NOVICE,
  155. PERF_COUNTER_RAWCOUNT,
  156. sizeof(DWORD),
  157. PIPE_AVE_PACKETS_IN_SHAPER_OFFSET
  158. },
  159. {
  160. sizeof(PERF_COUNTER_DEFINITION),
  161. PIPE_MAX_PACKETS_IN_SHAPER,
  162. 0,
  163. PIPE_MAX_PACKETS_IN_SHAPER,
  164. 0,
  165. 0,
  166. PERF_DETAIL_NOVICE,
  167. PERF_COUNTER_RAWCOUNT,
  168. sizeof(DWORD),
  169. PIPE_MAX_PACKETS_IN_SHAPER_OFFSET
  170. }
  171. };
  172. PS_PIPE_SEQUENCER_STAT_DEF PsPipeSequencerStatDef = {
  173. {
  174. sizeof(PERF_COUNTER_DEFINITION),
  175. PIPE_AVE_PACKETS_IN_SEQ,
  176. 0,
  177. PIPE_AVE_PACKETS_IN_SEQ,
  178. 0,
  179. 0,
  180. PERF_DETAIL_NOVICE,
  181. PERF_COUNTER_RAWCOUNT,
  182. sizeof(DWORD),
  183. PIPE_AVE_PACKETS_IN_SEQ_OFFSET
  184. },
  185. {
  186. sizeof(PERF_COUNTER_DEFINITION),
  187. PIPE_MAX_PACKETS_IN_SEQ,
  188. 0,
  189. PIPE_MAX_PACKETS_IN_SEQ,
  190. 0,
  191. 0,
  192. PERF_DETAIL_NOVICE,
  193. PERF_COUNTER_RAWCOUNT,
  194. sizeof(DWORD),
  195. PIPE_MAX_PACKETS_IN_SEQ_OFFSET
  196. },
  197. {
  198. sizeof(PERF_COUNTER_DEFINITION),
  199. PIPE_MAX_PACKETS_IN_NETCARD,
  200. 0,
  201. PIPE_MAX_PACKETS_IN_NETCARD,
  202. 0,
  203. 0,
  204. PERF_DETAIL_NOVICE,
  205. PERF_COUNTER_RAWCOUNT,
  206. sizeof(DWORD),
  207. PIPE_MAX_PACKETS_IN_NETCARD_OFFSET
  208. },
  209. {
  210. sizeof(PERF_COUNTER_DEFINITION),
  211. PIPE_AVE_PACKETS_IN_NETCARD,
  212. 0,
  213. PIPE_AVE_PACKETS_IN_NETCARD,
  214. 0,
  215. 0,
  216. PERF_DETAIL_NOVICE,
  217. PERF_COUNTER_RAWCOUNT,
  218. sizeof(DWORD),
  219. PIPE_AVE_PACKETS_IN_NETCARD_OFFSET
  220. },
  221. {
  222. sizeof(PERF_COUNTER_DEFINITION),
  223. PIPE_NONCONF_PACKETS_TRANSMITTED,
  224. 0,
  225. PIPE_NONCONF_PACKETS_TRANSMITTED,
  226. 0,
  227. 0,
  228. PERF_DETAIL_NOVICE,
  229. PERF_COUNTER_RAWCOUNT,
  230. sizeof(DWORD),
  231. PIPE_NONCONF_PACKETS_TRANSMITTED_OFFSET
  232. },
  233. {
  234. sizeof(PERF_COUNTER_DEFINITION),
  235. PIPE_NONCONF_PACKETS_TRANSMITTED_PERSEC,
  236. 0,
  237. PIPE_NONCONF_PACKETS_TRANSMITTED_PERSEC,
  238. 0,
  239. 0,
  240. PERF_DETAIL_NOVICE,
  241. PERF_COUNTER_COUNTER,
  242. sizeof(DWORD),
  243. PIPE_NONCONF_PACKETS_TRANSMITTED_OFFSET
  244. }
  245. };
  246. //
  247. // Flow object and counter definition declarations
  248. //
  249. PERF_OBJECT_TYPE PsFlowObjType = {
  250. sizeof(PERF_OBJECT_TYPE), // TotalByteLength - to be modified later
  251. sizeof(PERF_OBJECT_TYPE), // DefinitionLength - to be modified later
  252. sizeof(PERF_OBJECT_TYPE), // HeaderLength
  253. PSCHED_FLOW_OBJ, // ObjectNameTitleIndex
  254. 0, // ObjectNameTitle
  255. PSCHED_FLOW_OBJ, // ObjectHelpTitleIndex
  256. 0, // ObjectHelpTitle
  257. PERF_DETAIL_NOVICE, // DetailLevel
  258. 0, // NumCounters - to be modified later
  259. 5, // DefaultCounter -- Ave packets in seq
  260. 0, // Number of object instances ( seq #)
  261. 0, // CodePage
  262. {0,0}, // Perf Time
  263. {0,0} // Perf Freq
  264. };
  265. PS_FLOW_FLOW_STAT_DEF PsFlowFlowStatDef = {
  266. {
  267. sizeof(PERF_COUNTER_DEFINITION),
  268. FLOW_PACKETS_DROPPED,
  269. 0,
  270. FLOW_PACKETS_DROPPED,
  271. 0,
  272. 0,
  273. PERF_DETAIL_NOVICE,
  274. PERF_COUNTER_RAWCOUNT,
  275. sizeof(DWORD),
  276. FLOW_PACKETS_DROPPED_OFFSET
  277. },
  278. {
  279. sizeof(PERF_COUNTER_DEFINITION),
  280. FLOW_PACKETS_SCHEDULED,
  281. 0,
  282. FLOW_PACKETS_SCHEDULED,
  283. 0,
  284. -3, // scale the graph by 10^-3, i.e. graph thousands of packets instead of packets
  285. PERF_DETAIL_NOVICE,
  286. PERF_COUNTER_RAWCOUNT,
  287. sizeof(DWORD),
  288. FLOW_PACKETS_SCHEDULED_OFFSET
  289. },
  290. {
  291. sizeof(PERF_COUNTER_DEFINITION),
  292. FLOW_PACKETS_TRANSMITTED,
  293. 0,
  294. FLOW_PACKETS_TRANSMITTED,
  295. 0,
  296. -3, // scale the graph by 10^-3, i.e. graph thousands of packets instead of packets
  297. PERF_DETAIL_NOVICE,
  298. PERF_COUNTER_RAWCOUNT,
  299. sizeof(DWORD),
  300. FLOW_PACKETS_TRANSMITTED_OFFSET
  301. },
  302. {
  303. sizeof(PERF_COUNTER_DEFINITION),
  304. FLOW_BYTES_SCHEDULED,
  305. 0,
  306. FLOW_BYTES_SCHEDULED,
  307. 0,
  308. -6, // scale the graph by 10^-6, i.e. graph MBs instead of bytes
  309. PERF_DETAIL_NOVICE,
  310. PERF_COUNTER_LARGE_RAWCOUNT,
  311. sizeof(LARGE_INTEGER),
  312. FLOW_BYTES_SCHEDULED_OFFSET
  313. },
  314. {
  315. sizeof(PERF_COUNTER_DEFINITION),
  316. FLOW_BYTES_TRANSMITTED,
  317. 0,
  318. FLOW_BYTES_TRANSMITTED,
  319. 0,
  320. -6, // scale the graph by 10^-6, i.e. graph MBs instead of bytes
  321. PERF_DETAIL_NOVICE,
  322. PERF_COUNTER_LARGE_RAWCOUNT,
  323. sizeof(LARGE_INTEGER),
  324. FLOW_BYTES_TRANSMITTED_OFFSET
  325. },
  326. {
  327. sizeof(PERF_COUNTER_DEFINITION),
  328. FLOW_BYTES_TRANSMITTED_PERSEC,
  329. 0,
  330. FLOW_BYTES_TRANSMITTED_PERSEC,
  331. 0,
  332. -3, // scale the graph by 10^-3, i.e. graph kb/s instead of bytes/sec
  333. PERF_DETAIL_NOVICE,
  334. PERF_COUNTER_BULK_COUNT,
  335. sizeof(LARGE_INTEGER),
  336. FLOW_BYTES_TRANSMITTED_OFFSET
  337. },
  338. {
  339. sizeof(PERF_COUNTER_DEFINITION),
  340. FLOW_BYTES_SCHEDULED_PERSEC,
  341. 0,
  342. FLOW_BYTES_SCHEDULED_PERSEC,
  343. 0,
  344. -3, // scale the graph by 10^-3, i.e. graph kb/s instead of bytes/sec
  345. PERF_DETAIL_NOVICE,
  346. PERF_COUNTER_BULK_COUNT,
  347. sizeof(LARGE_INTEGER),
  348. FLOW_BYTES_SCHEDULED_OFFSET
  349. },
  350. {
  351. sizeof(PERF_COUNTER_DEFINITION),
  352. FLOW_PACKETS_TRANSMITTED_PERSEC,
  353. 0,
  354. FLOW_PACKETS_TRANSMITTED_PERSEC,
  355. 0,
  356. -3, // scale the graph by 10^-3, i.e. graph kilopackets/sec instead of packets/sec
  357. PERF_DETAIL_NOVICE,
  358. PERF_COUNTER_COUNTER,
  359. sizeof(DWORD),
  360. FLOW_PACKETS_TRANSMITTED_OFFSET
  361. },
  362. {
  363. sizeof(PERF_COUNTER_DEFINITION),
  364. FLOW_PACKETS_SCHEDULED_PERSEC,
  365. 0,
  366. FLOW_PACKETS_SCHEDULED_PERSEC,
  367. 0,
  368. -3, // scale the graph by 10^-3, i.e. graph kilopackets/sec instead of packets/sec
  369. PERF_DETAIL_NOVICE,
  370. PERF_COUNTER_COUNTER,
  371. sizeof(DWORD),
  372. FLOW_PACKETS_SCHEDULED_OFFSET
  373. },
  374. {
  375. sizeof(PERF_COUNTER_DEFINITION),
  376. FLOW_PACKETS_DROPPED_PERSEC,
  377. 0,
  378. FLOW_PACKETS_DROPPED_PERSEC,
  379. 0,
  380. 0,
  381. PERF_DETAIL_NOVICE,
  382. PERF_COUNTER_COUNTER,
  383. sizeof(DWORD),
  384. FLOW_PACKETS_DROPPED_OFFSET
  385. }
  386. };
  387. PS_FLOW_CONFORMER_STAT_DEF PsFlowConformerStatDef = {
  388. {
  389. sizeof(PERF_COUNTER_DEFINITION),
  390. FLOW_NONCONF_PACKETS_SCHEDULED,
  391. 0,
  392. FLOW_NONCONF_PACKETS_SCHEDULED,
  393. 0,
  394. 0,
  395. PERF_DETAIL_NOVICE,
  396. PERF_COUNTER_RAWCOUNT,
  397. sizeof(DWORD),
  398. FLOW_NONCONF_PACKETS_SCHEDULED_OFFSET
  399. },
  400. {
  401. sizeof(PERF_COUNTER_DEFINITION),
  402. FLOW_NONCONF_PACKETS_SCHEDULED_PERSEC,
  403. 0,
  404. FLOW_NONCONF_PACKETS_SCHEDULED_PERSEC,
  405. 0,
  406. 0,
  407. PERF_DETAIL_NOVICE,
  408. PERF_COUNTER_COUNTER,
  409. sizeof(DWORD),
  410. FLOW_NONCONF_PACKETS_SCHEDULED_OFFSET
  411. }
  412. };
  413. PS_FLOW_SHAPER_STAT_DEF PsFlowShaperStatDef = {
  414. {
  415. sizeof(PERF_COUNTER_DEFINITION),
  416. FLOW_AVE_PACKETS_IN_SHAPER,
  417. 0,
  418. FLOW_AVE_PACKETS_IN_SHAPER,
  419. 0,
  420. 0,
  421. PERF_DETAIL_NOVICE,
  422. PERF_COUNTER_RAWCOUNT,
  423. sizeof(DWORD),
  424. FLOW_AVE_PACKETS_IN_SHAPER_OFFSET
  425. },
  426. {
  427. sizeof(PERF_COUNTER_DEFINITION),
  428. FLOW_MAX_PACKETS_IN_SHAPER,
  429. 0,
  430. FLOW_MAX_PACKETS_IN_SHAPER,
  431. 0,
  432. 0,
  433. PERF_DETAIL_NOVICE,
  434. PERF_COUNTER_RAWCOUNT,
  435. sizeof(DWORD),
  436. FLOW_MAX_PACKETS_IN_SHAPER_OFFSET
  437. }
  438. };
  439. PS_FLOW_SEQUENCER_STAT_DEF PsFlowSequencerStatDef = {
  440. {
  441. sizeof(PERF_COUNTER_DEFINITION),
  442. FLOW_AVE_PACKETS_IN_SEQ,
  443. 0,
  444. FLOW_AVE_PACKETS_IN_SEQ,
  445. 0,
  446. 0,
  447. PERF_DETAIL_NOVICE,
  448. PERF_COUNTER_RAWCOUNT,
  449. sizeof(DWORD),
  450. FLOW_AVE_PACKETS_IN_SEQ_OFFSET
  451. },
  452. {
  453. sizeof(PERF_COUNTER_DEFINITION),
  454. FLOW_MAX_PACKETS_IN_SEQ,
  455. 0,
  456. FLOW_MAX_PACKETS_IN_SEQ,
  457. 0,
  458. 0,
  459. PERF_DETAIL_NOVICE,
  460. PERF_COUNTER_RAWCOUNT,
  461. sizeof(DWORD),
  462. FLOW_MAX_PACKETS_IN_SEQ_OFFSET
  463. },
  464. {
  465. sizeof(PERF_COUNTER_DEFINITION),
  466. FLOW_MAX_PACKETS_IN_NETCARD,
  467. 0,
  468. FLOW_MAX_PACKETS_IN_NETCARD,
  469. 0,
  470. 0,
  471. PERF_DETAIL_NOVICE,
  472. PERF_COUNTER_RAWCOUNT,
  473. sizeof(DWORD),
  474. FLOW_MAX_PACKETS_IN_NETCARD_OFFSET
  475. },
  476. {
  477. sizeof(PERF_COUNTER_DEFINITION),
  478. FLOW_AVE_PACKETS_IN_NETCARD,
  479. 0,
  480. FLOW_AVE_PACKETS_IN_NETCARD,
  481. 0,
  482. 0,
  483. PERF_DETAIL_NOVICE,
  484. PERF_COUNTER_RAWCOUNT,
  485. sizeof(DWORD),
  486. FLOW_AVE_PACKETS_IN_NETCARD_OFFSET
  487. },
  488. {
  489. sizeof(PERF_COUNTER_DEFINITION),
  490. FLOW_NONCONF_PACKETS_TRANSMITTED,
  491. 0,
  492. FLOW_NONCONF_PACKETS_TRANSMITTED,
  493. 0,
  494. 0,
  495. PERF_DETAIL_NOVICE,
  496. PERF_COUNTER_RAWCOUNT,
  497. sizeof(DWORD),
  498. FLOW_NONCONF_PACKETS_TRANSMITTED_OFFSET
  499. },
  500. {
  501. sizeof(PERF_COUNTER_DEFINITION),
  502. FLOW_NONCONF_PACKETS_TRANSMITTED_PERSEC,
  503. 0,
  504. FLOW_NONCONF_PACKETS_TRANSMITTED_PERSEC,
  505. 0,
  506. 0,
  507. PERF_DETAIL_NOVICE,
  508. PERF_COUNTER_COUNTER,
  509. sizeof(DWORD),
  510. FLOW_NONCONF_PACKETS_TRANSMITTED_OFFSET
  511. }
  512. };