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.

1386 lines
44 KiB

  1. /*
  2. * mibtsmi.ntc v0.10
  3. * hostmsmi.c
  4. * Generated in conjunction with Management Factory scripts:
  5. * script version: SNMPv1, 0.16, Apr 25, 1996
  6. * project: D:\TEMP\EXAMPLE\HOSTMIB
  7. *
  8. ****************************************************************************
  9. * *
  10. * (C) Copyright 1995 DIGITAL EQUIPMENT CORPORATION *
  11. * *
  12. * This software is an unpublished work protected under the *
  13. * the copyright laws of the United States of America, all *
  14. * rights reserved. *
  15. * *
  16. * In the event this software is licensed for use by the United *
  17. * States Government, all use, duplication or disclosure by the *
  18. * United States Government is subject to restrictions as set *
  19. * forth in either subparagraph (c)(1)(ii) of the Rights in *
  20. * Technical Data And Computer Software Clause at DFARS *
  21. * 252.227-7013, or the Commercial Computer Software Restricted *
  22. * Rights Clause at FAR 52.221-19, whichever is applicable. *
  23. * *
  24. ****************************************************************************
  25. *
  26. * Facility:
  27. *
  28. * SNMP Extension Agent
  29. *
  30. * Abstract:
  31. *
  32. * This module contains the SMI envelopes around the callout to the
  33. * developer's get and set routines. Note that the developer can modify
  34. * these routines to valid that the types actually conform to contraints
  35. * for a given type.
  36. *
  37. * Functions:
  38. *
  39. * SMIGetxxx() and SMISetxxx() for each user defined type.
  40. *
  41. * Author:
  42. *
  43. * David Burns @ Webenable Inc
  44. *
  45. * Date:
  46. *
  47. * Thu Nov 07 16:38:30 1996
  48. *
  49. * Revision History:
  50. * generated with v0.10 stub
  51. *
  52. * May 15, 1997 - To Microsoft: 4 changes of "malloc" to "SNMP_malloc"
  53. */
  54. #include <snmp.h>
  55. #include <stdlib.h>
  56. #include <malloc.h>
  57. #include <memory.h>
  58. #include <string.h>
  59. #include "smint.h"
  60. #include "hostmsmi.h"
  61. #include "mib.h"
  62. #include "mib_xtrn.h"
  63. /*
  64. * SMIGetBoolean
  65. * Boolean ::= INTEGER a truth value
  66. *
  67. * Encompasses the callouts to variables for the data type Boolean
  68. *
  69. * Arguments:
  70. * VarBind pointer to the variable value pair
  71. * cindex index to the class of the request
  72. * vindex index to the variable of the request
  73. * instance address of the instance specification
  74. * in the form of ordered native datatypes
  75. * Return Codes:
  76. *
  77. * Standard PDU error codes.
  78. *
  79. * SNMP_ERRORSTATUS_NOERROR Successful get
  80. * SNMP_ERRORSTATUS_GENERR Catch-all failure code
  81. * mibtsmii.c v 0.6
  82. */
  83. UINT
  84. SMIGetBoolean(
  85. IN OUT RFC1157VarBind *VarBind , // Variable binding for get
  86. IN unsigned long int cindex ,
  87. IN unsigned long int vindex ,
  88. IN InstanceName *instance )
  89. {
  90. UINT result = SNMP_ERRORSTATUS_NOERROR ;
  91. Boolean outvalue ;
  92. Access_Credential access ; // dummy holder for future use
  93. result = ( *class_info[ cindex ].variable[ vindex ].VarGet )( &outvalue ,
  94. &access ,
  95. instance ) ;
  96. if ( result == SNMP_ERRORSTATUS_NOERROR )
  97. {
  98. VarBind->value.asnType = ASN_INTEGER ;
  99. VarBind->value.asnValue.number =
  100. (AsnInteger)outvalue ;
  101. }
  102. return result ;
  103. } /* end of SMIGetBoolean() */
  104. /*
  105. * SMISetBoolean
  106. * Boolean ::= INTEGER a truth value
  107. *
  108. * Encompasses the callouts to variables for the data type Boolean
  109. *
  110. * Arguments:
  111. * VarBind pointer to the variable value pair
  112. * cindex index to the class of the request
  113. * vindex index to the variable of the request
  114. * instance address of the instance specification
  115. * in the form of ordered native datatypes
  116. * Return Codes:
  117. *
  118. * Standard PDU error codes.
  119. */
  120. UINT
  121. SMISetBoolean(
  122. IN OUT RFC1157VarBind *VarBind , // Variable binding for set
  123. IN unsigned long int cindex ,
  124. IN unsigned long int vindex ,
  125. IN InstanceName *instance )
  126. {
  127. UINT result = SNMP_ERRORSTATUS_NOERROR ;
  128. Boolean *invalue ;
  129. Boolean outvalue ;
  130. Access_Credential access ; // dummy holder for future use
  131. invalue = (Boolean *)
  132. ( &VarBind->value.asnValue.number ) ;
  133. result = ( *class_info[ cindex ].variable[ vindex ].VarSet )
  134. ( invalue, &outvalue, &access, instance ) ;
  135. return result;
  136. } /* end of SMISetBoolean() */
  137. /*
  138. * SMIBuildBoolean
  139. * Boolean ::= INTEGER a truth value
  140. *
  141. * Places the variable of datatype Boolean into a Variable Binding.
  142. *
  143. * Arguments:
  144. *
  145. * VarBind pointer to the variable value pair
  146. * invalue address of the data
  147. *
  148. * Return Codes:
  149. *
  150. * Standard PDU error codes.
  151. */
  152. UINT
  153. SMIBuildBoolean(
  154. IN OUT RFC1157VarBind *VarBind , // Variable binding for building
  155. IN char *invalue )
  156. {
  157. Integer *svalue = (Integer *)invalue;
  158. VarBind->value.asnType = ASN_INTEGER ;
  159. VarBind->value.asnValue.number = *svalue ;
  160. return SNMP_ERRORSTATUS_NOERROR ;
  161. } /* end of SMIBuildBoolean() */
  162. /*
  163. * SMIGetKBytes
  164. * KBytes ::= INTEGER (0..2147483647) memory size, expressed in units of
  165. * 1024 bytes
  166. *
  167. * Encompasses the callouts to variables for the data type KBytes
  168. *
  169. * Arguments:
  170. * VarBind pointer to the variable value pair
  171. * cindex index to the class of the request
  172. * vindex index to the variable of the request
  173. * instance address of the instance specification
  174. * in the form of ordered native datatypes
  175. * Return Codes:
  176. *
  177. * Standard PDU error codes.
  178. *
  179. * SNMP_ERRORSTATUS_NOERROR Successful get
  180. * SNMP_ERRORSTATUS_GENERR Catch-all failure code
  181. * mibtsmii.c v 0.6
  182. */
  183. UINT
  184. SMIGetKBytes(
  185. IN OUT RFC1157VarBind *VarBind , // Variable binding for get
  186. IN unsigned long int cindex ,
  187. IN unsigned long int vindex ,
  188. IN InstanceName *instance )
  189. {
  190. UINT result = SNMP_ERRORSTATUS_NOERROR ;
  191. KBytes outvalue ;
  192. Access_Credential access ; // dummy holder for future use
  193. result = ( *class_info[ cindex ].variable[ vindex ].VarGet )( &outvalue ,
  194. &access ,
  195. instance ) ;
  196. if ( result == SNMP_ERRORSTATUS_NOERROR )
  197. {
  198. VarBind->value.asnType = ASN_INTEGER ;
  199. VarBind->value.asnValue.number =
  200. (AsnInteger)outvalue ;
  201. }
  202. return result ;
  203. } /* end of SMIGetKBytes() */
  204. /*
  205. * SMISetKBytes
  206. * KBytes ::= INTEGER (0..2147483647) memory size, expressed in units of
  207. * 1024 bytes
  208. *
  209. * Encompasses the callouts to variables for the data type KBytes
  210. *
  211. * Arguments:
  212. * VarBind pointer to the variable value pair
  213. * cindex index to the class of the request
  214. * vindex index to the variable of the request
  215. * instance address of the instance specification
  216. * in the form of ordered native datatypes
  217. * Return Codes:
  218. *
  219. * Standard PDU error codes.
  220. */
  221. UINT
  222. SMISetKBytes(
  223. IN OUT RFC1157VarBind *VarBind , // Variable binding for set
  224. IN unsigned long int cindex ,
  225. IN unsigned long int vindex ,
  226. IN InstanceName *instance )
  227. {
  228. UINT result = SNMP_ERRORSTATUS_NOERROR ;
  229. KBytes *invalue ;
  230. KBytes outvalue ;
  231. Access_Credential access ; // dummy holder for future use
  232. invalue = (KBytes *)
  233. ( &VarBind->value.asnValue.number ) ;
  234. result = ( *class_info[ cindex ].variable[ vindex ].VarSet )
  235. ( invalue, &outvalue, &access, instance ) ;
  236. return result;
  237. } /* end of SMISetKBytes() */
  238. /*
  239. * SMIBuildKBytes
  240. * KBytes ::= INTEGER (0..2147483647) memory size, expressed in units of
  241. * 1024 bytes
  242. *
  243. * Places the variable of datatype KBytes into a Variable Binding.
  244. *
  245. * Arguments:
  246. *
  247. * VarBind pointer to the variable value pair
  248. * invalue address of the data
  249. *
  250. * Return Codes:
  251. *
  252. * Standard PDU error codes.
  253. */
  254. UINT
  255. SMIBuildKBytes(
  256. IN OUT RFC1157VarBind *VarBind , // Variable binding for building
  257. IN char *invalue )
  258. {
  259. Integer *svalue = (Integer *)invalue;
  260. VarBind->value.asnType = ASN_INTEGER ;
  261. VarBind->value.asnValue.number = *svalue ;
  262. return SNMP_ERRORSTATUS_NOERROR ;
  263. } /* end of SMIBuildKBytes() */
  264. /*
  265. * SMIGetINThrDeviceStatus
  266. * INThrDeviceStatus ::= INTEGER
  267. *
  268. * Encompasses the callouts to variables for the data type INThrDeviceStatus
  269. *
  270. * Arguments:
  271. * VarBind pointer to the variable value pair
  272. * cindex index to the class of the request
  273. * vindex index to the variable of the request
  274. * instance address of the instance specification
  275. * in the form of ordered native datatypes
  276. * Return Codes:
  277. *
  278. * Standard PDU error codes.
  279. *
  280. * SNMP_ERRORSTATUS_NOERROR Successful get
  281. * SNMP_ERRORSTATUS_GENERR Catch-all failure code
  282. * mibtsmii.c v 0.6
  283. */
  284. UINT
  285. SMIGetINThrDeviceStatus(
  286. IN OUT RFC1157VarBind *VarBind , // Variable binding for get
  287. IN unsigned long int cindex ,
  288. IN unsigned long int vindex ,
  289. IN InstanceName *instance )
  290. {
  291. UINT result = SNMP_ERRORSTATUS_NOERROR ;
  292. INThrDeviceStatus outvalue ;
  293. Access_Credential access ; // dummy holder for future use
  294. result = ( *class_info[ cindex ].variable[ vindex ].VarGet )( &outvalue ,
  295. &access ,
  296. instance ) ;
  297. if ( result == SNMP_ERRORSTATUS_NOERROR )
  298. {
  299. VarBind->value.asnType = ASN_INTEGER ;
  300. VarBind->value.asnValue.number =
  301. (AsnInteger)outvalue ;
  302. }
  303. return result ;
  304. } /* end of SMIGetINThrDeviceStatus() */
  305. /*
  306. * SMISetINThrDeviceStatus
  307. * INThrDeviceStatus ::= INTEGER
  308. *
  309. * Encompasses the callouts to variables for the data type INThrDeviceStatus
  310. *
  311. * Arguments:
  312. * VarBind pointer to the variable value pair
  313. * cindex index to the class of the request
  314. * vindex index to the variable of the request
  315. * instance address of the instance specification
  316. * in the form of ordered native datatypes
  317. * Return Codes:
  318. *
  319. * Standard PDU error codes.
  320. */
  321. UINT
  322. SMISetINThrDeviceStatus(
  323. IN OUT RFC1157VarBind *VarBind , // Variable binding for set
  324. IN unsigned long int cindex ,
  325. IN unsigned long int vindex ,
  326. IN InstanceName *instance )
  327. {
  328. UINT result = SNMP_ERRORSTATUS_NOERROR ;
  329. INThrDeviceStatus *invalue ;
  330. INThrDeviceStatus outvalue ;
  331. Access_Credential access ; // dummy holder for future use
  332. invalue = (INThrDeviceStatus *)
  333. ( &VarBind->value.asnValue.number ) ;
  334. result = ( *class_info[ cindex ].variable[ vindex ].VarSet )
  335. ( invalue, &outvalue, &access, instance ) ;
  336. return result;
  337. } /* end of SMISetINThrDeviceStatus() */
  338. /*
  339. * SMIBuildINThrDeviceStatus
  340. * INThrDeviceStatus ::= INTEGER
  341. *
  342. * Places the variable of datatype INThrDeviceStatus into a Variable Binding.
  343. *
  344. * Arguments:
  345. *
  346. * VarBind pointer to the variable value pair
  347. * invalue address of the data
  348. *
  349. * Return Codes:
  350. *
  351. * Standard PDU error codes.
  352. */
  353. UINT
  354. SMIBuildINThrDeviceStatus(
  355. IN OUT RFC1157VarBind *VarBind , // Variable binding for building
  356. IN char *invalue )
  357. {
  358. Integer *svalue = (Integer *)invalue;
  359. VarBind->value.asnType = ASN_INTEGER ;
  360. VarBind->value.asnValue.number = *svalue ;
  361. return SNMP_ERRORSTATUS_NOERROR ;
  362. } /* end of SMIBuildINThrDeviceStatus() */
  363. /*
  364. * SMIGetINThrPrinterStatus
  365. * INThrPrinterStatus ::= INTEGER
  366. *
  367. * Encompasses the callouts to variables for the data type INThrPrinterStatus
  368. *
  369. * Arguments:
  370. * VarBind pointer to the variable value pair
  371. * cindex index to the class of the request
  372. * vindex index to the variable of the request
  373. * instance address of the instance specification
  374. * in the form of ordered native datatypes
  375. * Return Codes:
  376. *
  377. * Standard PDU error codes.
  378. *
  379. * SNMP_ERRORSTATUS_NOERROR Successful get
  380. * SNMP_ERRORSTATUS_GENERR Catch-all failure code
  381. * mibtsmii.c v 0.6
  382. */
  383. UINT
  384. SMIGetINThrPrinterStatus(
  385. IN OUT RFC1157VarBind *VarBind , // Variable binding for get
  386. IN unsigned long int cindex ,
  387. IN unsigned long int vindex ,
  388. IN InstanceName *instance )
  389. {
  390. UINT result = SNMP_ERRORSTATUS_NOERROR ;
  391. INThrPrinterStatus outvalue ;
  392. Access_Credential access ; // dummy holder for future use
  393. result = ( *class_info[ cindex ].variable[ vindex ].VarGet )( &outvalue ,
  394. &access ,
  395. instance ) ;
  396. if ( result == SNMP_ERRORSTATUS_NOERROR )
  397. {
  398. VarBind->value.asnType = ASN_INTEGER ;
  399. VarBind->value.asnValue.number =
  400. (AsnInteger)outvalue ;
  401. }
  402. return result ;
  403. } /* end of SMIGetINThrPrinterStatus() */
  404. /*
  405. * SMISetINThrPrinterStatus
  406. * INThrPrinterStatus ::= INTEGER
  407. *
  408. * Encompasses the callouts to variables for the data type INThrPrinterStatus
  409. *
  410. * Arguments:
  411. * VarBind pointer to the variable value pair
  412. * cindex index to the class of the request
  413. * vindex index to the variable of the request
  414. * instance address of the instance specification
  415. * in the form of ordered native datatypes
  416. * Return Codes:
  417. *
  418. * Standard PDU error codes.
  419. */
  420. UINT
  421. SMISetINThrPrinterStatus(
  422. IN OUT RFC1157VarBind *VarBind , // Variable binding for set
  423. IN unsigned long int cindex ,
  424. IN unsigned long int vindex ,
  425. IN InstanceName *instance )
  426. {
  427. UINT result = SNMP_ERRORSTATUS_NOERROR ;
  428. INThrPrinterStatus *invalue ;
  429. INThrPrinterStatus outvalue ;
  430. Access_Credential access ; // dummy holder for future use
  431. invalue = (INThrPrinterStatus *)
  432. ( &VarBind->value.asnValue.number ) ;
  433. result = ( *class_info[ cindex ].variable[ vindex ].VarSet )
  434. ( invalue, &outvalue, &access, instance ) ;
  435. return result;
  436. } /* end of SMISetINThrPrinterStatus() */
  437. /*
  438. * SMIBuildINThrPrinterStatus
  439. * INThrPrinterStatus ::= INTEGER
  440. *
  441. * Places the variable of datatype INThrPrinterStatus into a Variable Binding.
  442. *
  443. * Arguments:
  444. *
  445. * VarBind pointer to the variable value pair
  446. * invalue address of the data
  447. *
  448. * Return Codes:
  449. *
  450. * Standard PDU error codes.
  451. */
  452. UINT
  453. SMIBuildINThrPrinterStatus(
  454. IN OUT RFC1157VarBind *VarBind , // Variable binding for building
  455. IN char *invalue )
  456. {
  457. Integer *svalue = (Integer *)invalue;
  458. VarBind->value.asnType = ASN_INTEGER ;
  459. VarBind->value.asnValue.number = *svalue ;
  460. return SNMP_ERRORSTATUS_NOERROR ;
  461. } /* end of SMIBuildINThrPrinterStatus() */
  462. /*
  463. * SMIGetINTAccess
  464. * INTAccess ::= INTEGER
  465. *
  466. * Encompasses the callouts to variables for the data type INTAccess
  467. *
  468. * Arguments:
  469. * VarBind pointer to the variable value pair
  470. * cindex index to the class of the request
  471. * vindex index to the variable of the request
  472. * instance address of the instance specification
  473. * in the form of ordered native datatypes
  474. * Return Codes:
  475. *
  476. * Standard PDU error codes.
  477. *
  478. * SNMP_ERRORSTATUS_NOERROR Successful get
  479. * SNMP_ERRORSTATUS_GENERR Catch-all failure code
  480. * mibtsmii.c v 0.6
  481. */
  482. UINT
  483. SMIGetINTAccess(
  484. IN OUT RFC1157VarBind *VarBind , // Variable binding for get
  485. IN unsigned long int cindex ,
  486. IN unsigned long int vindex ,
  487. IN InstanceName *instance )
  488. {
  489. UINT result = SNMP_ERRORSTATUS_NOERROR ;
  490. INTAccess outvalue ;
  491. Access_Credential access ; // dummy holder for future use
  492. result = ( *class_info[ cindex ].variable[ vindex ].VarGet )( &outvalue ,
  493. &access ,
  494. instance ) ;
  495. if ( result == SNMP_ERRORSTATUS_NOERROR )
  496. {
  497. VarBind->value.asnType = ASN_INTEGER ;
  498. VarBind->value.asnValue.number =
  499. (AsnInteger)outvalue ;
  500. }
  501. return result ;
  502. } /* end of SMIGetINTAccess() */
  503. /*
  504. * SMISetINTAccess
  505. * INTAccess ::= INTEGER
  506. *
  507. * Encompasses the callouts to variables for the data type INTAccess
  508. *
  509. * Arguments:
  510. * VarBind pointer to the variable value pair
  511. * cindex index to the class of the request
  512. * vindex index to the variable of the request
  513. * instance address of the instance specification
  514. * in the form of ordered native datatypes
  515. * Return Codes:
  516. *
  517. * Standard PDU error codes.
  518. */
  519. UINT
  520. SMISetINTAccess(
  521. IN OUT RFC1157VarBind *VarBind , // Variable binding for set
  522. IN unsigned long int cindex ,
  523. IN unsigned long int vindex ,
  524. IN InstanceName *instance )
  525. {
  526. UINT result = SNMP_ERRORSTATUS_NOERROR ;
  527. INTAccess *invalue ;
  528. INTAccess outvalue ;
  529. Access_Credential access ; // dummy holder for future use
  530. invalue = (INTAccess *)
  531. ( &VarBind->value.asnValue.number ) ;
  532. result = ( *class_info[ cindex ].variable[ vindex ].VarSet )
  533. ( invalue, &outvalue, &access, instance ) ;
  534. return result;
  535. } /* end of SMISetINTAccess() */
  536. /*
  537. * SMIBuildINTAccess
  538. * INTAccess ::= INTEGER
  539. *
  540. * Places the variable of datatype INTAccess into a Variable Binding.
  541. *
  542. * Arguments:
  543. *
  544. * VarBind pointer to the variable value pair
  545. * invalue address of the data
  546. *
  547. * Return Codes:
  548. *
  549. * Standard PDU error codes.
  550. */
  551. UINT
  552. SMIBuildINTAccess(
  553. IN OUT RFC1157VarBind *VarBind , // Variable binding for building
  554. IN char *invalue )
  555. {
  556. Integer *svalue = (Integer *)invalue;
  557. VarBind->value.asnType = ASN_INTEGER ;
  558. VarBind->value.asnValue.number = *svalue ;
  559. return SNMP_ERRORSTATUS_NOERROR ;
  560. } /* end of SMIBuildINTAccess() */
  561. /*
  562. * SMIGetINThrDiskStorageMedia
  563. * INThrDiskStorageMedia ::= INTEGER
  564. *
  565. * Encompasses the callouts to variables for the data type INThrDiskStorageMedia
  566. *
  567. * Arguments:
  568. * VarBind pointer to the variable value pair
  569. * cindex index to the class of the request
  570. * vindex index to the variable of the request
  571. * instance address of the instance specification
  572. * in the form of ordered native datatypes
  573. * Return Codes:
  574. *
  575. * Standard PDU error codes.
  576. *
  577. * SNMP_ERRORSTATUS_NOERROR Successful get
  578. * SNMP_ERRORSTATUS_GENERR Catch-all failure code
  579. * mibtsmii.c v 0.6
  580. */
  581. UINT
  582. SMIGetINThrDiskStorageMedia(
  583. IN OUT RFC1157VarBind *VarBind , // Variable binding for get
  584. IN unsigned long int cindex ,
  585. IN unsigned long int vindex ,
  586. IN InstanceName *instance )
  587. {
  588. UINT result = SNMP_ERRORSTATUS_NOERROR ;
  589. INThrDiskStorageMedia outvalue ;
  590. Access_Credential access ; // dummy holder for future use
  591. result = ( *class_info[ cindex ].variable[ vindex ].VarGet )( &outvalue ,
  592. &access ,
  593. instance ) ;
  594. if ( result == SNMP_ERRORSTATUS_NOERROR )
  595. {
  596. VarBind->value.asnType = ASN_INTEGER ;
  597. VarBind->value.asnValue.number =
  598. (AsnInteger)outvalue ;
  599. }
  600. return result ;
  601. } /* end of SMIGetINThrDiskStorageMedia() */
  602. /*
  603. * SMISetINThrDiskStorageMedia
  604. * INThrDiskStorageMedia ::= INTEGER
  605. *
  606. * Encompasses the callouts to variables for the data type INThrDiskStorageMedia
  607. *
  608. * Arguments:
  609. * VarBind pointer to the variable value pair
  610. * cindex index to the class of the request
  611. * vindex index to the variable of the request
  612. * instance address of the instance specification
  613. * in the form of ordered native datatypes
  614. * Return Codes:
  615. *
  616. * Standard PDU error codes.
  617. */
  618. UINT
  619. SMISetINThrDiskStorageMedia(
  620. IN OUT RFC1157VarBind *VarBind , // Variable binding for set
  621. IN unsigned long int cindex ,
  622. IN unsigned long int vindex ,
  623. IN InstanceName *instance )
  624. {
  625. UINT result = SNMP_ERRORSTATUS_NOERROR ;
  626. INThrDiskStorageMedia *invalue ;
  627. INThrDiskStorageMedia outvalue ;
  628. Access_Credential access ; // dummy holder for future use
  629. invalue = (INThrDiskStorageMedia *)
  630. ( &VarBind->value.asnValue.number ) ;
  631. result = ( *class_info[ cindex ].variable[ vindex ].VarSet )
  632. ( invalue, &outvalue, &access, instance ) ;
  633. return result;
  634. } /* end of SMISetINThrDiskStorageMedia() */
  635. /*
  636. * SMIBuildINThrDiskStorageMedia
  637. * INThrDiskStorageMedia ::= INTEGER
  638. *
  639. * Places the variable of datatype INThrDiskStorageMedia into a Variable Binding.
  640. *
  641. * Arguments:
  642. *
  643. * VarBind pointer to the variable value pair
  644. * invalue address of the data
  645. *
  646. * Return Codes:
  647. *
  648. * Standard PDU error codes.
  649. */
  650. UINT
  651. SMIBuildINThrDiskStorageMedia(
  652. IN OUT RFC1157VarBind *VarBind , // Variable binding for building
  653. IN char *invalue )
  654. {
  655. Integer *svalue = (Integer *)invalue;
  656. VarBind->value.asnType = ASN_INTEGER ;
  657. VarBind->value.asnValue.number = *svalue ;
  658. return SNMP_ERRORSTATUS_NOERROR ;
  659. } /* end of SMIBuildINThrDiskStorageMedia() */
  660. /*
  661. * SMIGetINTSWType
  662. * INTSWType ::= INTEGER
  663. *
  664. * Encompasses the callouts to variables for the data type INTSWType
  665. *
  666. * Arguments:
  667. * VarBind pointer to the variable value pair
  668. * cindex index to the class of the request
  669. * vindex index to the variable of the request
  670. * instance address of the instance specification
  671. * in the form of ordered native datatypes
  672. * Return Codes:
  673. *
  674. * Standard PDU error codes.
  675. *
  676. * SNMP_ERRORSTATUS_NOERROR Successful get
  677. * SNMP_ERRORSTATUS_GENERR Catch-all failure code
  678. * mibtsmii.c v 0.6
  679. */
  680. UINT
  681. SMIGetINTSWType(
  682. IN OUT RFC1157VarBind *VarBind , // Variable binding for get
  683. IN unsigned long int cindex ,
  684. IN unsigned long int vindex ,
  685. IN InstanceName *instance )
  686. {
  687. UINT result = SNMP_ERRORSTATUS_NOERROR ;
  688. INTSWType outvalue ;
  689. Access_Credential access ; // dummy holder for future use
  690. result = ( *class_info[ cindex ].variable[ vindex ].VarGet )( &outvalue ,
  691. &access ,
  692. instance ) ;
  693. if ( result == SNMP_ERRORSTATUS_NOERROR )
  694. {
  695. VarBind->value.asnType = ASN_INTEGER ;
  696. VarBind->value.asnValue.number =
  697. (AsnInteger)outvalue ;
  698. }
  699. return result ;
  700. } /* end of SMIGetINTSWType() */
  701. /*
  702. * SMISetINTSWType
  703. * INTSWType ::= INTEGER
  704. *
  705. * Encompasses the callouts to variables for the data type INTSWType
  706. *
  707. * Arguments:
  708. * VarBind pointer to the variable value pair
  709. * cindex index to the class of the request
  710. * vindex index to the variable of the request
  711. * instance address of the instance specification
  712. * in the form of ordered native datatypes
  713. * Return Codes:
  714. *
  715. * Standard PDU error codes.
  716. */
  717. UINT
  718. SMISetINTSWType(
  719. IN OUT RFC1157VarBind *VarBind , // Variable binding for set
  720. IN unsigned long int cindex ,
  721. IN unsigned long int vindex ,
  722. IN InstanceName *instance )
  723. {
  724. UINT result = SNMP_ERRORSTATUS_NOERROR ;
  725. INTSWType *invalue ;
  726. INTSWType outvalue ;
  727. Access_Credential access ; // dummy holder for future use
  728. invalue = (INTSWType *)
  729. ( &VarBind->value.asnValue.number ) ;
  730. result = ( *class_info[ cindex ].variable[ vindex ].VarSet )
  731. ( invalue, &outvalue, &access, instance ) ;
  732. return result;
  733. } /* end of SMISetINTSWType() */
  734. /*
  735. * SMIBuildINTSWType
  736. * INTSWType ::= INTEGER
  737. *
  738. * Places the variable of datatype INTSWType into a Variable Binding.
  739. *
  740. * Arguments:
  741. *
  742. * VarBind pointer to the variable value pair
  743. * invalue address of the data
  744. *
  745. * Return Codes:
  746. *
  747. * Standard PDU error codes.
  748. */
  749. UINT
  750. SMIBuildINTSWType(
  751. IN OUT RFC1157VarBind *VarBind , // Variable binding for building
  752. IN char *invalue )
  753. {
  754. Integer *svalue = (Integer *)invalue;
  755. VarBind->value.asnType = ASN_INTEGER ;
  756. VarBind->value.asnValue.number = *svalue ;
  757. return SNMP_ERRORSTATUS_NOERROR ;
  758. } /* end of SMIBuildINTSWType() */
  759. /*
  760. * SMIGetINThrSWRunStatus
  761. * INThrSWRunStatus ::= INTEGER
  762. *
  763. * Encompasses the callouts to variables for the data type INThrSWRunStatus
  764. *
  765. * Arguments:
  766. * VarBind pointer to the variable value pair
  767. * cindex index to the class of the request
  768. * vindex index to the variable of the request
  769. * instance address of the instance specification
  770. * in the form of ordered native datatypes
  771. * Return Codes:
  772. *
  773. * Standard PDU error codes.
  774. *
  775. * SNMP_ERRORSTATUS_NOERROR Successful get
  776. * SNMP_ERRORSTATUS_GENERR Catch-all failure code
  777. * mibtsmii.c v 0.6
  778. */
  779. UINT
  780. SMIGetINThrSWRunStatus(
  781. IN OUT RFC1157VarBind *VarBind , // Variable binding for get
  782. IN unsigned long int cindex ,
  783. IN unsigned long int vindex ,
  784. IN InstanceName *instance )
  785. {
  786. UINT result = SNMP_ERRORSTATUS_NOERROR ;
  787. INThrSWRunStatus outvalue ;
  788. Access_Credential access ; // dummy holder for future use
  789. result = ( *class_info[ cindex ].variable[ vindex ].VarGet )( &outvalue ,
  790. &access ,
  791. instance ) ;
  792. if ( result == SNMP_ERRORSTATUS_NOERROR )
  793. {
  794. VarBind->value.asnType = ASN_INTEGER ;
  795. VarBind->value.asnValue.number =
  796. (AsnInteger)outvalue ;
  797. }
  798. return result ;
  799. } /* end of SMIGetINThrSWRunStatus() */
  800. /*
  801. * SMISetINThrSWRunStatus
  802. * INThrSWRunStatus ::= INTEGER
  803. *
  804. * Encompasses the callouts to variables for the data type INThrSWRunStatus
  805. *
  806. * Arguments:
  807. * VarBind pointer to the variable value pair
  808. * cindex index to the class of the request
  809. * vindex index to the variable of the request
  810. * instance address of the instance specification
  811. * in the form of ordered native datatypes
  812. * Return Codes:
  813. *
  814. * Standard PDU error codes.
  815. */
  816. UINT
  817. SMISetINThrSWRunStatus(
  818. IN OUT RFC1157VarBind *VarBind , // Variable binding for set
  819. IN unsigned long int cindex ,
  820. IN unsigned long int vindex ,
  821. IN InstanceName *instance )
  822. {
  823. UINT result = SNMP_ERRORSTATUS_NOERROR ;
  824. INThrSWRunStatus *invalue ;
  825. INThrSWRunStatus outvalue ;
  826. Access_Credential access ; // dummy holder for future use
  827. invalue = (INThrSWRunStatus *)
  828. ( &VarBind->value.asnValue.number ) ;
  829. result = ( *class_info[ cindex ].variable[ vindex ].VarSet )
  830. ( invalue, &outvalue, &access, instance ) ;
  831. return result;
  832. } /* end of SMISetINThrSWRunStatus() */
  833. /*
  834. * SMIBuildINThrSWRunStatus
  835. * INThrSWRunStatus ::= INTEGER
  836. *
  837. * Places the variable of datatype INThrSWRunStatus into a Variable Binding.
  838. *
  839. * Arguments:
  840. *
  841. * VarBind pointer to the variable value pair
  842. * invalue address of the data
  843. *
  844. * Return Codes:
  845. *
  846. * Standard PDU error codes.
  847. */
  848. UINT
  849. SMIBuildINThrSWRunStatus(
  850. IN OUT RFC1157VarBind *VarBind , // Variable binding for building
  851. IN char *invalue )
  852. {
  853. Integer *svalue = (Integer *)invalue;
  854. VarBind->value.asnType = ASN_INTEGER ;
  855. VarBind->value.asnValue.number = *svalue ;
  856. return SNMP_ERRORSTATUS_NOERROR ;
  857. } /* end of SMIBuildINThrSWRunStatus() */
  858. /*
  859. * SMIGetDateAndTime
  860. * DateAndTime ::= OCTET STRING (SIZE ( 8 | 11)) A date-time specification
  861. * for the local time of day. This data type is intended toprovide a consistent method of reporting
  862. * dat
  863. *
  864. * Encompasses the callouts to variables for the data type DateAndTime
  865. *
  866. * Arguments:
  867. * VarBind pointer to the variable value pair
  868. * cindex index to the class of the request
  869. * vindex index to the variable of the request
  870. * instance address of the instance specification
  871. * in the form of ordered native datatypes
  872. * Return Codes:
  873. *
  874. * Standard PDU error codes.
  875. *
  876. * SNMP_ERRORSTATUS_NOERROR Successful get
  877. * SNMP_ERRORSTATUS_GENERR Catch-all failure code
  878. * mibtsmio.c v 0.5
  879. */
  880. UINT
  881. SMIGetDateAndTime(
  882. IN OUT RFC1157VarBind *VarBind , // Variable binding for get
  883. IN unsigned long int cindex ,
  884. IN unsigned long int vindex ,
  885. IN InstanceName *instance )
  886. {
  887. UINT result = SNMP_ERRORSTATUS_NOERROR ;
  888. DateAndTime outvalue ;
  889. char stream[ MAX_OCTET_STRING ] ;
  890. Access_Credential access ; // dummy holder for future use
  891. outvalue.string = stream ;
  892. outvalue.length = 0 ;
  893. result = ( *class_info[ cindex ].variable[ vindex ].VarGet )( &outvalue ,
  894. &access ,
  895. instance ) ;
  896. if ( result == SNMP_ERRORSTATUS_NOERROR )
  897. {
  898. VarBind->value.asnValue.string.length = outvalue.length ;
  899. VarBind->value.asnValue.string.stream =
  900. // malloc( outvalue.length * sizeof( char ) ) ;
  901. // Changed 5/15/97 DDB
  902. SNMP_malloc( outvalue.length * sizeof( char ) ) ;
  903. if ( VarBind->value.asnValue.string.stream == NULL )
  904. result = SNMP_ERRORSTATUS_GENERR ;
  905. else
  906. {
  907. memcpy( VarBind->value.asnValue.string.stream ,
  908. outvalue.string ,
  909. outvalue.length ) ;
  910. VarBind->value.asnType = ASN_OCTETSTRING ;
  911. VarBind->value.asnValue.string.dynamic = TRUE ;
  912. }
  913. }
  914. return result ;
  915. } /* end of SMIGetDateAndTime() */
  916. /*
  917. * SMISetDateAndTime
  918. * DateAndTime ::= OCTET STRING (SIZE ( 8 | 11)) A date-time specification
  919. * for the local time of day. This data type is intended toprovide a consistent method of reporting
  920. * dat
  921. *
  922. * Encompasses the callouts to variables for the data type DateAndTime
  923. *
  924. * Arguments:
  925. * VarBind pointer to the variable value pair
  926. * cindex index to the class of the request
  927. * vindex index to the variable of the request
  928. * instance address of the instance specification
  929. * in the form of ordered native datatypes
  930. * Return Codes:
  931. *
  932. * Standard PDU error codes.
  933. */
  934. UINT
  935. SMISetDateAndTime(
  936. IN OUT RFC1157VarBind *VarBind , // Variable binding for set
  937. IN unsigned long int cindex ,
  938. IN unsigned long int vindex ,
  939. IN InstanceName *instance )
  940. {
  941. UINT result = SNMP_ERRORSTATUS_NOERROR ;
  942. DateAndTime invalue ;
  943. DateAndTime outvalue ;
  944. char out_stream[ MAX_OCTET_STRING ] ;
  945. AsnOctetString *tmp ;
  946. Access_Credential access ; // dummy holder for future use
  947. tmp = &VarBind->value.asnValue.string ;
  948. invalue.length = tmp->length ;
  949. invalue.string = tmp->stream ;
  950. outvalue.string = out_stream ;
  951. outvalue.length = 0 ;
  952. result = ( *class_info[ cindex ].variable[ vindex ].VarSet )
  953. ( &invalue, &outvalue, &access, instance ) ;
  954. return result;
  955. } /* end of SMISetDateAndTime() */
  956. /*
  957. * SMIBuildDateAndTime
  958. * DateAndTime ::= OCTET STRING (SIZE ( 8 | 11)) A date-time specification
  959. * for the local time of day. This data type is intended toprovide a consistent method of reporting
  960. * dat
  961. *
  962. * Places the variable of datatype DateAndTime into a Variable Binding
  963. *
  964. * Arguments:
  965. * VarBind pointer to the variable value pair
  966. * invalue address of the data
  967. * Return Codes:
  968. *
  969. * Standard PDU error codes.
  970. */
  971. UINT
  972. SMIBuildDateAndTime(
  973. IN OUT RFC1157VarBind *VarBind , // Variable binding for set
  974. IN char *invalue )
  975. {
  976. OctetString *svalue = (OctetString *)invalue ;
  977. UINT status = SNMP_ERRORSTATUS_NOERROR ;
  978. VarBind->value.asnValue.string.length = svalue->length ;
  979. VarBind->value.asnValue.string.stream =
  980. // malloc( svalue->length * sizeof( char ) ) ;
  981. // Changed 5/15/97 DDB
  982. SNMP_malloc( svalue->length * sizeof( char ) ) ;
  983. if ( VarBind->value.asnValue.string.stream == NULL )
  984. status = SNMP_ERRORSTATUS_GENERR ;
  985. else
  986. {
  987. memcpy( VarBind->value.asnValue.string.stream ,
  988. svalue->string ,
  989. svalue->length ) ;
  990. VarBind->value.asnType = ASN_OCTETSTRING ;
  991. VarBind->value.asnValue.string.dynamic = TRUE ;
  992. }
  993. return status ;
  994. } /* end of SMIBuildDateAndTime() */
  995. /*
  996. * SMIGetInternationalDisplayString
  997. * InternationalDisplayString ::= OCTET STRING This data type is used to
  998. * model textual information in some character set. A network management station should use a local
  999. * algo
  1000. *
  1001. * Encompasses the callouts to variables for the data type InternationalDisplayString
  1002. *
  1003. * Arguments:
  1004. * VarBind pointer to the variable value pair
  1005. * cindex index to the class of the request
  1006. * vindex index to the variable of the request
  1007. * instance address of the instance specification
  1008. * in the form of ordered native datatypes
  1009. * Return Codes:
  1010. *
  1011. * Standard PDU error codes.
  1012. *
  1013. * SNMP_ERRORSTATUS_NOERROR Successful get
  1014. * SNMP_ERRORSTATUS_GENERR Catch-all failure code
  1015. * mibtsmio.c v 0.5
  1016. */
  1017. UINT
  1018. SMIGetInternationalDisplayString(
  1019. IN OUT RFC1157VarBind *VarBind , // Variable binding for get
  1020. IN unsigned long int cindex ,
  1021. IN unsigned long int vindex ,
  1022. IN InstanceName *instance )
  1023. {
  1024. UINT result = SNMP_ERRORSTATUS_NOERROR ;
  1025. InternationalDisplayString outvalue ;
  1026. char stream[ MAX_OCTET_STRING ] ;
  1027. Access_Credential access ; // dummy holder for future use
  1028. outvalue.string = stream ;
  1029. outvalue.length = 0 ;
  1030. result = ( *class_info[ cindex ].variable[ vindex ].VarGet )( &outvalue ,
  1031. &access ,
  1032. instance ) ;
  1033. if ( result == SNMP_ERRORSTATUS_NOERROR )
  1034. {
  1035. VarBind->value.asnValue.string.length = outvalue.length ;
  1036. VarBind->value.asnValue.string.stream =
  1037. // malloc( outvalue.length * sizeof( char ) ) ;
  1038. // Changed 5/15/97 DDB
  1039. SNMP_malloc( outvalue.length * sizeof( char ) ) ;
  1040. if ( VarBind->value.asnValue.string.stream == NULL )
  1041. result = SNMP_ERRORSTATUS_GENERR ;
  1042. else
  1043. {
  1044. memcpy( VarBind->value.asnValue.string.stream ,
  1045. outvalue.string ,
  1046. outvalue.length ) ;
  1047. VarBind->value.asnType = ASN_OCTETSTRING ;
  1048. VarBind->value.asnValue.string.dynamic = TRUE ;
  1049. }
  1050. }
  1051. return result ;
  1052. } /* end of SMIGetInternationalDisplayString() */
  1053. /*
  1054. * SMISetInternationalDisplayString
  1055. * InternationalDisplayString ::= OCTET STRING This data type is used to
  1056. * model textual information in some character set. A network management station should use a local
  1057. * algo
  1058. *
  1059. * Encompasses the callouts to variables for the data type InternationalDisplayString
  1060. *
  1061. * Arguments:
  1062. * VarBind pointer to the variable value pair
  1063. * cindex index to the class of the request
  1064. * vindex index to the variable of the request
  1065. * instance address of the instance specification
  1066. * in the form of ordered native datatypes
  1067. * Return Codes:
  1068. *
  1069. * Standard PDU error codes.
  1070. */
  1071. UINT
  1072. SMISetInternationalDisplayString(
  1073. IN OUT RFC1157VarBind *VarBind , // Variable binding for set
  1074. IN unsigned long int cindex ,
  1075. IN unsigned long int vindex ,
  1076. IN InstanceName *instance )
  1077. {
  1078. UINT result = SNMP_ERRORSTATUS_NOERROR ;
  1079. InternationalDisplayString invalue ;
  1080. InternationalDisplayString outvalue ;
  1081. char out_stream[ MAX_OCTET_STRING ] ;
  1082. AsnOctetString *tmp ;
  1083. Access_Credential access ; // dummy holder for future use
  1084. tmp = &VarBind->value.asnValue.string ;
  1085. invalue.length = tmp->length ;
  1086. invalue.string = tmp->stream ;
  1087. outvalue.string = out_stream ;
  1088. outvalue.length = 0 ;
  1089. result = ( *class_info[ cindex ].variable[ vindex ].VarSet )
  1090. ( &invalue, &outvalue, &access, instance ) ;
  1091. return result;
  1092. } /* end of SMISetInternationalDisplayString() */
  1093. /*
  1094. * SMIBuildInternationalDisplayString
  1095. * InternationalDisplayString ::= OCTET STRING This data type is used to
  1096. * model textual information in some character set. A network management station should use a local
  1097. * algo
  1098. *
  1099. * Places the variable of datatype InternationalDisplayString into a Variable Binding
  1100. *
  1101. * Arguments:
  1102. * VarBind pointer to the variable value pair
  1103. * invalue address of the data
  1104. * Return Codes:
  1105. *
  1106. * Standard PDU error codes.
  1107. */
  1108. UINT
  1109. SMIBuildInternationalDisplayString(
  1110. IN OUT RFC1157VarBind *VarBind , // Variable binding for set
  1111. IN char *invalue )
  1112. {
  1113. OctetString *svalue = (OctetString *)invalue ;
  1114. UINT status = SNMP_ERRORSTATUS_NOERROR ;
  1115. VarBind->value.asnValue.string.length = svalue->length ;
  1116. VarBind->value.asnValue.string.stream =
  1117. // malloc( svalue->length * sizeof( char ) ) ;
  1118. // Changed 5/15/97 DDB
  1119. SNMP_malloc( svalue->length * sizeof( char ) ) ;
  1120. if ( VarBind->value.asnValue.string.stream == NULL )
  1121. status = SNMP_ERRORSTATUS_GENERR ;
  1122. else
  1123. {
  1124. memcpy( VarBind->value.asnValue.string.stream ,
  1125. svalue->string ,
  1126. svalue->length ) ;
  1127. VarBind->value.asnType = ASN_OCTETSTRING ;
  1128. VarBind->value.asnValue.string.dynamic = TRUE ;
  1129. }
  1130. return status ;
  1131. } /* end of SMIBuildInternationalDisplayString() */
  1132. /*
  1133. * SMIGetProductID
  1134. * ProductID ::= OBJECT IDENTIFIER This textual convention is intended to
  1135. * identify the manufacturer, model, and version of a specific hardware or software
  1136. * product.
  1137. *
  1138. * Encompasses the callouts to variables for the data type ProductID
  1139. *
  1140. * Arguments:
  1141. * VarBind pointer to the variable value pair
  1142. * cindex index to the class of the request
  1143. * vindex index to the variable of the request
  1144. * instance address of the instance specification
  1145. * in the form of ordered native datatypes
  1146. * Return Codes:
  1147. *
  1148. * Standard PDU error codes.
  1149. *
  1150. * SNMP_ERRORSTATUS_NOERROR Successful get
  1151. * SNMP_ERRORSTATUS_GENERR Catch-all failure code
  1152. * mibtsmib.c v 0.5
  1153. */
  1154. UINT
  1155. SMIGetProductID(
  1156. IN OUT RFC1157VarBind *VarBind , // Variable binding for get
  1157. IN unsigned long int cindex ,
  1158. IN unsigned long int vindex ,
  1159. IN InstanceName *instance )
  1160. {
  1161. UINT result = SNMP_ERRORSTATUS_NOERROR ;
  1162. UINT status ;
  1163. ProductID outvalue ;
  1164. Access_Credential access ; // dummy holder for future use
  1165. memset( &outvalue, '\0', sizeof( ProductID ) ) ;
  1166. result = ( *class_info[ cindex ].variable[ vindex ].VarGet )( &outvalue ,
  1167. &access ,
  1168. instance ) ;
  1169. if ( result == SNMP_ERRORSTATUS_NOERROR )
  1170. {
  1171. status = SNMP_oidcpy( &VarBind->value.asnValue.object, &outvalue ) ;
  1172. if ( !status )
  1173. result = SNMP_ERRORSTATUS_GENERR ;
  1174. else
  1175. {
  1176. if ( outvalue.idLength != 0 )
  1177. SnmpUtilOidFree( &outvalue ) ;
  1178. VarBind->value.asnType = ASN_OBJECTIDENTIFIER ;
  1179. }
  1180. }
  1181. return result ;
  1182. } /* end of SMIGetProductID() */
  1183. /*
  1184. * SMISetProductID
  1185. * ProductID ::= OBJECT IDENTIFIER This textual convention is intended to
  1186. * identify the manufacturer, model, and version of a specific hardware or software
  1187. * product.
  1188. *
  1189. * Encompasses the callouts to variables for the data type ProductID
  1190. *
  1191. * Arguments:
  1192. * VarBind pointer to the variable value pair
  1193. * cindex index to the class of the request
  1194. * vindex index to the variable of the request
  1195. * instance address of the instance specification
  1196. * in the form of ordered native datatypes
  1197. * Return Codes:
  1198. *
  1199. * Standard PDU error codes.
  1200. */
  1201. UINT
  1202. SMISetProductID(
  1203. IN OUT RFC1157VarBind *VarBind , // Variable binding for set
  1204. IN unsigned long int cindex ,
  1205. IN unsigned long int vindex ,
  1206. IN InstanceName *instance )
  1207. {
  1208. UINT result = SNMP_ERRORSTATUS_NOERROR ;
  1209. ProductID *invalue ;
  1210. ProductID outvalue ;
  1211. Access_Credential access ; // dummy holder for future use
  1212. invalue = (ProductID *)&VarBind->value.asnValue.object ;
  1213. memset( &outvalue, '\0', sizeof( ProductID ) ) ;
  1214. result = ( *class_info[ cindex ].variable[ vindex ].VarSet )
  1215. ( invalue, &outvalue, &access, instance ) ;
  1216. if ( outvalue.idLength != 0 )
  1217. SnmpUtilOidFree( &outvalue ) ;
  1218. return result ;
  1219. } /* end of SMISetProductID() */
  1220. /*
  1221. * SMIBuildProductID
  1222. * ProductID ::= OBJECT IDENTIFIER This textual convention is intended to
  1223. * identify the manufacturer, model, and version of a specific hardware or software
  1224. * product.
  1225. *
  1226. * Encompasses the callouts to variables for the data type ProductID
  1227. *
  1228. * Arguments:
  1229. * VarBind pointer to the variable value pair
  1230. * invalue address of the data
  1231. *
  1232. * Return Codes:
  1233. *
  1234. * Standard PDU error codes.
  1235. */
  1236. UINT
  1237. SMIBuildProductID(
  1238. IN OUT RFC1157VarBind *VarBind , // Variable binding for set
  1239. IN char *invalue )
  1240. {
  1241. AsnObjectIdentifier *svalue = (AsnObjectIdentifier *)invalue ;
  1242. UINT status = SNMP_ERRORSTATUS_NOERROR ;
  1243. UINT sts = TRUE ;
  1244. sts = SNMP_oidcpy( &VarBind->value.asnValue.object ,
  1245. (AsnObjectIdentifier *)svalue ) ;
  1246. if (!sts)
  1247. status = SNMP_ERRORSTATUS_GENERR ;
  1248. else
  1249. VarBind->value.asnType = ASN_OBJECTIDENTIFIER ;
  1250. return status ;
  1251. } /* end of SMIBuildProductID() */
  1252. /* end of hostmsmi.c */