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.

1358 lines
50 KiB

  1. /*
  2. * mib.c v0.10
  3. * Generated in conjunction with Management Factory scripts:
  4. * script version: SNMPv1, 0.16, Apr 25, 1996
  5. * project: D:\TEMP\EXAMPLE\HOSTMIB
  6. *
  7. ****************************************************************************
  8. * *
  9. * (C) Copyright 1995 DIGITAL EQUIPMENT CORPORATION *
  10. * *
  11. * This software is an unpublished work protected under the *
  12. * the copyright laws of the United States of America, all *
  13. * rights reserved. *
  14. * *
  15. * In the event this software is licensed for use by the United *
  16. * States Government, all use, duplication or disclosure by the *
  17. * United States Government is subject to restrictions as set *
  18. * forth in either subparagraph (c)(1)(ii) of the Rights in *
  19. * Technical Data And Computer Software Clause at DFARS *
  20. * 252.227-7013, or the Commercial Computer Software Restricted *
  21. * Rights Clause at FAR 52.221-19, whichever is applicable. *
  22. * *
  23. ****************************************************************************
  24. *
  25. * Facility:
  26. *
  27. * SNMP Extension Agent
  28. *
  29. * Abstract:
  30. *
  31. * This module contains oids and tables used for the table driven design.
  32. *
  33. * Functions:
  34. *
  35. * UserMibInit()
  36. *
  37. * Author:
  38. *
  39. * D. D. Burns @ Webenable Inc. Genned: Thu Nov 07 16:38:27 1996
  40. *
  41. *
  42. * Revision History:
  43. *
  44. * 04/15/97 Changed "mibEventValue" to "hostmib.dll" from
  45. * "gendll.dll", and
  46. * "eventLogString" to "HostMIBAgent"
  47. * from "GenAgent".
  48. */
  49. #include <windows.h>
  50. #include <malloc.h>
  51. #include <stdio.h>
  52. #include <snmp.h>
  53. #include "mib.h"
  54. #include "smint.h"
  55. #include "hostmsmi.h"
  56. #include "HMCACHE.H" // For Cache-build function prototypes
  57. //
  58. // Text String used in logging to the Application Event log
  59. //
  60. //
  61. // THE EVENT AND DLL STRINGS ARE DECLARED HERE - FILLED IN BY CASE TOOL.
  62. // note- nyi, null strings supplied temporarily
  63. //
  64. char eventLogString[13] = "HostMIBAgent\0" ;
  65. char *EventLogString = eventLogString ;
  66. char mibEventValue[12] = "hostmib.dll\0" ;
  67. //
  68. // BEGIN generated code:
  69. // OIDs
  70. // variable_t table for the attributes of each class
  71. // class_info containing information about each class
  72. //
  73. // NOTE: This stub code will not work if a table exists in the middle of a
  74. // group. It will work if all tables are at the end of the group.
  75. //
  76. // Variable tables
  77. // A NULL entry exists for each "hole" in the sequence of
  78. // attributes. For example, if attributes 1, 3, 4, and 7 are
  79. // defined, there will be a NULL entry in the variable table
  80. // corresponding to attribute 2, 5, and 6. There is always
  81. // a NULL entry for 0 in the variable tables, since 0 is an
  82. // invalid OID arc value for an attribute.
  83. //
  84. // Class table
  85. // The class table entries are ordered lexicographically to
  86. // facilitate SNMP GetNext processing.
  87. //
  88. static
  89. UINT
  90. subroot_array [ SUBROOT_LENGTH ] = {1, 3, 6, 1, 2, 1, 25 } ;
  91. AsnObjectIdentifier
  92. Subroot_oid = { SUBROOT_LENGTH, subroot_array } ;
  93. static
  94. UINT
  95. host_array[ HOST_LENGTH ] = { HOST_SEQ } ;
  96. AsnObjectIdentifier
  97. host_oid = { HOST_LENGTH, host_array } ;
  98. static
  99. UINT
  100. hrSystemUptime_array[ HRSYSTEMUPTIME_LENGTH ] = { HRSYSTEMUPTIME_SEQ } ;
  101. AsnObjectIdentifier
  102. hrSystemUptime_oid = { HRSYSTEMUPTIME_LENGTH, hrSystemUptime_array } ;
  103. static
  104. UINT
  105. hrSystemDate_array[ HRSYSTEMDATE_LENGTH ] = { HRSYSTEMDATE_SEQ } ;
  106. AsnObjectIdentifier
  107. hrSystemDate_oid = { HRSYSTEMDATE_LENGTH, hrSystemDate_array } ;
  108. static
  109. UINT
  110. hrSystemInitialLoadDevice_array[ HRSYSTEMINITIALLOADDEVICE_LENGTH ] = { HRSYSTEMINITIALLOADDEVICE_SEQ } ;
  111. AsnObjectIdentifier
  112. hrSystemInitialLoadDevice_oid = { HRSYSTEMINITIALLOADDEVICE_LENGTH, hrSystemInitialLoadDevice_array } ;
  113. static
  114. UINT
  115. hrSystemInitialLoadParameters_array[ HRSYSTEMINITIALLOADPARAMETERS_LENGTH ] = { HRSYSTEMINITIALLOADPARAMETERS_SEQ } ;
  116. AsnObjectIdentifier
  117. hrSystemInitialLoadParameters_oid = { HRSYSTEMINITIALLOADPARAMETERS_LENGTH, hrSystemInitialLoadParameters_array } ;
  118. static
  119. UINT
  120. hrSystemNumUsers_array[ HRSYSTEMNUMUSERS_LENGTH ] = { HRSYSTEMNUMUSERS_SEQ } ;
  121. AsnObjectIdentifier
  122. hrSystemNumUsers_oid = { HRSYSTEMNUMUSERS_LENGTH, hrSystemNumUsers_array } ;
  123. static
  124. UINT
  125. hrSystemProcesses_array[ HRSYSTEMPROCESSES_LENGTH ] = { HRSYSTEMPROCESSES_SEQ } ;
  126. AsnObjectIdentifier
  127. hrSystemProcesses_oid = { HRSYSTEMPROCESSES_LENGTH, hrSystemProcesses_array } ;
  128. static
  129. UINT
  130. hrSystemMaxProcesses_array[ HRSYSTEMMAXPROCESSES_LENGTH ] = { HRSYSTEMMAXPROCESSES_SEQ } ;
  131. AsnObjectIdentifier
  132. hrSystemMaxProcesses_oid = { HRSYSTEMMAXPROCESSES_LENGTH, hrSystemMaxProcesses_array } ;
  133. static
  134. UINT
  135. hrSystem_array[ HRSYSTEM_LENGTH ] = { HRSYSTEM_SEQ } ;
  136. AsnObjectIdentifier
  137. hrSystem_oid = { HRSYSTEM_LENGTH, hrSystem_array } ;
  138. variable_t
  139. hrSystem_var_table[] = {
  140. { NULL, ASN_NULL, NSM_NO_ACCESS, NULL, NULL, NULL, NULL } ,
  141. { &hrSystemUptime_oid, ASN_RFC1155_TIMETICKS, NSM_READ_ONLY,
  142. GetHrSystemUptime, NULL,
  143. SMIGetTimeTicks, SMISetTimeTicks } ,
  144. { &hrSystemDate_oid, ASN_OCTETSTRING, NSM_READ_ONLY,
  145. GetHrSystemDate, NULL,
  146. SMIGetDateAndTime, SMISetDateAndTime } ,
  147. { &hrSystemInitialLoadDevice_oid, ASN_INTEGER, NSM_READ_WRITE,
  148. GetHrSystemInitialLoadDevice, SetHrSystemInitialLoadDevice,
  149. SMIGetInteger, SMISetInteger } ,
  150. { &hrSystemInitialLoadParameters_oid, ASN_OCTETSTRING, NSM_READ_WRITE,
  151. GetHrSystemInitialLoadParameters, SetHrSystemInitialLoadParameters,
  152. SMIGetInternationalDisplayString, SMISetInternationalDisplayString } ,
  153. { &hrSystemNumUsers_oid, ASN_RFC1155_GAUGE, NSM_READ_ONLY,
  154. GetHrSystemNumUsers, NULL,
  155. SMIGetGauge, SMISetGauge } ,
  156. { &hrSystemProcesses_oid, ASN_RFC1155_GAUGE, NSM_READ_ONLY,
  157. GetHrSystemProcesses, NULL,
  158. SMIGetGauge, SMISetGauge } ,
  159. { &hrSystemMaxProcesses_oid, ASN_INTEGER, NSM_READ_ONLY,
  160. GetHrSystemMaxProcesses, NULL,
  161. SMIGetInteger, SMISetInteger } ,
  162. } ;
  163. // Next two lines are platform specific
  164. // BYTE hrSystem_set_array[ MAX_HRSYSTEM_CODE + 1];
  165. // extern BYTE hrSystem_set_array[] ;
  166. extern variable_t hrSystem_var_table[] ;
  167. static
  168. UINT
  169. hrMemorySize_array[ HRMEMORYSIZE_LENGTH ] = { HRMEMORYSIZE_SEQ } ;
  170. AsnObjectIdentifier
  171. hrMemorySize_oid = { HRMEMORYSIZE_LENGTH, hrMemorySize_array } ;
  172. static
  173. UINT
  174. hrStorage_array[ HRSTORAGE_LENGTH ] = { HRSTORAGE_SEQ } ;
  175. AsnObjectIdentifier
  176. hrStorage_oid = { HRSTORAGE_LENGTH, hrStorage_array } ;
  177. variable_t
  178. hrStorage_var_table[] = {
  179. { NULL, ASN_NULL, NSM_NO_ACCESS, NULL, NULL, NULL, NULL } ,
  180. { NULL, ASN_NULL, NSM_NO_ACCESS, NULL, NULL, NULL, NULL } ,
  181. { &hrMemorySize_oid, ASN_INTEGER, NSM_READ_ONLY,
  182. GetHrMemorySize, NULL,
  183. SMIGetKBytes, SMISetKBytes } ,
  184. } ;
  185. // Next two lines are platform specific
  186. // BYTE hrStorage_set_array[ MAX_HRSTORAGE_CODE + 1];
  187. // extern BYTE hrStorage_set_array[] ;
  188. extern variable_t hrStorage_var_table[] ;
  189. static
  190. UINT
  191. hrStorageOther_array[ HRSTORAGEOTHER_LENGTH ] = { HRSTORAGEOTHER_SEQ } ;
  192. AsnObjectIdentifier
  193. hrStorageOther_oid = { HRSTORAGEOTHER_LENGTH, hrStorageOther_array } ;
  194. static
  195. UINT
  196. hrStorageRAM_array[ HRSTORAGERAM_LENGTH ] = { HRSTORAGERAM_SEQ } ;
  197. AsnObjectIdentifier
  198. hrStorageRAM_oid = { HRSTORAGERAM_LENGTH, hrStorageRAM_array } ;
  199. static
  200. UINT
  201. hrStorageVirtualMemory_array[ HRSTORAGEVIRTUALMEMORY_LENGTH ] = { HRSTORAGEVIRTUALMEMORY_SEQ } ;
  202. AsnObjectIdentifier
  203. hrStorageVirtualMemory_oid = { HRSTORAGEVIRTUALMEMORY_LENGTH, hrStorageVirtualMemory_array } ;
  204. static
  205. UINT
  206. hrStorageFixedDisk_array[ HRSTORAGEFIXEDDISK_LENGTH ] = { HRSTORAGEFIXEDDISK_SEQ } ;
  207. AsnObjectIdentifier
  208. hrStorageFixedDisk_oid = { HRSTORAGEFIXEDDISK_LENGTH, hrStorageFixedDisk_array } ;
  209. static
  210. UINT
  211. hrStorageRemovableDisk_array[ HRSTORAGEREMOVABLEDISK_LENGTH ] = { HRSTORAGEREMOVABLEDISK_SEQ } ;
  212. AsnObjectIdentifier
  213. hrStorageRemovableDisk_oid = { HRSTORAGEREMOVABLEDISK_LENGTH, hrStorageRemovableDisk_array } ;
  214. static
  215. UINT
  216. hrStorageFloppyDisk_array[ HRSTORAGEFLOPPYDISK_LENGTH ] = { HRSTORAGEFLOPPYDISK_SEQ } ;
  217. AsnObjectIdentifier
  218. hrStorageFloppyDisk_oid = { HRSTORAGEFLOPPYDISK_LENGTH, hrStorageFloppyDisk_array } ;
  219. static
  220. UINT
  221. hrStorageCompactDisk_array[ HRSTORAGECOMPACTDISK_LENGTH ] = { HRSTORAGECOMPACTDISK_SEQ } ;
  222. AsnObjectIdentifier
  223. hrStorageCompactDisk_oid = { HRSTORAGECOMPACTDISK_LENGTH, hrStorageCompactDisk_array } ;
  224. static
  225. UINT
  226. hrStorageRamDisk_array[ HRSTORAGERAMDISK_LENGTH ] = { HRSTORAGERAMDISK_SEQ } ;
  227. AsnObjectIdentifier
  228. hrStorageRamDisk_oid = { HRSTORAGERAMDISK_LENGTH, hrStorageRamDisk_array } ;
  229. static
  230. UINT
  231. hrStorageTypes_array[ HRSTORAGETYPES_LENGTH ] = { HRSTORAGETYPES_SEQ } ;
  232. AsnObjectIdentifier
  233. hrStorageTypes_oid = { HRSTORAGETYPES_LENGTH, hrStorageTypes_array } ;
  234. static
  235. UINT
  236. hrStorageIndex_array[ HRSTORAGEINDEX_LENGTH ] = { HRSTORAGEINDEX_SEQ } ;
  237. AsnObjectIdentifier
  238. hrStorageIndex_oid = { HRSTORAGEINDEX_LENGTH, hrStorageIndex_array } ;
  239. static
  240. UINT
  241. hrStorageType_array[ HRSTORAGETYPE_LENGTH ] = { HRSTORAGETYPE_SEQ } ;
  242. AsnObjectIdentifier
  243. hrStorageType_oid = { HRSTORAGETYPE_LENGTH, hrStorageType_array } ;
  244. static
  245. UINT
  246. hrStorageDesc_array[ HRSTORAGEDESC_LENGTH ] = { HRSTORAGEDESC_SEQ } ;
  247. AsnObjectIdentifier
  248. hrStorageDesc_oid = { HRSTORAGEDESC_LENGTH, hrStorageDesc_array } ;
  249. static
  250. UINT
  251. hrStorageAllocationUnits_array[ HRSTORAGEALLOCATIONUNITS_LENGTH ] = { HRSTORAGEALLOCATIONUNITS_SEQ } ;
  252. AsnObjectIdentifier
  253. hrStorageAllocationUnits_oid = { HRSTORAGEALLOCATIONUNITS_LENGTH, hrStorageAllocationUnits_array } ;
  254. static
  255. UINT
  256. hrStorageSize_array[ HRSTORAGESIZE_LENGTH ] = { HRSTORAGESIZE_SEQ } ;
  257. AsnObjectIdentifier
  258. hrStorageSize_oid = { HRSTORAGESIZE_LENGTH, hrStorageSize_array } ;
  259. static
  260. UINT
  261. hrStorageUsed_array[ HRSTORAGEUSED_LENGTH ] = { HRSTORAGEUSED_SEQ } ;
  262. AsnObjectIdentifier
  263. hrStorageUsed_oid = { HRSTORAGEUSED_LENGTH, hrStorageUsed_array } ;
  264. static
  265. UINT
  266. hrStorageAllocationFailures_array[ HRSTORAGEALLOCATIONFAILURES_LENGTH ] = { HRSTORAGEALLOCATIONFAILURES_SEQ } ;
  267. AsnObjectIdentifier
  268. hrStorageAllocationFailures_oid = { HRSTORAGEALLOCATIONFAILURES_LENGTH, hrStorageAllocationFailures_array } ;
  269. static
  270. UINT
  271. hrStorageEntry_array[ HRSTORAGEENTRY_LENGTH ] = { HRSTORAGEENTRY_SEQ } ;
  272. AsnObjectIdentifier
  273. hrStorageEntry_oid = { HRSTORAGEENTRY_LENGTH, hrStorageEntry_array } ;
  274. variable_t
  275. hrStorageEntry_var_table[] = {
  276. { NULL, ASN_NULL, NSM_NO_ACCESS, NULL, NULL, NULL, NULL } ,
  277. { &hrStorageIndex_oid, ASN_INTEGER, NSM_READ_ONLY,
  278. GetHrStorageIndex, NULL,
  279. SMIGetInteger, SMISetInteger } ,
  280. { &hrStorageType_oid, ASN_OBJECTIDENTIFIER, NSM_READ_ONLY,
  281. GetHrStorageType, NULL,
  282. SMIGetObjectId, SMISetObjectId } ,
  283. { &hrStorageDesc_oid, ASN_RFC1213_DISPSTRING, NSM_READ_ONLY,
  284. GetHrStorageDesc, NULL,
  285. SMIGetDispString, SMISetDispString } ,
  286. { &hrStorageAllocationUnits_oid, ASN_INTEGER, NSM_READ_ONLY,
  287. GetHrStorageAllocationUnits, NULL,
  288. SMIGetInteger, SMISetInteger } ,
  289. { &hrStorageSize_oid, ASN_INTEGER, NSM_READ_WRITE,
  290. GetHrStorageSize, SetHrStorageSize,
  291. SMIGetInteger, SMISetInteger } ,
  292. { &hrStorageUsed_oid, ASN_INTEGER, NSM_READ_ONLY,
  293. GetHrStorageUsed, NULL,
  294. SMIGetInteger, SMISetInteger } ,
  295. { &hrStorageAllocationFailures_oid, ASN_RFC1155_COUNTER, NSM_READ_ONLY,
  296. GetHrStorageAllocationFailures, NULL,
  297. SMIGetCounter, SMISetCounter } ,
  298. } ;
  299. // Next two lines are platform specific
  300. // BYTE hrStorageEntry_set_array[ MAX_HRSTORAGEENTRY_CODE + 1];
  301. // extern BYTE hrStorageEntry_set_array[] ;
  302. extern variable_t hrStorageEntry_var_table[] ;
  303. static
  304. UINT
  305. hrDeviceOther_array[ HRDEVICEOTHER_LENGTH ] = { HRDEVICEOTHER_SEQ } ;
  306. AsnObjectIdentifier
  307. hrDeviceOther_oid = { HRDEVICEOTHER_LENGTH, hrDeviceOther_array } ;
  308. static
  309. UINT
  310. hrDeviceUnknown_array[ HRDEVICEUNKNOWN_LENGTH ] = { HRDEVICEUNKNOWN_SEQ } ;
  311. AsnObjectIdentifier
  312. hrDeviceUnknown_oid = { HRDEVICEUNKNOWN_LENGTH, hrDeviceUnknown_array } ;
  313. static
  314. UINT
  315. hrDeviceProcessor_array[ HRDEVICEPROCESSOR_LENGTH ] = { HRDEVICEPROCESSOR_SEQ } ;
  316. AsnObjectIdentifier
  317. hrDeviceProcessor_oid = { HRDEVICEPROCESSOR_LENGTH, hrDeviceProcessor_array } ;
  318. static
  319. UINT
  320. hrDeviceNetwork_array[ HRDEVICENETWORK_LENGTH ] = { HRDEVICENETWORK_SEQ } ;
  321. AsnObjectIdentifier
  322. hrDeviceNetwork_oid = { HRDEVICENETWORK_LENGTH, hrDeviceNetwork_array } ;
  323. static
  324. UINT
  325. hrDevicePrinter_array[ HRDEVICEPRINTER_LENGTH ] = { HRDEVICEPRINTER_SEQ } ;
  326. AsnObjectIdentifier
  327. hrDevicePrinter_oid = { HRDEVICEPRINTER_LENGTH, hrDevicePrinter_array } ;
  328. static
  329. UINT
  330. hrDeviceDiskStorage_array[ HRDEVICEDISKSTORAGE_LENGTH ] = { HRDEVICEDISKSTORAGE_SEQ } ;
  331. AsnObjectIdentifier
  332. hrDeviceDiskStorage_oid = { HRDEVICEDISKSTORAGE_LENGTH, hrDeviceDiskStorage_array } ;
  333. static
  334. UINT
  335. hrDeviceVideo_array[ HRDEVICEVIDEO_LENGTH ] = { HRDEVICEVIDEO_SEQ } ;
  336. AsnObjectIdentifier
  337. hrDeviceVideo_oid = { HRDEVICEVIDEO_LENGTH, hrDeviceVideo_array } ;
  338. static
  339. UINT
  340. hrDeviceAudio_array[ HRDEVICEAUDIO_LENGTH ] = { HRDEVICEAUDIO_SEQ } ;
  341. AsnObjectIdentifier
  342. hrDeviceAudio_oid = { HRDEVICEAUDIO_LENGTH, hrDeviceAudio_array } ;
  343. static
  344. UINT
  345. hrDeviceCoprocessor_array[ HRDEVICECOPROCESSOR_LENGTH ] = { HRDEVICECOPROCESSOR_SEQ } ;
  346. AsnObjectIdentifier
  347. hrDeviceCoprocessor_oid = { HRDEVICECOPROCESSOR_LENGTH, hrDeviceCoprocessor_array } ;
  348. static
  349. UINT
  350. hrDeviceKeyboard_array[ HRDEVICEKEYBOARD_LENGTH ] = { HRDEVICEKEYBOARD_SEQ } ;
  351. AsnObjectIdentifier
  352. hrDeviceKeyboard_oid = { HRDEVICEKEYBOARD_LENGTH, hrDeviceKeyboard_array } ;
  353. static
  354. UINT
  355. hrDeviceModem_array[ HRDEVICEMODEM_LENGTH ] = { HRDEVICEMODEM_SEQ } ;
  356. AsnObjectIdentifier
  357. hrDeviceModem_oid = { HRDEVICEMODEM_LENGTH, hrDeviceModem_array } ;
  358. static
  359. UINT
  360. hrDeviceParallelPort_array[ HRDEVICEPARALLELPORT_LENGTH ] = { HRDEVICEPARALLELPORT_SEQ } ;
  361. AsnObjectIdentifier
  362. hrDeviceParallelPort_oid = { HRDEVICEPARALLELPORT_LENGTH, hrDeviceParallelPort_array } ;
  363. static
  364. UINT
  365. hrDevicePointing_array[ HRDEVICEPOINTING_LENGTH ] = { HRDEVICEPOINTING_SEQ } ;
  366. AsnObjectIdentifier
  367. hrDevicePointing_oid = { HRDEVICEPOINTING_LENGTH, hrDevicePointing_array } ;
  368. static
  369. UINT
  370. hrDeviceSerialPort_array[ HRDEVICESERIALPORT_LENGTH ] = { HRDEVICESERIALPORT_SEQ } ;
  371. AsnObjectIdentifier
  372. hrDeviceSerialPort_oid = { HRDEVICESERIALPORT_LENGTH, hrDeviceSerialPort_array } ;
  373. static
  374. UINT
  375. hrDeviceTape_array[ HRDEVICETAPE_LENGTH ] = { HRDEVICETAPE_SEQ } ;
  376. AsnObjectIdentifier
  377. hrDeviceTape_oid = { HRDEVICETAPE_LENGTH, hrDeviceTape_array } ;
  378. static
  379. UINT
  380. hrDeviceClock_array[ HRDEVICECLOCK_LENGTH ] = { HRDEVICECLOCK_SEQ } ;
  381. AsnObjectIdentifier
  382. hrDeviceClock_oid = { HRDEVICECLOCK_LENGTH, hrDeviceClock_array } ;
  383. static
  384. UINT
  385. hrDeviceVolatileMemory_array[ HRDEVICEVOLATILEMEMORY_LENGTH ] = { HRDEVICEVOLATILEMEMORY_SEQ } ;
  386. AsnObjectIdentifier
  387. hrDeviceVolatileMemory_oid = { HRDEVICEVOLATILEMEMORY_LENGTH, hrDeviceVolatileMemory_array } ;
  388. static
  389. UINT
  390. hrDeviceNonVolatileMemory_array[ HRDEVICENONVOLATILEMEMORY_LENGTH ] = { HRDEVICENONVOLATILEMEMORY_SEQ } ;
  391. AsnObjectIdentifier
  392. hrDeviceNonVolatileMemory_oid = { HRDEVICENONVOLATILEMEMORY_LENGTH, hrDeviceNonVolatileMemory_array } ;
  393. static
  394. UINT
  395. hrDeviceTypes_array[ HRDEVICETYPES_LENGTH ] = { HRDEVICETYPES_SEQ } ;
  396. AsnObjectIdentifier
  397. hrDeviceTypes_oid = { HRDEVICETYPES_LENGTH, hrDeviceTypes_array } ;
  398. static
  399. UINT
  400. hrDeviceIndex_array[ HRDEVICEINDEX_LENGTH ] = { HRDEVICEINDEX_SEQ } ;
  401. AsnObjectIdentifier
  402. hrDeviceIndex_oid = { HRDEVICEINDEX_LENGTH, hrDeviceIndex_array } ;
  403. static
  404. UINT
  405. hrDeviceType_array[ HRDEVICETYPE_LENGTH ] = { HRDEVICETYPE_SEQ } ;
  406. AsnObjectIdentifier
  407. hrDeviceType_oid = { HRDEVICETYPE_LENGTH, hrDeviceType_array } ;
  408. static
  409. UINT
  410. hrDeviceDesc_array[ HRDEVICEDESC_LENGTH ] = { HRDEVICEDESC_SEQ } ;
  411. AsnObjectIdentifier
  412. hrDeviceDesc_oid = { HRDEVICEDESC_LENGTH, hrDeviceDesc_array } ;
  413. static
  414. UINT
  415. hrDeviceID_array[ HRDEVICEID_LENGTH ] = { HRDEVICEID_SEQ } ;
  416. AsnObjectIdentifier
  417. hrDeviceID_oid = { HRDEVICEID_LENGTH, hrDeviceID_array } ;
  418. static
  419. UINT
  420. hrDeviceStatus_array[ HRDEVICESTATUS_LENGTH ] = { HRDEVICESTATUS_SEQ } ;
  421. AsnObjectIdentifier
  422. hrDeviceStatus_oid = { HRDEVICESTATUS_LENGTH, hrDeviceStatus_array } ;
  423. static
  424. UINT
  425. hrDeviceErrors_array[ HRDEVICEERRORS_LENGTH ] = { HRDEVICEERRORS_SEQ } ;
  426. AsnObjectIdentifier
  427. hrDeviceErrors_oid = { HRDEVICEERRORS_LENGTH, hrDeviceErrors_array } ;
  428. static
  429. UINT
  430. hrDeviceEntry_array[ HRDEVICEENTRY_LENGTH ] = { HRDEVICEENTRY_SEQ } ;
  431. AsnObjectIdentifier
  432. hrDeviceEntry_oid = { HRDEVICEENTRY_LENGTH, hrDeviceEntry_array } ;
  433. variable_t
  434. hrDeviceEntry_var_table[] = {
  435. { NULL, ASN_NULL, NSM_NO_ACCESS, NULL, NULL, NULL, NULL } ,
  436. { &hrDeviceIndex_oid, ASN_INTEGER, NSM_READ_ONLY,
  437. GetHrDeviceIndex, NULL,
  438. SMIGetInteger, SMISetInteger } ,
  439. { &hrDeviceType_oid, ASN_OBJECTIDENTIFIER, NSM_READ_ONLY,
  440. GetHrDeviceType, NULL,
  441. SMIGetObjectId, SMISetObjectId } ,
  442. { &hrDeviceDesc_oid, ASN_RFC1213_DISPSTRING, NSM_READ_ONLY,
  443. GetHrDeviceDesc, NULL,
  444. SMIGetDispString, SMISetDispString } ,
  445. { &hrDeviceID_oid, ASN_OBJECTIDENTIFIER, NSM_READ_ONLY,
  446. GetHrDeviceID, NULL,
  447. SMIGetProductID, SMISetProductID } ,
  448. { &hrDeviceStatus_oid, ASN_INTEGER, NSM_READ_ONLY,
  449. GetHrDeviceStatus, NULL,
  450. SMIGetINThrDeviceStatus, SMISetINThrDeviceStatus } ,
  451. { &hrDeviceErrors_oid, ASN_RFC1155_COUNTER, NSM_READ_ONLY,
  452. GetHrDeviceErrors, NULL,
  453. SMIGetCounter, SMISetCounter } ,
  454. } ;
  455. // Next two lines are platform specific
  456. // BYTE hrDeviceEntry_set_array[ MAX_HRDEVICEENTRY_CODE + 1];
  457. // extern BYTE hrDeviceEntry_set_array[] ;
  458. extern variable_t hrDeviceEntry_var_table[] ;
  459. static
  460. UINT
  461. hrProcessorFrwID_array[ HRPROCESSORFRWID_LENGTH ] = { HRPROCESSORFRWID_SEQ } ;
  462. AsnObjectIdentifier
  463. hrProcessorFrwID_oid = { HRPROCESSORFRWID_LENGTH, hrProcessorFrwID_array } ;
  464. static
  465. UINT
  466. hrProcessorLoad_array[ HRPROCESSORLOAD_LENGTH ] = { HRPROCESSORLOAD_SEQ } ;
  467. AsnObjectIdentifier
  468. hrProcessorLoad_oid = { HRPROCESSORLOAD_LENGTH, hrProcessorLoad_array } ;
  469. static
  470. UINT
  471. hrProcessorEntry_array[ HRPROCESSORENTRY_LENGTH ] = { HRPROCESSORENTRY_SEQ } ;
  472. AsnObjectIdentifier
  473. hrProcessorEntry_oid = { HRPROCESSORENTRY_LENGTH, hrProcessorEntry_array } ;
  474. variable_t
  475. hrProcessorEntry_var_table[] = {
  476. { NULL, ASN_NULL, NSM_NO_ACCESS, NULL, NULL, NULL, NULL } ,
  477. { &hrProcessorFrwID_oid, ASN_OBJECTIDENTIFIER, NSM_READ_ONLY,
  478. GetHrProcessorFrwID, NULL,
  479. SMIGetProductID, SMISetProductID } ,
  480. { &hrProcessorLoad_oid, ASN_INTEGER, NSM_READ_ONLY,
  481. GetHrProcessorLoad, NULL,
  482. SMIGetInteger, SMISetInteger } ,
  483. } ;
  484. // Next two lines are platform specific
  485. // BYTE hrProcessorEntry_set_array[ MAX_HRPROCESSORENTRY_CODE + 1];
  486. // extern BYTE hrProcessorEntry_set_array[] ;
  487. extern variable_t hrProcessorEntry_var_table[] ;
  488. static
  489. UINT
  490. hrNetworkIfIndex_array[ HRNETWORKIFINDEX_LENGTH ] = { HRNETWORKIFINDEX_SEQ } ;
  491. AsnObjectIdentifier
  492. hrNetworkIfIndex_oid = { HRNETWORKIFINDEX_LENGTH, hrNetworkIfIndex_array } ;
  493. static
  494. UINT
  495. hrNetworkEntry_array[ HRNETWORKENTRY_LENGTH ] = { HRNETWORKENTRY_SEQ } ;
  496. AsnObjectIdentifier
  497. hrNetworkEntry_oid = { HRNETWORKENTRY_LENGTH, hrNetworkEntry_array } ;
  498. variable_t
  499. hrNetworkEntry_var_table[] = {
  500. { NULL, ASN_NULL, NSM_NO_ACCESS, NULL, NULL, NULL, NULL } ,
  501. { &hrNetworkIfIndex_oid, ASN_INTEGER, NSM_READ_ONLY,
  502. GetHrNetworkIfIndex, NULL,
  503. SMIGetInteger, SMISetInteger } ,
  504. } ;
  505. // Next two lines are platform specific
  506. // BYTE hrNetworkEntry_set_array[ MAX_HRNETWORKENTRY_CODE + 1];
  507. // extern BYTE hrNetworkEntry_set_array[] ;
  508. extern variable_t hrNetworkEntry_var_table[] ;
  509. static
  510. UINT
  511. hrPrinterStatus_array[ HRPRINTERSTATUS_LENGTH ] = { HRPRINTERSTATUS_SEQ } ;
  512. AsnObjectIdentifier
  513. hrPrinterStatus_oid = { HRPRINTERSTATUS_LENGTH, hrPrinterStatus_array } ;
  514. static
  515. UINT
  516. hrPrinterDetectedErrorState_array[ HRPRINTERDETECTEDERRORSTATE_LENGTH ] = { HRPRINTERDETECTEDERRORSTATE_SEQ } ;
  517. AsnObjectIdentifier
  518. hrPrinterDetectedErrorState_oid = { HRPRINTERDETECTEDERRORSTATE_LENGTH, hrPrinterDetectedErrorState_array } ;
  519. static
  520. UINT
  521. hrPrinterEntry_array[ HRPRINTERENTRY_LENGTH ] = { HRPRINTERENTRY_SEQ } ;
  522. AsnObjectIdentifier
  523. hrPrinterEntry_oid = { HRPRINTERENTRY_LENGTH, hrPrinterEntry_array } ;
  524. variable_t
  525. hrPrinterEntry_var_table[] = {
  526. { NULL, ASN_NULL, NSM_NO_ACCESS, NULL, NULL, NULL, NULL } ,
  527. { &hrPrinterStatus_oid, ASN_INTEGER, NSM_READ_ONLY,
  528. GetHrPrinterStatus, NULL,
  529. SMIGetINThrPrinterStatus, SMISetINThrPrinterStatus } ,
  530. { &hrPrinterDetectedErrorState_oid, ASN_OCTETSTRING, NSM_READ_ONLY,
  531. GetHrPrinterDetectedErrorState, NULL,
  532. SMIGetOctetString, SMISetOctetString } ,
  533. } ;
  534. // Next two lines are platform specific
  535. // BYTE hrPrinterEntry_set_array[ MAX_HRPRINTERENTRY_CODE + 1];
  536. // extern BYTE hrPrinterEntry_set_array[] ;
  537. extern variable_t hrPrinterEntry_var_table[] ;
  538. static
  539. UINT
  540. hrDiskStorageAccess_array[ HRDISKSTORAGEACCESS_LENGTH ] = { HRDISKSTORAGEACCESS_SEQ } ;
  541. AsnObjectIdentifier
  542. hrDiskStorageAccess_oid = { HRDISKSTORAGEACCESS_LENGTH, hrDiskStorageAccess_array } ;
  543. static
  544. UINT
  545. hrDiskStorageMedia_array[ HRDISKSTORAGEMEDIA_LENGTH ] = { HRDISKSTORAGEMEDIA_SEQ } ;
  546. AsnObjectIdentifier
  547. hrDiskStorageMedia_oid = { HRDISKSTORAGEMEDIA_LENGTH, hrDiskStorageMedia_array } ;
  548. static
  549. UINT
  550. hrDiskStorageRemoveble_array[ HRDISKSTORAGEREMOVEBLE_LENGTH ] = { HRDISKSTORAGEREMOVEBLE_SEQ } ;
  551. AsnObjectIdentifier
  552. hrDiskStorageRemoveble_oid = { HRDISKSTORAGEREMOVEBLE_LENGTH, hrDiskStorageRemoveble_array } ;
  553. static
  554. UINT
  555. hrDiskStorageCapacity_array[ HRDISKSTORAGECAPACITY_LENGTH ] = { HRDISKSTORAGECAPACITY_SEQ } ;
  556. AsnObjectIdentifier
  557. hrDiskStorageCapacity_oid = { HRDISKSTORAGECAPACITY_LENGTH, hrDiskStorageCapacity_array } ;
  558. static
  559. UINT
  560. hrDiskStorageEntry_array[ HRDISKSTORAGEENTRY_LENGTH ] = { HRDISKSTORAGEENTRY_SEQ } ;
  561. AsnObjectIdentifier
  562. hrDiskStorageEntry_oid = { HRDISKSTORAGEENTRY_LENGTH, hrDiskStorageEntry_array } ;
  563. variable_t
  564. hrDiskStorageEntry_var_table[] = {
  565. { NULL, ASN_NULL, NSM_NO_ACCESS, NULL, NULL, NULL, NULL } ,
  566. { &hrDiskStorageAccess_oid, ASN_INTEGER, NSM_READ_ONLY,
  567. GetHrDiskStorageAccess, NULL,
  568. SMIGetINTAccess, SMISetINTAccess } ,
  569. { &hrDiskStorageMedia_oid, ASN_INTEGER, NSM_READ_ONLY,
  570. GetHrDiskStorageMedia, NULL,
  571. SMIGetINThrDiskStorageMedia, SMISetINThrDiskStorageMedia } ,
  572. { &hrDiskStorageRemoveble_oid, ASN_INTEGER, NSM_READ_ONLY,
  573. GetHrDiskStorageRemoveble, NULL,
  574. SMIGetBoolean, SMISetBoolean } ,
  575. { &hrDiskStorageCapacity_oid, ASN_INTEGER, NSM_READ_ONLY,
  576. GetHrDiskStorageCapacity, NULL,
  577. SMIGetKBytes, SMISetKBytes } ,
  578. } ;
  579. // Next two lines are platform specific
  580. // BYTE hrDiskStorageEntry_set_array[ MAX_HRDISKSTORAGEENTRY_CODE + 1];
  581. // extern BYTE hrDiskStorageEntry_set_array[] ;
  582. extern variable_t hrDiskStorageEntry_var_table[] ;
  583. static
  584. UINT
  585. hrPartitionIndex_array[ HRPARTITIONINDEX_LENGTH ] = { HRPARTITIONINDEX_SEQ } ;
  586. AsnObjectIdentifier
  587. hrPartitionIndex_oid = { HRPARTITIONINDEX_LENGTH, hrPartitionIndex_array } ;
  588. static
  589. UINT
  590. hrPartitionLabel_array[ HRPARTITIONLABEL_LENGTH ] = { HRPARTITIONLABEL_SEQ } ;
  591. AsnObjectIdentifier
  592. hrPartitionLabel_oid = { HRPARTITIONLABEL_LENGTH, hrPartitionLabel_array } ;
  593. static
  594. UINT
  595. hrPartitionID_array[ HRPARTITIONID_LENGTH ] = { HRPARTITIONID_SEQ } ;
  596. AsnObjectIdentifier
  597. hrPartitionID_oid = { HRPARTITIONID_LENGTH, hrPartitionID_array } ;
  598. static
  599. UINT
  600. hrPartitionSize_array[ HRPARTITIONSIZE_LENGTH ] = { HRPARTITIONSIZE_SEQ } ;
  601. AsnObjectIdentifier
  602. hrPartitionSize_oid = { HRPARTITIONSIZE_LENGTH, hrPartitionSize_array } ;
  603. static
  604. UINT
  605. hrPartitionFSIndex_array[ HRPARTITIONFSINDEX_LENGTH ] = { HRPARTITIONFSINDEX_SEQ } ;
  606. AsnObjectIdentifier
  607. hrPartitionFSIndex_oid = { HRPARTITIONFSINDEX_LENGTH, hrPartitionFSIndex_array } ;
  608. static
  609. UINT
  610. hrPartitionEntry_array[ HRPARTITIONENTRY_LENGTH ] = { HRPARTITIONENTRY_SEQ } ;
  611. AsnObjectIdentifier
  612. hrPartitionEntry_oid = { HRPARTITIONENTRY_LENGTH, hrPartitionEntry_array } ;
  613. variable_t
  614. hrPartitionEntry_var_table[] = {
  615. { NULL, ASN_NULL, NSM_NO_ACCESS, NULL, NULL, NULL, NULL } ,
  616. { &hrPartitionIndex_oid, ASN_INTEGER, NSM_READ_ONLY,
  617. GetHrPartitionIndex, NULL,
  618. SMIGetInteger, SMISetInteger } ,
  619. { &hrPartitionLabel_oid, ASN_OCTETSTRING, NSM_READ_ONLY,
  620. GetHrPartitionLabel, NULL,
  621. SMIGetInternationalDisplayString, SMISetInternationalDisplayString } ,
  622. { &hrPartitionID_oid, ASN_OCTETSTRING, NSM_READ_ONLY,
  623. GetHrPartitionID, NULL,
  624. SMIGetOctetString, SMISetOctetString } ,
  625. { &hrPartitionSize_oid, ASN_INTEGER, NSM_READ_ONLY,
  626. GetHrPartitionSize, NULL,
  627. SMIGetKBytes, SMISetKBytes } ,
  628. { &hrPartitionFSIndex_oid, ASN_INTEGER, NSM_READ_ONLY,
  629. GetHrPartitionFSIndex, NULL,
  630. SMIGetInteger, SMISetInteger } ,
  631. } ;
  632. // Next two lines are platform specific
  633. // BYTE hrPartitionEntry_set_array[ MAX_HRPARTITIONENTRY_CODE + 1];
  634. // extern BYTE hrPartitionEntry_set_array[] ;
  635. extern variable_t hrPartitionEntry_var_table[] ;
  636. static
  637. UINT
  638. hrFSIndex_array[ HRFSINDEX_LENGTH ] = { HRFSINDEX_SEQ } ;
  639. AsnObjectIdentifier
  640. hrFSIndex_oid = { HRFSINDEX_LENGTH, hrFSIndex_array } ;
  641. static
  642. UINT
  643. hrFSMountPoint_array[ HRFSMOUNTPOINT_LENGTH ] = { HRFSMOUNTPOINT_SEQ } ;
  644. AsnObjectIdentifier
  645. hrFSMountPoint_oid = { HRFSMOUNTPOINT_LENGTH, hrFSMountPoint_array } ;
  646. static
  647. UINT
  648. hrFSRemoteMountPoint_array[ HRFSREMOTEMOUNTPOINT_LENGTH ] = { HRFSREMOTEMOUNTPOINT_SEQ } ;
  649. AsnObjectIdentifier
  650. hrFSRemoteMountPoint_oid = { HRFSREMOTEMOUNTPOINT_LENGTH, hrFSRemoteMountPoint_array } ;
  651. static
  652. UINT
  653. hrFSType_array[ HRFSTYPE_LENGTH ] = { HRFSTYPE_SEQ } ;
  654. AsnObjectIdentifier
  655. hrFSType_oid = { HRFSTYPE_LENGTH, hrFSType_array } ;
  656. static
  657. UINT
  658. hrFSAccess_array[ HRFSACCESS_LENGTH ] = { HRFSACCESS_SEQ } ;
  659. AsnObjectIdentifier
  660. hrFSAccess_oid = { HRFSACCESS_LENGTH, hrFSAccess_array } ;
  661. static
  662. UINT
  663. hrFSBootable_array[ HRFSBOOTABLE_LENGTH ] = { HRFSBOOTABLE_SEQ } ;
  664. AsnObjectIdentifier
  665. hrFSBootable_oid = { HRFSBOOTABLE_LENGTH, hrFSBootable_array } ;
  666. static
  667. UINT
  668. hrFSStorageIndex_array[ HRFSSTORAGEINDEX_LENGTH ] = { HRFSSTORAGEINDEX_SEQ } ;
  669. AsnObjectIdentifier
  670. hrFSStorageIndex_oid = { HRFSSTORAGEINDEX_LENGTH, hrFSStorageIndex_array } ;
  671. static
  672. UINT
  673. hrFSLastFullBackupDate_array[ HRFSLASTFULLBACKUPDATE_LENGTH ] = { HRFSLASTFULLBACKUPDATE_SEQ } ;
  674. AsnObjectIdentifier
  675. hrFSLastFullBackupDate_oid = { HRFSLASTFULLBACKUPDATE_LENGTH, hrFSLastFullBackupDate_array } ;
  676. static
  677. UINT
  678. hrFSLastPartialBackupDate_array[ HRFSLASTPARTIALBACKUPDATE_LENGTH ] = { HRFSLASTPARTIALBACKUPDATE_SEQ } ;
  679. AsnObjectIdentifier
  680. hrFSLastPartialBackupDate_oid = { HRFSLASTPARTIALBACKUPDATE_LENGTH, hrFSLastPartialBackupDate_array } ;
  681. static
  682. UINT
  683. hrFSEntry_array[ HRFSENTRY_LENGTH ] = { HRFSENTRY_SEQ } ;
  684. AsnObjectIdentifier
  685. hrFSEntry_oid = { HRFSENTRY_LENGTH, hrFSEntry_array } ;
  686. variable_t
  687. hrFSEntry_var_table[] = {
  688. { NULL, ASN_NULL, NSM_NO_ACCESS, NULL, NULL, NULL, NULL } ,
  689. { &hrFSIndex_oid, ASN_INTEGER, NSM_READ_ONLY,
  690. GetHrFSIndex, NULL,
  691. SMIGetInteger, SMISetInteger } ,
  692. { &hrFSMountPoint_oid, ASN_OCTETSTRING, NSM_READ_ONLY,
  693. GetHrFSMountPoint, NULL,
  694. SMIGetInternationalDisplayString, SMISetInternationalDisplayString } ,
  695. { &hrFSRemoteMountPoint_oid, ASN_OCTETSTRING, NSM_READ_ONLY,
  696. GetHrFSRemoteMountPoint, NULL,
  697. SMIGetInternationalDisplayString, SMISetInternationalDisplayString } ,
  698. { &hrFSType_oid, ASN_OBJECTIDENTIFIER, NSM_READ_ONLY,
  699. GetHrFSType, NULL,
  700. SMIGetObjectId, SMISetObjectId } ,
  701. { &hrFSAccess_oid, ASN_INTEGER, NSM_READ_ONLY,
  702. GetHrFSAccess, NULL,
  703. SMIGetINTAccess, SMISetINTAccess } ,
  704. { &hrFSBootable_oid, ASN_INTEGER, NSM_READ_ONLY,
  705. GetHrFSBootable, NULL,
  706. SMIGetBoolean, SMISetBoolean } ,
  707. { &hrFSStorageIndex_oid, ASN_INTEGER, NSM_READ_ONLY,
  708. GetHrFSStorageIndex, NULL,
  709. SMIGetInteger, SMISetInteger } ,
  710. { &hrFSLastFullBackupDate_oid, ASN_OCTETSTRING, NSM_READ_WRITE,
  711. GetHrFSLastFullBackupDate, SetHrFSLastFullBackupDate,
  712. SMIGetDateAndTime, SMISetDateAndTime } ,
  713. { &hrFSLastPartialBackupDate_oid, ASN_OCTETSTRING, NSM_READ_WRITE,
  714. GetHrFSLastPartialBackupDate, SetHrFSLastPartialBackupDate,
  715. SMIGetDateAndTime, SMISetDateAndTime } ,
  716. } ;
  717. // Next two lines are platform specific
  718. // BYTE hrFSEntry_set_array[ MAX_HRFSENTRY_CODE + 1];
  719. // extern BYTE hrFSEntry_set_array[] ;
  720. extern variable_t hrFSEntry_var_table[] ;
  721. static
  722. UINT
  723. hrFSOther_array[ HRFSOTHER_LENGTH ] = { HRFSOTHER_SEQ } ;
  724. AsnObjectIdentifier
  725. hrFSOther_oid = { HRFSOTHER_LENGTH, hrFSOther_array } ;
  726. static
  727. UINT
  728. hrFSUnknown_array[ HRFSUNKNOWN_LENGTH ] = { HRFSUNKNOWN_SEQ } ;
  729. AsnObjectIdentifier
  730. hrFSUnknown_oid = { HRFSUNKNOWN_LENGTH, hrFSUnknown_array } ;
  731. static
  732. UINT
  733. hrFSBerkeleyFFS_array[ HRFSBERKELEYFFS_LENGTH ] = { HRFSBERKELEYFFS_SEQ } ;
  734. AsnObjectIdentifier
  735. hrFSBerkeleyFFS_oid = { HRFSBERKELEYFFS_LENGTH, hrFSBerkeleyFFS_array } ;
  736. static
  737. UINT
  738. hrFSSys5FS_array[ HRFSSYS5FS_LENGTH ] = { HRFSSYS5FS_SEQ } ;
  739. AsnObjectIdentifier
  740. hrFSSys5FS_oid = { HRFSSYS5FS_LENGTH, hrFSSys5FS_array } ;
  741. /*
  742. * DOS
  743. */
  744. static
  745. UINT
  746. hrFSFat_array[ HRFSFAT_LENGTH ] = { HRFSFAT_SEQ } ;
  747. AsnObjectIdentifier
  748. hrFSFat_oid = { HRFSFAT_LENGTH, hrFSFat_array } ;
  749. /*
  750. * OS/2 High Performance File System
  751. */
  752. static
  753. UINT
  754. hrFSHPFS_array[ HRFSHPFS_LENGTH ] = { HRFSHPFS_SEQ } ;
  755. AsnObjectIdentifier
  756. hrFSHPFS_oid = { HRFSHPFS_LENGTH, hrFSHPFS_array } ;
  757. /*
  758. * Macintosh Hierarchical File System
  759. */
  760. static
  761. UINT
  762. hrFSHFS_array[ HRFSHFS_LENGTH ] = { HRFSHFS_SEQ } ;
  763. AsnObjectIdentifier
  764. hrFSHFS_oid = { HRFSHFS_LENGTH, hrFSHFS_array } ;
  765. /*
  766. * Macintosh File System
  767. */
  768. static
  769. UINT
  770. hrFSMFS_array[ HRFSMFS_LENGTH ] = { HRFSMFS_SEQ } ;
  771. AsnObjectIdentifier
  772. hrFSMFS_oid = { HRFSMFS_LENGTH, hrFSMFS_array } ;
  773. /*
  774. * Windows NT
  775. */
  776. static
  777. UINT
  778. hrFSNTFS_array[ HRFSNTFS_LENGTH ] = { HRFSNTFS_SEQ } ;
  779. AsnObjectIdentifier
  780. hrFSNTFS_oid = { HRFSNTFS_LENGTH, hrFSNTFS_array } ;
  781. static
  782. UINT
  783. hrFSVNode_array[ HRFSVNODE_LENGTH ] = { HRFSVNODE_SEQ } ;
  784. AsnObjectIdentifier
  785. hrFSVNode_oid = { HRFSVNODE_LENGTH, hrFSVNode_array } ;
  786. static
  787. UINT
  788. hrFSJournaled_array[ HRFSJOURNALED_LENGTH ] = { HRFSJOURNALED_SEQ } ;
  789. AsnObjectIdentifier
  790. hrFSJournaled_oid = { HRFSJOURNALED_LENGTH, hrFSJournaled_array } ;
  791. /*
  792. * CD File System
  793. */
  794. static
  795. UINT
  796. hrFSiso9660_array[ HRFSISO9660_LENGTH ] = { HRFSISO9660_SEQ } ;
  797. AsnObjectIdentifier
  798. hrFSiso9660_oid = { HRFSISO9660_LENGTH, hrFSiso9660_array } ;
  799. static
  800. UINT
  801. hrFSRockRidge_array[ HRFSROCKRIDGE_LENGTH ] = { HRFSROCKRIDGE_SEQ } ;
  802. AsnObjectIdentifier
  803. hrFSRockRidge_oid = { HRFSROCKRIDGE_LENGTH, hrFSRockRidge_array } ;
  804. static
  805. UINT
  806. hrFSNFS_array[ HRFSNFS_LENGTH ] = { HRFSNFS_SEQ } ;
  807. AsnObjectIdentifier
  808. hrFSNFS_oid = { HRFSNFS_LENGTH, hrFSNFS_array } ;
  809. static
  810. UINT
  811. hrFSNetware_array[ HRFSNETWARE_LENGTH ] = { HRFSNETWARE_SEQ } ;
  812. AsnObjectIdentifier
  813. hrFSNetware_oid = { HRFSNETWARE_LENGTH, hrFSNetware_array } ;
  814. /*
  815. * Andrew File System
  816. */
  817. static
  818. UINT
  819. hrFSAFS_array[ HRFSAFS_LENGTH ] = { HRFSAFS_SEQ } ;
  820. AsnObjectIdentifier
  821. hrFSAFS_oid = { HRFSAFS_LENGTH, hrFSAFS_array } ;
  822. /*
  823. * OSF DCE Distributed File System
  824. */
  825. static
  826. UINT
  827. hrFSDFS_array[ HRFSDFS_LENGTH ] = { HRFSDFS_SEQ } ;
  828. AsnObjectIdentifier
  829. hrFSDFS_oid = { HRFSDFS_LENGTH, hrFSDFS_array } ;
  830. static
  831. UINT
  832. hrFSApplshare_array[ HRFSAPPLSHARE_LENGTH ] = { HRFSAPPLSHARE_SEQ } ;
  833. AsnObjectIdentifier
  834. hrFSApplshare_oid = { HRFSAPPLSHARE_LENGTH, hrFSApplshare_array } ;
  835. static
  836. UINT
  837. hrFSRFS_array[ HRFSRFS_LENGTH ] = { HRFSRFS_SEQ } ;
  838. AsnObjectIdentifier
  839. hrFSRFS_oid = { HRFSRFS_LENGTH, hrFSRFS_array } ;
  840. /*
  841. * Data General
  842. */
  843. static
  844. UINT
  845. hrFSDGFS_array[ HRFSDGFS_LENGTH ] = { HRFSDGFS_SEQ } ;
  846. AsnObjectIdentifier
  847. hrFSDGFS_oid = { HRFSDGFS_LENGTH, hrFSDGFS_array } ;
  848. /*
  849. * SVR4 Boot File System
  850. */
  851. static
  852. UINT
  853. hrFSBFS_array[ HRFSBFS_LENGTH ] = { HRFSBFS_SEQ } ;
  854. AsnObjectIdentifier
  855. hrFSBFS_oid = { HRFSBFS_LENGTH, hrFSBFS_array } ;
  856. static
  857. UINT
  858. hrFSTypes_array[ HRFSTYPES_LENGTH ] = { HRFSTYPES_SEQ } ;
  859. AsnObjectIdentifier
  860. hrFSTypes_oid = { HRFSTYPES_LENGTH, hrFSTypes_array } ;
  861. static
  862. UINT
  863. hrSWOSIndex_array[ HRSWOSINDEX_LENGTH ] = { HRSWOSINDEX_SEQ } ;
  864. AsnObjectIdentifier
  865. hrSWOSIndex_oid = { HRSWOSINDEX_LENGTH, hrSWOSIndex_array } ;
  866. static
  867. UINT
  868. hrSWRun_array[ HRSWRUN_LENGTH ] = { HRSWRUN_SEQ } ;
  869. AsnObjectIdentifier
  870. hrSWRun_oid = { HRSWRUN_LENGTH, hrSWRun_array } ;
  871. variable_t
  872. hrSWRun_var_table[] = {
  873. { NULL, ASN_NULL, NSM_NO_ACCESS, NULL, NULL, NULL, NULL } ,
  874. { &hrSWOSIndex_oid, ASN_INTEGER, NSM_READ_ONLY,
  875. GetHrSWOSIndex, NULL,
  876. SMIGetInteger, SMISetInteger } ,
  877. } ;
  878. // Next two lines are platform specific
  879. // BYTE hrSWRun_set_array[ MAX_HRSWRUN_CODE + 1];
  880. // extern BYTE hrSWRun_set_array[] ;
  881. extern variable_t hrSWRun_var_table[] ;
  882. static
  883. UINT
  884. hrSWRunIndex_array[ HRSWRUNINDEX_LENGTH ] = { HRSWRUNINDEX_SEQ } ;
  885. AsnObjectIdentifier
  886. hrSWRunIndex_oid = { HRSWRUNINDEX_LENGTH, hrSWRunIndex_array } ;
  887. static
  888. UINT
  889. hrSWRunName_array[ HRSWRUNNAME_LENGTH ] = { HRSWRUNNAME_SEQ } ;
  890. AsnObjectIdentifier
  891. hrSWRunName_oid = { HRSWRUNNAME_LENGTH, hrSWRunName_array } ;
  892. static
  893. UINT
  894. hrSWRunID_array[ HRSWRUNID_LENGTH ] = { HRSWRUNID_SEQ } ;
  895. AsnObjectIdentifier
  896. hrSWRunID_oid = { HRSWRUNID_LENGTH, hrSWRunID_array } ;
  897. static
  898. UINT
  899. hrSWRunPath_array[ HRSWRUNPATH_LENGTH ] = { HRSWRUNPATH_SEQ } ;
  900. AsnObjectIdentifier
  901. hrSWRunPath_oid = { HRSWRUNPATH_LENGTH, hrSWRunPath_array } ;
  902. static
  903. UINT
  904. hrSWRunParameters_array[ HRSWRUNPARAMETERS_LENGTH ] = { HRSWRUNPARAMETERS_SEQ } ;
  905. AsnObjectIdentifier
  906. hrSWRunParameters_oid = { HRSWRUNPARAMETERS_LENGTH, hrSWRunParameters_array } ;
  907. static
  908. UINT
  909. hrSWRunType_array[ HRSWRUNTYPE_LENGTH ] = { HRSWRUNTYPE_SEQ } ;
  910. AsnObjectIdentifier
  911. hrSWRunType_oid = { HRSWRUNTYPE_LENGTH, hrSWRunType_array } ;
  912. static
  913. UINT
  914. hrSWRunStatus_array[ HRSWRUNSTATUS_LENGTH ] = { HRSWRUNSTATUS_SEQ } ;
  915. AsnObjectIdentifier
  916. hrSWRunStatus_oid = { HRSWRUNSTATUS_LENGTH, hrSWRunStatus_array } ;
  917. static
  918. UINT
  919. hrSWRunEntry_array[ HRSWRUNENTRY_LENGTH ] = { HRSWRUNENTRY_SEQ } ;
  920. AsnObjectIdentifier
  921. hrSWRunEntry_oid = { HRSWRUNENTRY_LENGTH, hrSWRunEntry_array } ;
  922. variable_t
  923. hrSWRunEntry_var_table[] = {
  924. { NULL, ASN_NULL, NSM_NO_ACCESS, NULL, NULL, NULL, NULL } ,
  925. { &hrSWRunIndex_oid, ASN_INTEGER, NSM_READ_ONLY,
  926. GetHrSWRunIndex, NULL,
  927. SMIGetInteger, SMISetInteger } ,
  928. { &hrSWRunName_oid, ASN_OCTETSTRING, NSM_READ_ONLY,
  929. GetHrSWRunName, NULL,
  930. SMIGetInternationalDisplayString, SMISetInternationalDisplayString } ,
  931. { &hrSWRunID_oid, ASN_OBJECTIDENTIFIER, NSM_READ_ONLY,
  932. GetHrSWRunID, NULL,
  933. SMIGetProductID, SMISetProductID } ,
  934. { &hrSWRunPath_oid, ASN_OCTETSTRING, NSM_READ_ONLY,
  935. GetHrSWRunPath, NULL,
  936. SMIGetInternationalDisplayString, SMISetInternationalDisplayString } ,
  937. { &hrSWRunParameters_oid, ASN_OCTETSTRING, NSM_READ_ONLY,
  938. GetHrSWRunParameters, NULL,
  939. SMIGetInternationalDisplayString, SMISetInternationalDisplayString } ,
  940. { &hrSWRunType_oid, ASN_INTEGER, NSM_READ_ONLY,
  941. GetHrSWRunType, NULL,
  942. SMIGetINTSWType, SMISetINTSWType } ,
  943. { &hrSWRunStatus_oid, ASN_INTEGER, NSM_READ_WRITE,
  944. GetHrSWRunStatus, SetHrSWRunStatus,
  945. SMIGetINThrSWRunStatus, SMISetINThrSWRunStatus } ,
  946. } ;
  947. // Next two lines are platform specific
  948. // BYTE hrSWRunEntry_set_array[ MAX_HRSWRUNENTRY_CODE + 1];
  949. // extern BYTE hrSWRunEntry_set_array[] ;
  950. extern variable_t hrSWRunEntry_var_table[] ;
  951. static
  952. UINT
  953. hrSWRunPerfCPU_array[ HRSWRUNPERFCPU_LENGTH ] = { HRSWRUNPERFCPU_SEQ } ;
  954. AsnObjectIdentifier
  955. hrSWRunPerfCPU_oid = { HRSWRUNPERFCPU_LENGTH, hrSWRunPerfCPU_array } ;
  956. static
  957. UINT
  958. hrSWRunPerfMem_array[ HRSWRUNPERFMEM_LENGTH ] = { HRSWRUNPERFMEM_SEQ } ;
  959. AsnObjectIdentifier
  960. hrSWRunPerfMem_oid = { HRSWRUNPERFMEM_LENGTH, hrSWRunPerfMem_array } ;
  961. static
  962. UINT
  963. hrSWRunPerfEntry_array[ HRSWRUNPERFENTRY_LENGTH ] = { HRSWRUNPERFENTRY_SEQ } ;
  964. AsnObjectIdentifier
  965. hrSWRunPerfEntry_oid = { HRSWRUNPERFENTRY_LENGTH, hrSWRunPerfEntry_array } ;
  966. variable_t
  967. hrSWRunPerfEntry_var_table[] = {
  968. { NULL, ASN_NULL, NSM_NO_ACCESS, NULL, NULL, NULL, NULL } ,
  969. { &hrSWRunPerfCPU_oid, ASN_INTEGER, NSM_READ_ONLY,
  970. GetHrSWRunPerfCPU, NULL,
  971. SMIGetInteger, SMISetInteger } ,
  972. { &hrSWRunPerfMem_oid, ASN_INTEGER, NSM_READ_ONLY,
  973. GetHrSWRunPerfMem, NULL,
  974. SMIGetKBytes, SMISetKBytes } ,
  975. } ;
  976. // Next two lines are platform specific
  977. // BYTE hrSWRunPerfEntry_set_array[ MAX_HRSWRUNPERFENTRY_CODE + 1];
  978. // extern BYTE hrSWRunPerfEntry_set_array[] ;
  979. extern variable_t hrSWRunPerfEntry_var_table[] ;
  980. static
  981. UINT
  982. hrSWInstalledLastChange_array[ HRSWINSTALLEDLASTCHANGE_LENGTH ] = { HRSWINSTALLEDLASTCHANGE_SEQ } ;
  983. AsnObjectIdentifier
  984. hrSWInstalledLastChange_oid = { HRSWINSTALLEDLASTCHANGE_LENGTH, hrSWInstalledLastChange_array } ;
  985. static
  986. UINT
  987. hrSWInstalledLastUpdateTime_array[ HRSWINSTALLEDLASTUPDATETIME_LENGTH ] = { HRSWINSTALLEDLASTUPDATETIME_SEQ } ;
  988. AsnObjectIdentifier
  989. hrSWInstalledLastUpdateTime_oid = { HRSWINSTALLEDLASTUPDATETIME_LENGTH, hrSWInstalledLastUpdateTime_array } ;
  990. static
  991. UINT
  992. hrSWInstalled_array[ HRSWINSTALLED_LENGTH ] = { HRSWINSTALLED_SEQ } ;
  993. AsnObjectIdentifier
  994. hrSWInstalled_oid = { HRSWINSTALLED_LENGTH, hrSWInstalled_array } ;
  995. variable_t
  996. hrSWInstalled_var_table[] = {
  997. { NULL, ASN_NULL, NSM_NO_ACCESS, NULL, NULL, NULL, NULL } ,
  998. { &hrSWInstalledLastChange_oid, ASN_RFC1155_TIMETICKS, NSM_READ_ONLY,
  999. GetHrSWInstalledLastChange, NULL,
  1000. SMIGetTimeTicks, SMISetTimeTicks } ,
  1001. { &hrSWInstalledLastUpdateTime_oid, ASN_RFC1155_TIMETICKS, NSM_READ_ONLY,
  1002. GetHrSWInstalledLastUpdateTime, NULL,
  1003. SMIGetTimeTicks, SMISetTimeTicks } ,
  1004. } ;
  1005. // Next two lines are platform specific
  1006. // BYTE hrSWInstalled_set_array[ MAX_HRSWINSTALLED_CODE + 1];
  1007. // extern BYTE hrSWInstalled_set_array[] ;
  1008. extern variable_t hrSWInstalled_var_table[] ;
  1009. static
  1010. UINT
  1011. hrSWInstalledIndex_array[ HRSWINSTALLEDINDEX_LENGTH ] = { HRSWINSTALLEDINDEX_SEQ } ;
  1012. AsnObjectIdentifier
  1013. hrSWInstalledIndex_oid = { HRSWINSTALLEDINDEX_LENGTH, hrSWInstalledIndex_array } ;
  1014. static
  1015. UINT
  1016. hrSWInstalledName_array[ HRSWINSTALLEDNAME_LENGTH ] = { HRSWINSTALLEDNAME_SEQ } ;
  1017. AsnObjectIdentifier
  1018. hrSWInstalledName_oid = { HRSWINSTALLEDNAME_LENGTH, hrSWInstalledName_array } ;
  1019. static
  1020. UINT
  1021. hrSWInstalledID_array[ HRSWINSTALLEDID_LENGTH ] = { HRSWINSTALLEDID_SEQ } ;
  1022. AsnObjectIdentifier
  1023. hrSWInstalledID_oid = { HRSWINSTALLEDID_LENGTH, hrSWInstalledID_array } ;
  1024. static
  1025. UINT
  1026. hrSWInstalledType_array[ HRSWINSTALLEDTYPE_LENGTH ] = { HRSWINSTALLEDTYPE_SEQ } ;
  1027. AsnObjectIdentifier
  1028. hrSWInstalledType_oid = { HRSWINSTALLEDTYPE_LENGTH, hrSWInstalledType_array } ;
  1029. static
  1030. UINT
  1031. hrSWInstalledDate_array[ HRSWINSTALLEDDATE_LENGTH ] = { HRSWINSTALLEDDATE_SEQ } ;
  1032. AsnObjectIdentifier
  1033. hrSWInstalledDate_oid = { HRSWINSTALLEDDATE_LENGTH, hrSWInstalledDate_array } ;
  1034. static
  1035. UINT
  1036. hrSWInstalledEntry_array[ HRSWINSTALLEDENTRY_LENGTH ] = { HRSWINSTALLEDENTRY_SEQ } ;
  1037. AsnObjectIdentifier
  1038. hrSWInstalledEntry_oid = { HRSWINSTALLEDENTRY_LENGTH, hrSWInstalledEntry_array } ;
  1039. variable_t
  1040. hrSWInstalledEntry_var_table[] = {
  1041. { NULL, ASN_NULL, NSM_NO_ACCESS, NULL, NULL, NULL, NULL } ,
  1042. { &hrSWInstalledIndex_oid, ASN_INTEGER, NSM_READ_ONLY,
  1043. GetHrSWInstalledIndex, NULL,
  1044. SMIGetInteger, SMISetInteger } ,
  1045. { &hrSWInstalledName_oid, ASN_OCTETSTRING, NSM_READ_ONLY,
  1046. GetHrSWInstalledName, NULL,
  1047. SMIGetInternationalDisplayString, SMISetInternationalDisplayString } ,
  1048. { &hrSWInstalledID_oid, ASN_OBJECTIDENTIFIER, NSM_READ_ONLY,
  1049. GetHrSWInstalledID, NULL,
  1050. SMIGetProductID, SMISetProductID } ,
  1051. { &hrSWInstalledType_oid, ASN_INTEGER, NSM_READ_ONLY,
  1052. GetHrSWInstalledType, NULL,
  1053. SMIGetINTSWType, SMISetINTSWType } ,
  1054. { &hrSWInstalledDate_oid, ASN_OCTETSTRING, NSM_READ_ONLY,
  1055. GetHrSWInstalledDate, NULL,
  1056. SMIGetDateAndTime, SMISetDateAndTime } ,
  1057. } ;
  1058. // Next two lines are platform specific
  1059. // BYTE hrSWInstalledEntry_set_array[ MAX_HRSWINSTALLEDENTRY_CODE + 1];
  1060. // extern BYTE hrSWInstalledEntry_set_array[] ;
  1061. extern variable_t hrSWInstalledEntry_var_table[] ;
  1062. class_t
  1063. class_info[] = {
  1064. // hrSystem
  1065. { NON_TABLE, &hrSystem_oid, HRSYSTEM_VAR_INDEX,
  1066. MIN_HRSYSTEM_CODE, MAX_HRSYSTEM_CODE,
  1067. HrSystemFindInstance, HrSystemFindNextInstance,
  1068. HrSystemConvertInstance, HrSystemFreeInstance,
  1069. hrSystem_var_table } ,
  1070. // hrStorage
  1071. { NON_TABLE, &hrStorage_oid, HRSTORAGE_VAR_INDEX,
  1072. MIN_HRSTORAGE_CODE, MAX_HRSTORAGE_CODE,
  1073. HrStorageFindInstance, HrStorageFindNextInstance,
  1074. HrStorageConvertInstance, HrStorageFreeInstance,
  1075. hrStorage_var_table } ,
  1076. // hrStorageEntry
  1077. { TABLE, &hrStorageEntry_oid, HRSTORAGEENTRY_VAR_INDEX,
  1078. MIN_HRSTORAGEENTRY_CODE, MAX_HRSTORAGEENTRY_CODE,
  1079. HrStorageEntryFindInstance, HrStorageEntryFindNextInstance,
  1080. HrStorageEntryConvertInstance, HrStorageEntryFreeInstance,
  1081. hrStorageEntry_var_table } ,
  1082. // hrDeviceEntry
  1083. { TABLE, &hrDeviceEntry_oid, HRDEVICEENTRY_VAR_INDEX,
  1084. MIN_HRDEVICEENTRY_CODE, MAX_HRDEVICEENTRY_CODE,
  1085. HrDeviceEntryFindInstance, HrDeviceEntryFindNextInstance,
  1086. HrDeviceEntryConvertInstance, HrDeviceEntryFreeInstance,
  1087. hrDeviceEntry_var_table } ,
  1088. // hrProcessorEntry
  1089. { TABLE, &hrProcessorEntry_oid, HRPROCESSORENTRY_VAR_INDEX,
  1090. MIN_HRPROCESSORENTRY_CODE, MAX_HRPROCESSORENTRY_CODE,
  1091. HrProcessorEntryFindInstance, HrProcessorEntryFindNextInstance,
  1092. HrProcessorEntryConvertInstance, HrProcessorEntryFreeInstance,
  1093. hrProcessorEntry_var_table } ,
  1094. // hrNetworkEntry
  1095. { TABLE, &hrNetworkEntry_oid, HRNETWORKENTRY_VAR_INDEX,
  1096. MIN_HRNETWORKENTRY_CODE, MAX_HRNETWORKENTRY_CODE,
  1097. HrNetworkEntryFindInstance, HrNetworkEntryFindNextInstance,
  1098. HrNetworkEntryConvertInstance, HrNetworkEntryFreeInstance,
  1099. hrNetworkEntry_var_table } ,
  1100. // hrPrinterEntry
  1101. { TABLE, &hrPrinterEntry_oid, HRPRINTERENTRY_VAR_INDEX,
  1102. MIN_HRPRINTERENTRY_CODE, MAX_HRPRINTERENTRY_CODE,
  1103. HrPrinterEntryFindInstance, HrPrinterEntryFindNextInstance,
  1104. HrPrinterEntryConvertInstance, HrPrinterEntryFreeInstance,
  1105. hrPrinterEntry_var_table } ,
  1106. // hrDiskStorageEntry
  1107. { TABLE, &hrDiskStorageEntry_oid, HRDISKSTORAGEENTRY_VAR_INDEX,
  1108. MIN_HRDISKSTORAGEENTRY_CODE, MAX_HRDISKSTORAGEENTRY_CODE,
  1109. HrDiskStorageEntryFindInstance, HrDiskStorageEntryFindNextInstance,
  1110. HrDiskStorageEntryConvertInstance, HrDiskStorageEntryFreeInstance,
  1111. hrDiskStorageEntry_var_table } ,
  1112. // hrPartitionEntry
  1113. { TABLE, &hrPartitionEntry_oid, HRPARTITIONENTRY_VAR_INDEX,
  1114. MIN_HRPARTITIONENTRY_CODE, MAX_HRPARTITIONENTRY_CODE,
  1115. HrPartitionEntryFindInstance, HrPartitionEntryFindNextInstance,
  1116. HrPartitionEntryConvertInstance, HrPartitionEntryFreeInstance,
  1117. hrPartitionEntry_var_table } ,
  1118. // hrFSEntry
  1119. { TABLE, &hrFSEntry_oid, HRFSENTRY_VAR_INDEX,
  1120. MIN_HRFSENTRY_CODE, MAX_HRFSENTRY_CODE,
  1121. HrFSEntryFindInstance, HrFSEntryFindNextInstance,
  1122. HrFSEntryConvertInstance, HrFSEntryFreeInstance,
  1123. hrFSEntry_var_table } ,
  1124. // hrSWRun
  1125. { NON_TABLE, &hrSWRun_oid, HRSWRUN_VAR_INDEX,
  1126. MIN_HRSWRUN_CODE, MAX_HRSWRUN_CODE,
  1127. HrSWRunFindInstance, HrSWRunFindNextInstance,
  1128. HrSWRunConvertInstance, HrSWRunFreeInstance,
  1129. hrSWRun_var_table } ,
  1130. // hrSWRunEntry
  1131. { TABLE, &hrSWRunEntry_oid, HRSWRUNENTRY_VAR_INDEX,
  1132. MIN_HRSWRUNENTRY_CODE, MAX_HRSWRUNENTRY_CODE,
  1133. HrSWRunEntryFindInstance, HrSWRunEntryFindNextInstance,
  1134. HrSWRunEntryConvertInstance, HrSWRunEntryFreeInstance,
  1135. hrSWRunEntry_var_table } ,
  1136. // hrSWRunPerfEntry
  1137. { TABLE, &hrSWRunPerfEntry_oid, HRSWRUNPERFENTRY_VAR_INDEX,
  1138. MIN_HRSWRUNPERFENTRY_CODE, MAX_HRSWRUNPERFENTRY_CODE,
  1139. HrSWRunPerfEntryFindInstance, HrSWRunPerfEntryFindNextInstance,
  1140. HrSWRunPerfEntryConvertInstance, HrSWRunPerfEntryFreeInstance,
  1141. hrSWRunPerfEntry_var_table } ,
  1142. // hrSWInstalled
  1143. { NON_TABLE, &hrSWInstalled_oid, HRSWINSTALLED_VAR_INDEX,
  1144. MIN_HRSWINSTALLED_CODE, MAX_HRSWINSTALLED_CODE,
  1145. HrSWInstalledFindInstance, HrSWInstalledFindNextInstance,
  1146. HrSWInstalledConvertInstance, HrSWInstalledFreeInstance,
  1147. hrSWInstalled_var_table } ,
  1148. // hrSWInstalledEntry
  1149. { TABLE, &hrSWInstalledEntry_oid, HRSWINSTALLEDENTRY_VAR_INDEX,
  1150. MIN_HRSWINSTALLEDENTRY_CODE, MAX_HRSWINSTALLEDENTRY_CODE,
  1151. HrSWInstalledEntryFindInstance, HrSWInstalledEntryFindNextInstance,
  1152. HrSWInstalledEntryConvertInstance, HrSWInstalledEntryFreeInstance,
  1153. hrSWInstalledEntry_var_table } ,
  1154. } ;
  1155. extern class_t class_info[] ;
  1156. extern char *EventLogString ;
  1157. extern char mibEventValue[] ;
  1158. /*
  1159. * UserMibInit
  1160. *
  1161. * This routine is to allow user to initialize any variable at the time of
  1162. * dll's activation. This routine setups up the registry for application
  1163. * event logging and calls out to the trap initialization code. The user
  1164. * specific code follows.
  1165. *
  1166. * Arguments:
  1167. *
  1168. * hPollForTrapEvent handle for traps - this is used to coordinate
  1169. * between the Extendible Agent and this Extension
  1170. * Agent. It is passed to the TrapInit() routine.
  1171. * - NULL indicates no traps
  1172. * - value from CreateEvent() indicates traps
  1173. * are implemented and the Extendible agent
  1174. * must poll for them
  1175. *
  1176. * Return Code:
  1177. *
  1178. * SUCCESS Successful initialization
  1179. * FAILURE Unable to initialize
  1180. *
  1181. */
  1182. UINT
  1183. UserMibInit( IN OUT HANDLE *hPollForTrapEvent )
  1184. {
  1185. HKEY hkey ;
  1186. DWORD dwData ;
  1187. UCHAR valuebuf[ 80 ] ;
  1188. char mibEventKey[ 256 ] ;
  1189. // The user must initialize the Event Log handle. NULL in the first
  1190. // argument indicates that the log is on the local machine. The text
  1191. // string for the second argument is the same as the subkey in the
  1192. // registry under
  1193. // HKEY_LOCAL_MACHINE
  1194. // SYSTEM
  1195. // CurrentControlSet
  1196. // Services
  1197. // EventLog
  1198. // Application
  1199. // GenAgent (for this example)
  1200. //
  1201. // But first create the subkey and set the values associated with it.
  1202. // The subkey uses the eventLogString name.
  1203. memset( mibEventKey, '\0', sizeof( UCHAR ) * 256 ) ;
  1204. sprintf( mibEventKey ,
  1205. "SYSTEM\\CurrentControlSet\\Services\\EventLog\\Application\\%s" ,
  1206. eventLogString ) ;
  1207. if ( RegCreateKey( HKEY_LOCAL_MACHINE, mibEventKey, &hkey ) )
  1208. return FAILURE ;
  1209. memset( valuebuf, '\0', sizeof( UCHAR ) * 80 ) ;
  1210. sprintf( valuebuf, "%%SystemRoot%%\\System32\\%s", mibEventValue ) ;
  1211. if ( RegSetValueEx( hkey ,
  1212. "EventMessageFile" , // Value name
  1213. 0 , // must be zero
  1214. REG_EXPAND_SZ , // value type
  1215. (LPBYTE) valuebuf , // address of value data
  1216. strlen( valuebuf ) + 1 ) )
  1217. return FAILURE ;
  1218. dwData = EVENTLOG_ERROR_TYPE |
  1219. EVENTLOG_WARNING_TYPE |
  1220. EVENTLOG_INFORMATION_TYPE ;
  1221. if ( RegSetValueEx( hkey ,
  1222. "TypesSupported" , // Value name
  1223. 0 , // must be zero
  1224. REG_DWORD , // value type
  1225. (LPBYTE)&dwData , // address of value data
  1226. sizeof( DWORD ) ) ) // length of value data
  1227. return FAILURE ;
  1228. RegCloseKey( hkey ) ;
  1229. //
  1230. // USER'S INITIALIZATION CODE HERE.
  1231. //
  1232. /*
  1233. ||=============================================================
  1234. || NOTE: Order of these initialization is important!
  1235. || Some later inits may depend on earlier inits
  1236. || ..see below
  1237. ||=============================================================
  1238. */
  1239. /* HRSYSTEM DEPENDS:
  1240. | =================
  1241. | hrSystem Table has no cache, but the value of
  1242. | "HrSystemInitialLoadDevice" depends on the hrDevice table having been
  1243. | initialized.
  1244. */
  1245. /* HRSTORAGE DEPENDS:
  1246. | =================
  1247. | None.
  1248. */
  1249. if (Gen_Hrstorage_Cache() == FALSE) { return FAILURE ; }
  1250. /* HRFSTABLE DEPENDS:
  1251. | =================
  1252. | The HRSTORAGE cache is searched in order to set the value of
  1253. | all "hrFSStorageIndex" attributes.
  1254. */
  1255. if (Gen_HrFSTable_Cache() == FALSE) { return FAILURE ; }
  1256. /* HRDEVICE DEPENDS:
  1257. | =================
  1258. | The HRFSTABLE cache is searched in order to set the values for
  1259. | "hrPartitionFSIndex" attributes in the hrPartition sub-table of
  1260. | the hrdevice table.
  1261. |
  1262. | Debugging Note:
  1263. | If you temporarily "no-op" the next line (and trigger the
  1264. | actual invocation of this cache build function from, say,
  1265. | function "SetHrStorageSize()" by sending a "SET" of that variable),
  1266. | you also need to "no-op" the invocation of "TrapInit()" below,
  1267. | otherwise the subagent will trap when the hrProcessorLoad timer
  1268. | (set-up by "TrapInit()" below) goes off.
  1269. */
  1270. if (Gen_HrDevice_Cache() == FALSE) { return FAILURE ; }
  1271. /* HRSWINSTALLED DEPENDS:
  1272. | ======================
  1273. | None.
  1274. */
  1275. if (Gen_HrSWInstalled_Cache() == FALSE) { return FAILURE ; }
  1276. /* HRSWRUN/PERF DEPENDS:
  1277. | =====================
  1278. | None. This function is called repeatedly to refresh the cache
  1279. | at intervals of CACHE_MAX_AGE (defined in "HRSWRUNE.C").
  1280. */
  1281. if (Gen_HrSWRun_Cache() == FALSE) { return FAILURE ; }
  1282. /*
  1283. | This "TrapInit" processing is deferred until after Gen_HrDevice_Cache()
  1284. | processing has been done.
  1285. |
  1286. | Because no traps are defined by HostMIB, we use the mechanism
  1287. | (by which the main SNMP agent "polls" for Traps when an event goes off)
  1288. | to actually cause the HostMIB subagent to be periodically entered so
  1289. | that timer-counts needed to accurately report "hrProcessorLoad"
  1290. | values for each CPU may be refreshed.
  1291. |
  1292. | The hrProcessor sub-table initialization is performed as part of
  1293. | hrDevice table init. Buffer initialization for hrProcessorLoad is done
  1294. | as part of this initialization and must be complete before we do this
  1295. | "TrapInit()" call.
  1296. |
  1297. | "TrapInit()" in reality sets up the timer handle returned as
  1298. | "hPollForTrapEvent". The function that is entered when the timer
  1299. | goes off ("hrProcessLoad_Refresh()" in "HRPROCES.C") expects the
  1300. | buffer initialization to have already been performed... hence the
  1301. | call to "TrapInit()" must follow other cache initialization.
  1302. */
  1303. TrapInit( hPollForTrapEvent ) ;
  1304. return SUCCESS ;
  1305. } /* end of UserMibInit() */