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.

1356 lines
23 KiB

  1. /*++ BUILD Version: 0001 // Increment this if a change has global effects
  2. Copyright (c) 1992 Microsoft Corporation
  3. Module Name:
  4. dataras.c
  5. Abstract:
  6. a file containing the constant data structures used by the Performance
  7. Monitor data for the RAS Extensible Objects.
  8. This file contains a set of constant data structures which are
  9. currently defined for the RAS Extensible Objects. This is an
  10. example of how other such objects could be defined.
  11. Created:
  12. Russ Blake 26 Feb 93
  13. Thomas J. Dimitri 28 May 93
  14. Revision History:
  15. Patrick Y. Ng 12 Aug 93
  16. --*/
  17. //
  18. // Include Files
  19. //
  20. #include <windows.h>
  21. #include <winperf.h>
  22. #include "rasctrnm.h"
  23. #include "dataras.h"
  24. //
  25. // Constant structure initializations
  26. // defined in dataras.h
  27. //
  28. //
  29. // The _PERF_DATA_BLOCK structure is followed by NumObjectTypes of
  30. // data sections, one for each type of object measured. Each object
  31. // type section begins with a _PERF_OBJECT_TYPE structure.
  32. //
  33. RAS_PORT_DATA_DEFINITION gRasPortDataDefinition =
  34. {
  35. {
  36. // TotalByteLength. Undefined until RasPortInit() is
  37. // called.
  38. 0,
  39. // DefinitionLength
  40. sizeof(RAS_PORT_DATA_DEFINITION),
  41. // HeaderLength
  42. sizeof(PERF_OBJECT_TYPE),
  43. // ObjectNameTitleIndex
  44. RASPORTOBJ,
  45. // ObjectNameTitle
  46. 0,
  47. // ObjectHelpTitleIndex
  48. RASPORTOBJ,
  49. // ObjectHelpTitle
  50. 0,
  51. // DetailLevel
  52. PERF_DETAIL_NOVICE,
  53. // NumCounters
  54. (sizeof(RAS_PORT_DATA_DEFINITION)-sizeof(PERF_OBJECT_TYPE))/ sizeof(PERF_COUNTER_DEFINITION),
  55. // DefaultCounter
  56. 0,
  57. // NumInstances. Undefined until RasPortInit() is called.
  58. 0,
  59. // CodePage
  60. 0,
  61. //PerfTime
  62. {0,1},
  63. //PerfFreq
  64. {0,5}
  65. },
  66. {
  67. // ByteLength
  68. sizeof(PERF_COUNTER_DEFINITION),
  69. // CounterNameTitleIndex
  70. BYTESTX,
  71. // CounterNameTitle
  72. 0,
  73. // CounterHelpTitleIndex
  74. BYTESTX,
  75. // CounterHelpTitle
  76. 0,
  77. // DefaultScale
  78. 0,
  79. // DetailLevel
  80. PERF_DETAIL_NOVICE,
  81. // CounterType
  82. PERF_COUNTER_RAWCOUNT,
  83. // CounterSize
  84. sizeof(DWORD),
  85. // CounterOffset
  86. NUM_BYTESTX_OFFSET
  87. },
  88. {
  89. // ByteLength
  90. sizeof(PERF_COUNTER_DEFINITION),
  91. // CounterNameTitleIndex
  92. BYTESRX,
  93. // CounterNameTitle
  94. 0,
  95. // CounterHelpTitleIndex
  96. BYTESRX,
  97. // CounterHelpTitle
  98. 0,
  99. // DefaultScale
  100. 0,
  101. // DetailLevel
  102. PERF_DETAIL_NOVICE,
  103. // CounterType
  104. PERF_COUNTER_RAWCOUNT,
  105. // CounterSize
  106. sizeof(DWORD),
  107. // CounterOffset
  108. NUM_BYTESRX_OFFSET
  109. },
  110. {
  111. // ByteLength
  112. sizeof(PERF_COUNTER_DEFINITION),
  113. // CounterNameTitleIndex
  114. FRAMESTX,
  115. // CounterNameTitle
  116. 0,
  117. // CounterHelpTitleIndex
  118. FRAMESTX,
  119. // CounterHelpTitle
  120. 0,
  121. // DefaultScale
  122. 0,
  123. // DetailLevel
  124. PERF_DETAIL_NOVICE,
  125. // CounterType
  126. PERF_COUNTER_RAWCOUNT,
  127. // CounterSize
  128. sizeof(DWORD),
  129. // CounterOffset
  130. NUM_FRAMESTX_OFFSET
  131. },
  132. {
  133. // ByteLength
  134. sizeof(PERF_COUNTER_DEFINITION),
  135. // CounterNameTitleIndex
  136. FRAMESRX,
  137. // CounterNameTitle
  138. 0,
  139. // CounterHelpTitleIndex
  140. FRAMESRX,
  141. // CounterHelpTitle
  142. 0,
  143. // DefaultScale
  144. 0,
  145. // DetailLevel
  146. PERF_DETAIL_NOVICE,
  147. // CounterType
  148. PERF_COUNTER_RAWCOUNT,
  149. // CounterSize
  150. sizeof(DWORD),
  151. // CounterOffset
  152. NUM_FRAMESRX_OFFSET
  153. },
  154. {
  155. // ByteLength
  156. sizeof(PERF_COUNTER_DEFINITION),
  157. // CounterNameTitleIndex
  158. PERCENTTXC,
  159. // CounterNameTitle
  160. 0,
  161. // CounterHelpTitleIndex
  162. PERCENTTXC,
  163. // CounterHelpTitle
  164. 0,
  165. // DefaultScale
  166. 0,
  167. // DetailLevel
  168. PERF_DETAIL_NOVICE,
  169. // CounterType
  170. PERF_COUNTER_RAWCOUNT,
  171. // CounterSize
  172. sizeof(DWORD),
  173. // CounterOffset
  174. NUM_PERCENTTXC_OFFSET
  175. },
  176. {
  177. // ByteLength
  178. sizeof(PERF_COUNTER_DEFINITION),
  179. // CounterNameTitleIndex
  180. PERCENTRXC,
  181. // CounterNameTitle
  182. 0,
  183. // CounterHelpTitleIndex
  184. PERCENTRXC,
  185. // CounterHelpTitle
  186. 0,
  187. // DefaultScale
  188. 0,
  189. // DetailLevel
  190. PERF_DETAIL_NOVICE,
  191. // CounterType
  192. PERF_COUNTER_RAWCOUNT,
  193. // CounterSize
  194. sizeof(DWORD),
  195. // CounterOffset
  196. NUM_PERCENTRXC_OFFSET
  197. },
  198. {
  199. // ByteLength
  200. sizeof(PERF_COUNTER_DEFINITION),
  201. // CounterNameTitleIndex
  202. CRCERRORS,
  203. // CounterNameTitle
  204. 0,
  205. // CounterHelpTitleIndex
  206. CRCERRORS,
  207. // CounterHelpTitle
  208. 0,
  209. // DefaultScale
  210. 0,
  211. // DetailLevel
  212. PERF_DETAIL_NOVICE,
  213. // CounterType
  214. PERF_COUNTER_RAWCOUNT,
  215. // CounterSize
  216. sizeof(DWORD),
  217. // CounterOffset
  218. NUM_CRCERRORS_OFFSET
  219. },
  220. {
  221. // ByteLength
  222. sizeof(PERF_COUNTER_DEFINITION),
  223. // CounterNameTitleIndex
  224. TIMEOUTERRORS,
  225. // CounterNameTitle
  226. 0,
  227. // CounterHelpTitleIndex
  228. TIMEOUTERRORS,
  229. // CounterHelpTitle
  230. 0,
  231. // DefaultScale
  232. 0,
  233. // DetailLevel
  234. PERF_DETAIL_NOVICE,
  235. // CounterType
  236. PERF_COUNTER_RAWCOUNT,
  237. // CounterSize
  238. sizeof(DWORD),
  239. // CounterOffset
  240. NUM_TIMEOUTERRORS_OFFSET
  241. },
  242. {
  243. // ByteLength
  244. sizeof(PERF_COUNTER_DEFINITION),
  245. // CounterNameTitleIndex
  246. SERIALOVERRUNS,
  247. // CounterNameTitle
  248. 0,
  249. // CounterHelpTitleIndex
  250. SERIALOVERRUNS,
  251. // CounterHelpTitle
  252. 0,
  253. // DefaultScale
  254. 0,
  255. // DetailLevel
  256. PERF_DETAIL_NOVICE,
  257. // CounterType
  258. PERF_COUNTER_RAWCOUNT,
  259. // CounterSize
  260. sizeof(DWORD),
  261. // CounterOffset
  262. NUM_SERIALOVERRUNS_OFFSET
  263. },
  264. {
  265. // ByteLength
  266. sizeof(PERF_COUNTER_DEFINITION),
  267. // CounterNameTitleIndex
  268. ALIGNMENTERRORS,
  269. // CounterNameTitle
  270. 0,
  271. // CounterHelpTitleIndex
  272. ALIGNMENTERRORS,
  273. // CounterHelpTitle
  274. 0,
  275. // DefaultScale
  276. 0,
  277. // DetailLevel
  278. PERF_DETAIL_NOVICE,
  279. // CounterType
  280. PERF_COUNTER_RAWCOUNT,
  281. // CounterSize
  282. sizeof(DWORD),
  283. // CounterOffset
  284. NUM_ALIGNMENTERRORS_OFFSET
  285. },
  286. {
  287. // ByteLength
  288. sizeof(PERF_COUNTER_DEFINITION),
  289. // CounterNameTitleIndex
  290. BUFFEROVERRUNS,
  291. // CounterNameTitle
  292. 0,
  293. // CounterHelpTitleIndex
  294. BUFFEROVERRUNS,
  295. // CounterHelpTitle
  296. 0,
  297. // DefaultScale
  298. 0,
  299. // DetailLevel
  300. PERF_DETAIL_NOVICE,
  301. // CounterType
  302. PERF_COUNTER_RAWCOUNT,
  303. // CounterSize
  304. sizeof(DWORD),
  305. // CounterOffset
  306. NUM_BUFFEROVERRUNS_OFFSET
  307. },
  308. {
  309. // ByteLength
  310. sizeof(PERF_COUNTER_DEFINITION),
  311. // CounterNameTitleIndex
  312. TOTALERRORS,
  313. // CounterNameTitle
  314. 0,
  315. // CounterHelpTitleIndex
  316. TOTALERRORS,
  317. // CounterHelpTitle
  318. 0,
  319. // DefaultScale
  320. 0,
  321. // DetailLevel
  322. PERF_DETAIL_NOVICE,
  323. // CounterType
  324. PERF_COUNTER_RAWCOUNT,
  325. // CounterSize
  326. sizeof(DWORD),
  327. // CounterOffset
  328. NUM_TOTALERRORS_OFFSET
  329. },
  330. {
  331. // ByteLength
  332. sizeof(PERF_COUNTER_DEFINITION),
  333. // CounterNameTitleIndex
  334. BYTESTXSEC,
  335. // CounterNameTitle
  336. 0,
  337. // CounterHelpTitleIndex
  338. BYTESTXSEC,
  339. // CounterHelpTitle
  340. 0,
  341. // DefaultScale
  342. 0,
  343. // DetailLevel
  344. PERF_DETAIL_NOVICE,
  345. // CounterType
  346. PERF_COUNTER_COUNTER,
  347. // CounterSize
  348. sizeof(DWORD),
  349. // CounterOffset
  350. NUM_BYTESTXSEC_OFFSET
  351. },
  352. {
  353. // ByteLength
  354. sizeof(PERF_COUNTER_DEFINITION),
  355. // CounterNameTitleIndex
  356. BYTESRXSEC,
  357. // CounterNameTitle
  358. 0,
  359. // CounterHelpTitleIndex
  360. BYTESRXSEC,
  361. // CounterHelpTitle
  362. 0,
  363. // DefaultScale
  364. 0,
  365. // DetailLevel
  366. PERF_DETAIL_NOVICE,
  367. // CounterType
  368. PERF_COUNTER_COUNTER,
  369. // CounterSize
  370. sizeof(DWORD),
  371. // CounterOffset
  372. NUM_BYTESRXSEC_OFFSET
  373. },
  374. {
  375. // ByteLength
  376. sizeof(PERF_COUNTER_DEFINITION),
  377. // CounterNameTitleIndex
  378. FRAMESTXSEC,
  379. // CounterNameTitle
  380. 0,
  381. // CounterHelpTitleIndex
  382. FRAMESTXSEC,
  383. // CounterHelpTitle
  384. 0,
  385. // DefaultScale
  386. 0,
  387. // DetailLevel
  388. PERF_DETAIL_NOVICE,
  389. // CounterType
  390. PERF_COUNTER_COUNTER,
  391. // CounterSize
  392. sizeof(DWORD),
  393. // CounterOffset
  394. NUM_FRAMESTXSEC_OFFSET
  395. },
  396. {
  397. // ByteLength
  398. sizeof(PERF_COUNTER_DEFINITION),
  399. // CounterNameTitleIndex
  400. FRAMESRXSEC,
  401. // CounterNameTitle
  402. 0,
  403. // CounterHelpTitleIndex
  404. FRAMESRXSEC,
  405. // CounterHelpTitle
  406. 0,
  407. // DefaultScale
  408. 0,
  409. // DetailLevel
  410. PERF_DETAIL_NOVICE,
  411. // CounterType
  412. PERF_COUNTER_COUNTER,
  413. // CounterSize
  414. sizeof(DWORD),
  415. // CounterOffset
  416. NUM_FRAMESRXSEC_OFFSET
  417. },
  418. {
  419. // ByteLength
  420. sizeof(PERF_COUNTER_DEFINITION),
  421. // CounterNameTitleIndex
  422. TOTALERRORSSEC,
  423. // CounterNameTitle
  424. 0,
  425. // CounterHelpTitleIndex
  426. TOTALERRORSSEC,
  427. // CounterHelpTitle
  428. 0,
  429. // DefaultScale
  430. 0,
  431. // DetailLevel
  432. PERF_DETAIL_NOVICE,
  433. // CounterType
  434. PERF_COUNTER_COUNTER,
  435. // CounterSize
  436. sizeof(DWORD),
  437. // CounterOffset
  438. NUM_TOTALERRORSSEC_OFFSET
  439. }
  440. };
  441. RAS_TOTAL_DATA_DEFINITION gRasTotalDataDefinition =
  442. {
  443. {
  444. // TotalByteLength
  445. sizeof(RAS_TOTAL_DATA_DEFINITION) + ALIGN8(SIZE_OF_RAS_TOTAL_PERFORMANCE_DATA),
  446. // DefinitionLength
  447. sizeof(RAS_TOTAL_DATA_DEFINITION),
  448. // HeaderLength
  449. sizeof(PERF_OBJECT_TYPE),
  450. // ObjectNameTitleIndex
  451. RASTOTALOBJ,
  452. // ObjectNameTitle
  453. 0,
  454. // ObjectHelpTitleIndex
  455. RASTOTALOBJ,
  456. // ObjectHelpTitle
  457. 0,
  458. // DetailLevel
  459. PERF_DETAIL_NOVICE,
  460. // NumCounters
  461. (sizeof(RAS_TOTAL_DATA_DEFINITION)-sizeof(PERF_OBJECT_TYPE))/ sizeof(PERF_COUNTER_DEFINITION),
  462. // DefaultCounter
  463. 0,
  464. // NumInstances
  465. PERF_NO_INSTANCES,
  466. // CodePage
  467. 0,
  468. //PerfTime
  469. {0,1},
  470. //PerfFreq
  471. {0,5}
  472. },
  473. {
  474. // ByteLength
  475. sizeof(PERF_COUNTER_DEFINITION),
  476. // CounterNameTitleIndex
  477. BYTESTX,
  478. // CounterNameTitle
  479. 0,
  480. // CounterHelpTitleIndex
  481. BYTESTX,
  482. // CounterHelpTitle
  483. 0,
  484. // DefaultScale
  485. 0,
  486. // DetailLevel
  487. PERF_DETAIL_NOVICE,
  488. // CounterType
  489. PERF_COUNTER_RAWCOUNT,
  490. // CounterSize
  491. sizeof(DWORD),
  492. // CounterOffset
  493. NUM_BYTESTX_OFFSET
  494. },
  495. {
  496. // ByteLength
  497. sizeof(PERF_COUNTER_DEFINITION),
  498. // CounterNameTitleIndex
  499. BYTESRX,
  500. // CounterNameTitle
  501. 0,
  502. // CounterHelpTitleIndex
  503. BYTESRX,
  504. // CounterHelpTitle
  505. 0,
  506. // DefaultScale
  507. 0,
  508. // DetailLevel
  509. PERF_DETAIL_NOVICE,
  510. // CounterType
  511. PERF_COUNTER_RAWCOUNT,
  512. // CounterSize
  513. sizeof(DWORD),
  514. // CounterOffset
  515. NUM_BYTESRX_OFFSET
  516. },
  517. {
  518. // ByteLength
  519. sizeof(PERF_COUNTER_DEFINITION),
  520. // CounterNameTitleIndex
  521. FRAMESTX,
  522. // CounterNameTitle
  523. 0,
  524. // CounterHelpTitleIndex
  525. FRAMESTX,
  526. // CounterHelpTitle
  527. 0,
  528. // DefaultScale
  529. 0,
  530. // DetailLevel
  531. PERF_DETAIL_NOVICE,
  532. // CounterType
  533. PERF_COUNTER_RAWCOUNT,
  534. // CounterSize
  535. sizeof(DWORD),
  536. // CounterOffset
  537. NUM_FRAMESTX_OFFSET
  538. },
  539. {
  540. // ByteLength
  541. sizeof(PERF_COUNTER_DEFINITION),
  542. // CounterNameTitleIndex
  543. FRAMESRX,
  544. // CounterNameTitle
  545. 0,
  546. // CounterHelpTitleIndex
  547. FRAMESRX,
  548. // CounterHelpTitle
  549. 0,
  550. // DefaultScale
  551. 0,
  552. // DetailLevel
  553. PERF_DETAIL_NOVICE,
  554. // CounterType
  555. PERF_COUNTER_RAWCOUNT,
  556. // CounterSize
  557. sizeof(DWORD),
  558. // CounterOffset
  559. NUM_FRAMESRX_OFFSET
  560. },
  561. {
  562. // ByteLength
  563. sizeof(PERF_COUNTER_DEFINITION),
  564. // CounterNameTitleIndex
  565. PERCENTTXC,
  566. // CounterNameTitle
  567. 0,
  568. // CounterHelpTitleIndex
  569. PERCENTTXC,
  570. // CounterHelpTitle
  571. 0,
  572. // DefaultScale
  573. 0,
  574. // DetailLevel
  575. PERF_DETAIL_NOVICE,
  576. // CounterType
  577. PERF_COUNTER_RAWCOUNT,
  578. // CounterSize
  579. sizeof(DWORD),
  580. // CounterOffset
  581. NUM_PERCENTTXC_OFFSET
  582. },
  583. {
  584. // ByteLength
  585. sizeof(PERF_COUNTER_DEFINITION),
  586. // CounterNameTitleIndex
  587. PERCENTRXC,
  588. // CounterNameTitle
  589. 0,
  590. // CounterHelpTitleIndex
  591. PERCENTRXC,
  592. // CounterHelpTitle
  593. 0,
  594. // DefaultScale
  595. 0,
  596. // DetailLevel
  597. PERF_DETAIL_NOVICE,
  598. // CounterType
  599. PERF_COUNTER_RAWCOUNT,
  600. // CounterSize
  601. sizeof(DWORD),
  602. // CounterOffset
  603. NUM_PERCENTRXC_OFFSET
  604. },
  605. {
  606. // ByteLength
  607. sizeof(PERF_COUNTER_DEFINITION),
  608. // CounterNameTitleIndex
  609. CRCERRORS,
  610. // CounterNameTitle
  611. 0,
  612. // CounterHelpTitleIndex
  613. CRCERRORS,
  614. // CounterHelpTitle
  615. 0,
  616. // DefaultScale
  617. 0,
  618. // DetailLevel
  619. PERF_DETAIL_NOVICE,
  620. // CounterType
  621. PERF_COUNTER_RAWCOUNT,
  622. // CounterSize
  623. sizeof(DWORD),
  624. // CounterOffset
  625. NUM_CRCERRORS_OFFSET
  626. },
  627. {
  628. // ByteLength
  629. sizeof(PERF_COUNTER_DEFINITION),
  630. // CounterNameTitleIndex
  631. TIMEOUTERRORS,
  632. // CounterNameTitle
  633. 0,
  634. // CounterHelpTitleIndex
  635. TIMEOUTERRORS,
  636. // CounterHelpTitle
  637. 0,
  638. // DefaultScale
  639. 0,
  640. // DetailLevel
  641. PERF_DETAIL_NOVICE,
  642. // CounterType
  643. PERF_COUNTER_RAWCOUNT,
  644. // CounterSize
  645. sizeof(DWORD),
  646. // CounterOffset
  647. NUM_TIMEOUTERRORS_OFFSET
  648. },
  649. {
  650. // ByteLength
  651. sizeof(PERF_COUNTER_DEFINITION),
  652. // CounterNameTitleIndex
  653. SERIALOVERRUNS,
  654. // CounterNameTitle
  655. 0,
  656. // CounterHelpTitleIndex
  657. SERIALOVERRUNS,
  658. // CounterHelpTitle
  659. 0,
  660. // DefaultScale
  661. 0,
  662. // DetailLevel
  663. PERF_DETAIL_NOVICE,
  664. // CounterType
  665. PERF_COUNTER_RAWCOUNT,
  666. // CounterSize
  667. sizeof(DWORD),
  668. // CounterOffset
  669. NUM_SERIALOVERRUNS_OFFSET
  670. },
  671. {
  672. // ByteLength
  673. sizeof(PERF_COUNTER_DEFINITION),
  674. // CounterNameTitleIndex
  675. ALIGNMENTERRORS,
  676. // CounterNameTitle
  677. 0,
  678. // CounterHelpTitleIndex
  679. ALIGNMENTERRORS,
  680. // CounterHelpTitle
  681. 0,
  682. // DefaultScale
  683. 0,
  684. // DetailLevel
  685. PERF_DETAIL_NOVICE,
  686. // CounterType
  687. PERF_COUNTER_RAWCOUNT,
  688. // CounterSize
  689. sizeof(DWORD),
  690. // CounterOffset
  691. NUM_ALIGNMENTERRORS_OFFSET
  692. },
  693. {
  694. // ByteLength
  695. sizeof(PERF_COUNTER_DEFINITION),
  696. // CounterNameTitleIndex
  697. BUFFEROVERRUNS,
  698. // CounterNameTitle
  699. 0,
  700. // CounterHelpTitleIndex
  701. BUFFEROVERRUNS,
  702. // CounterHelpTitle
  703. 0,
  704. // DefaultScale
  705. 0,
  706. // DetailLevel
  707. PERF_DETAIL_NOVICE,
  708. // CounterType
  709. PERF_COUNTER_RAWCOUNT,
  710. // CounterSize
  711. sizeof(DWORD),
  712. // CounterOffset
  713. NUM_BUFFEROVERRUNS_OFFSET
  714. },
  715. {
  716. // ByteLength
  717. sizeof(PERF_COUNTER_DEFINITION),
  718. // CounterNameTitleIndex
  719. TOTALERRORS,
  720. // CounterNameTitle
  721. 0,
  722. // CounterHelpTitleIndex
  723. TOTALERRORS,
  724. // CounterHelpTitle
  725. 0,
  726. // DefaultScale
  727. 0,
  728. // DetailLevel
  729. PERF_DETAIL_NOVICE,
  730. // CounterType
  731. PERF_COUNTER_RAWCOUNT,
  732. // CounterSize
  733. sizeof(DWORD),
  734. // CounterOffset
  735. NUM_TOTALERRORS_OFFSET
  736. },
  737. {
  738. // ByteLength
  739. sizeof(PERF_COUNTER_DEFINITION),
  740. // CounterNameTitleIndex
  741. BYTESTXSEC,
  742. // CounterNameTitle
  743. 0,
  744. // CounterHelpTitleIndex
  745. BYTESTXSEC,
  746. // CounterHelpTitle
  747. 0,
  748. // DefaultScale
  749. 0,
  750. // DetailLevel
  751. PERF_DETAIL_NOVICE,
  752. // CounterType
  753. PERF_COUNTER_COUNTER,
  754. // CounterSize
  755. sizeof(DWORD),
  756. // CounterOffset
  757. NUM_BYTESTXSEC_OFFSET
  758. },
  759. {
  760. // ByteLength
  761. sizeof(PERF_COUNTER_DEFINITION),
  762. // CounterNameTitleIndex
  763. BYTESRXSEC,
  764. // CounterNameTitle
  765. 0,
  766. // CounterHelpTitleIndex
  767. BYTESRXSEC,
  768. // CounterHelpTitle
  769. 0,
  770. // DefaultScale
  771. 0,
  772. // DetailLevel
  773. PERF_DETAIL_NOVICE,
  774. // CounterType
  775. PERF_COUNTER_COUNTER,
  776. // CounterSize
  777. sizeof(DWORD),
  778. // CounterOffset
  779. NUM_BYTESRXSEC_OFFSET
  780. },
  781. {
  782. // ByteLength
  783. sizeof(PERF_COUNTER_DEFINITION),
  784. // CounterNameTitleIndex
  785. FRAMESTXSEC,
  786. // CounterNameTitle
  787. 0,
  788. // CounterHelpTitleIndex
  789. FRAMESTXSEC,
  790. // CounterHelpTitle
  791. 0,
  792. // DefaultScale
  793. 0,
  794. // DetailLevel
  795. PERF_DETAIL_NOVICE,
  796. // CounterType
  797. PERF_COUNTER_COUNTER,
  798. // CounterSize
  799. sizeof(DWORD),
  800. // CounterOffset
  801. NUM_FRAMESTXSEC_OFFSET
  802. },
  803. {
  804. // ByteLength
  805. sizeof(PERF_COUNTER_DEFINITION),
  806. // CounterNameTitleIndex
  807. FRAMESRXSEC,
  808. // CounterNameTitle
  809. 0,
  810. // CounterHelpTitleIndex
  811. FRAMESRXSEC,
  812. // CounterHelpTitle
  813. 0,
  814. // DefaultScale
  815. 0,
  816. // DetailLevel
  817. PERF_DETAIL_NOVICE,
  818. // CounterType
  819. PERF_COUNTER_COUNTER,
  820. // CounterSize
  821. sizeof(DWORD),
  822. // CounterOffset
  823. NUM_FRAMESRXSEC_OFFSET
  824. },
  825. {
  826. // ByteLength
  827. sizeof(PERF_COUNTER_DEFINITION),
  828. // CounterNameTitleIndex
  829. TOTALERRORSSEC,
  830. // CounterNameTitle
  831. 0,
  832. // CounterHelpTitleIndex
  833. TOTALERRORSSEC,
  834. // CounterHelpTitle
  835. 0,
  836. // DefaultScale
  837. 0,
  838. // DetailLevel
  839. PERF_DETAIL_NOVICE,
  840. // CounterType
  841. PERF_COUNTER_COUNTER,
  842. // CounterSize
  843. sizeof(DWORD),
  844. // CounterOffset
  845. NUM_TOTALERRORSSEC_OFFSET
  846. },
  847. {
  848. // ByteLength
  849. sizeof(PERF_COUNTER_DEFINITION),
  850. // CounterNameTitleIndex
  851. TOTALCONNECTIONS,
  852. // CounterNameTitle
  853. 0,
  854. // CounterHelpTitleIndex
  855. TOTALCONNECTIONS,
  856. // CounterHelpTitle
  857. 0,
  858. // DefaultScale
  859. 0,
  860. // DetailLevel
  861. PERF_DETAIL_NOVICE,
  862. // CounterType
  863. PERF_COUNTER_RAWCOUNT,
  864. // CounterSize
  865. sizeof(DWORD),
  866. // CounterOffset
  867. NUM_TOTALCONNECTIONS_OFFSET
  868. }
  869. };
  870. //***
  871. //
  872. // Routine Description:
  873. //
  874. // Initiailizes all the indexes in the counter definitions in all objects.
  875. //
  876. // Arguments:
  877. //
  878. // None.
  879. //
  880. // Return Value:
  881. //
  882. // None.
  883. //
  884. //***
  885. VOID InitObjectCounterIndex ( DWORD dwFirstCounter, DWORD dwFirstHelp )
  886. {
  887. //
  888. // Init the counter definition structures for the object RAS Port.
  889. //
  890. gRasPortDataDefinition.RasObjectType.ObjectNameTitleIndex += dwFirstCounter;
  891. gRasPortDataDefinition.RasObjectType.ObjectHelpTitleIndex += dwFirstHelp;
  892. gRasPortDataDefinition.BytesTx.CounterNameTitleIndex += dwFirstCounter;
  893. gRasPortDataDefinition.BytesTx.CounterHelpTitleIndex += dwFirstHelp;
  894. gRasPortDataDefinition.BytesRx.CounterNameTitleIndex += dwFirstCounter;
  895. gRasPortDataDefinition.BytesRx.CounterHelpTitleIndex += dwFirstHelp;
  896. gRasPortDataDefinition.FramesTx.CounterNameTitleIndex += dwFirstCounter;
  897. gRasPortDataDefinition.FramesTx.CounterHelpTitleIndex += dwFirstHelp;
  898. gRasPortDataDefinition.FramesRx.CounterNameTitleIndex += dwFirstCounter;
  899. gRasPortDataDefinition.FramesRx.CounterHelpTitleIndex += dwFirstHelp;
  900. gRasPortDataDefinition.PercentTxC.CounterNameTitleIndex += dwFirstCounter;
  901. gRasPortDataDefinition.PercentTxC.CounterHelpTitleIndex += dwFirstHelp;
  902. gRasPortDataDefinition.PercentRxC.CounterNameTitleIndex += dwFirstCounter;
  903. gRasPortDataDefinition.PercentRxC.CounterHelpTitleIndex += dwFirstHelp;
  904. gRasPortDataDefinition.CRCErrors.CounterNameTitleIndex += dwFirstCounter;
  905. gRasPortDataDefinition.CRCErrors.CounterHelpTitleIndex += dwFirstHelp;
  906. gRasPortDataDefinition.TimeoutErrors.CounterNameTitleIndex += dwFirstCounter;
  907. gRasPortDataDefinition.TimeoutErrors.CounterHelpTitleIndex += dwFirstHelp;
  908. gRasPortDataDefinition.SerialOverruns.CounterNameTitleIndex += dwFirstCounter;
  909. gRasPortDataDefinition.SerialOverruns.CounterHelpTitleIndex += dwFirstHelp;
  910. gRasPortDataDefinition.AlignmentErrors.CounterNameTitleIndex += dwFirstCounter;
  911. gRasPortDataDefinition.AlignmentErrors.CounterHelpTitleIndex += dwFirstHelp;
  912. gRasPortDataDefinition.BufferOverruns.CounterNameTitleIndex += dwFirstCounter;
  913. gRasPortDataDefinition.BufferOverruns.CounterHelpTitleIndex += dwFirstHelp;
  914. gRasPortDataDefinition.TotalErrors.CounterNameTitleIndex += dwFirstCounter;
  915. gRasPortDataDefinition.TotalErrors.CounterHelpTitleIndex += dwFirstHelp;
  916. gRasPortDataDefinition.BytesTxSec.CounterNameTitleIndex += dwFirstCounter;
  917. gRasPortDataDefinition.BytesTxSec.CounterHelpTitleIndex += dwFirstHelp;
  918. gRasPortDataDefinition.BytesRxSec.CounterNameTitleIndex += dwFirstCounter;
  919. gRasPortDataDefinition.BytesRxSec.CounterHelpTitleIndex += dwFirstHelp;
  920. gRasPortDataDefinition.FramesTxSec.CounterNameTitleIndex += dwFirstCounter;
  921. gRasPortDataDefinition.FramesTxSec.CounterHelpTitleIndex += dwFirstHelp;
  922. gRasPortDataDefinition.FramesRxSec.CounterNameTitleIndex += dwFirstCounter;
  923. gRasPortDataDefinition.FramesRxSec.CounterHelpTitleIndex += dwFirstHelp;
  924. gRasPortDataDefinition.TotalErrorsSec.CounterNameTitleIndex += dwFirstCounter;
  925. gRasPortDataDefinition.TotalErrorsSec.CounterHelpTitleIndex += dwFirstHelp;
  926. //
  927. // Init the counter definition structures for the object RAS Total.
  928. //
  929. gRasTotalDataDefinition.RasObjectType.ObjectNameTitleIndex += dwFirstCounter;
  930. gRasTotalDataDefinition.RasObjectType.ObjectHelpTitleIndex += dwFirstHelp;
  931. gRasTotalDataDefinition.BytesTx.CounterNameTitleIndex += dwFirstCounter;
  932. gRasTotalDataDefinition.BytesTx.CounterHelpTitleIndex += dwFirstHelp;
  933. gRasTotalDataDefinition.BytesRx.CounterNameTitleIndex += dwFirstCounter;
  934. gRasTotalDataDefinition.BytesRx.CounterHelpTitleIndex += dwFirstHelp;
  935. gRasTotalDataDefinition.FramesTx.CounterNameTitleIndex += dwFirstCounter;
  936. gRasTotalDataDefinition.FramesTx.CounterHelpTitleIndex += dwFirstHelp;
  937. gRasTotalDataDefinition.FramesRx.CounterNameTitleIndex += dwFirstCounter;
  938. gRasTotalDataDefinition.FramesRx.CounterHelpTitleIndex += dwFirstHelp;
  939. gRasTotalDataDefinition.PercentTxC.CounterNameTitleIndex += dwFirstCounter;
  940. gRasTotalDataDefinition.PercentTxC.CounterHelpTitleIndex += dwFirstHelp;
  941. gRasTotalDataDefinition.PercentRxC.CounterNameTitleIndex += dwFirstCounter;
  942. gRasTotalDataDefinition.PercentRxC.CounterHelpTitleIndex += dwFirstHelp;
  943. gRasTotalDataDefinition.CRCErrors.CounterNameTitleIndex += dwFirstCounter;
  944. gRasTotalDataDefinition.CRCErrors.CounterHelpTitleIndex += dwFirstHelp;
  945. gRasTotalDataDefinition.TimeoutErrors.CounterNameTitleIndex += dwFirstCounter;
  946. gRasTotalDataDefinition.TimeoutErrors.CounterHelpTitleIndex += dwFirstHelp;
  947. gRasTotalDataDefinition.SerialOverruns.CounterNameTitleIndex += dwFirstCounter;
  948. gRasTotalDataDefinition.SerialOverruns.CounterHelpTitleIndex += dwFirstHelp;
  949. gRasTotalDataDefinition.AlignmentErrors.CounterNameTitleIndex += dwFirstCounter;
  950. gRasTotalDataDefinition.AlignmentErrors.CounterHelpTitleIndex += dwFirstHelp;
  951. gRasTotalDataDefinition.BufferOverruns.CounterNameTitleIndex += dwFirstCounter;
  952. gRasTotalDataDefinition.BufferOverruns.CounterHelpTitleIndex += dwFirstHelp;
  953. gRasTotalDataDefinition.TotalErrors.CounterNameTitleIndex += dwFirstCounter;
  954. gRasTotalDataDefinition.TotalErrors.CounterHelpTitleIndex += dwFirstHelp;
  955. gRasTotalDataDefinition.BytesTxSec.CounterNameTitleIndex += dwFirstCounter;
  956. gRasTotalDataDefinition.BytesTxSec.CounterHelpTitleIndex += dwFirstHelp;
  957. gRasTotalDataDefinition.BytesRxSec.CounterNameTitleIndex += dwFirstCounter;
  958. gRasTotalDataDefinition.BytesRxSec.CounterHelpTitleIndex += dwFirstHelp;
  959. gRasTotalDataDefinition.FramesTxSec.CounterNameTitleIndex += dwFirstCounter;
  960. gRasTotalDataDefinition.FramesTxSec.CounterHelpTitleIndex += dwFirstHelp;
  961. gRasTotalDataDefinition.FramesRxSec.CounterNameTitleIndex += dwFirstCounter;
  962. gRasTotalDataDefinition.FramesRxSec.CounterHelpTitleIndex += dwFirstHelp;
  963. gRasTotalDataDefinition.TotalErrorsSec.CounterNameTitleIndex += dwFirstCounter;
  964. gRasTotalDataDefinition.TotalErrorsSec.CounterHelpTitleIndex += dwFirstHelp;
  965. gRasTotalDataDefinition.TotalConnections.CounterNameTitleIndex += dwFirstCounter;
  966. gRasTotalDataDefinition.TotalConnections.CounterHelpTitleIndex += dwFirstHelp;
  967. }