Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

489 lines
21 KiB

  1. /* WinSNMP.h */
  2. /* Copyright (C) 1993-1999 Microsoft Corporation */
  3. /* v1.0 - Sep 13, 1993 */
  4. /* v1.1 - Jun 12, 1994 */
  5. /* v2.0 - Nov 1, 1997 */
  6. /* - Nov 17, 1997: inc limits.h, tests for ULONG/UINT_MAX */
  7. /* - Mar 23, 1998: fixed typo in "lpClientData" */
  8. /* Questions/comments to Bob Natale, [email protected] */
  9. #ifndef _INC_WINSNMP /* Include WinSNMP declarations */
  10. #define _INC_WINSNMP /* Just once! */
  11. #if _MSC_VER > 1000
  12. #pragma once
  13. #endif
  14. #ifndef _INC_WINDOWS /* Include Windows declarations, if not already done */
  15. #include <windows.h>
  16. #define _INC_WINDOWS /* Just once! */
  17. #endif /* _INC_WINDOWS */
  18. #include <limits.h>
  19. #ifdef __cplusplus
  20. extern "C" {
  21. #endif
  22. /* WinSNMP API Type Definitions */
  23. typedef HANDLE HSNMP_SESSION, FAR *LPHSNMP_SESSION;
  24. typedef HANDLE HSNMP_ENTITY, FAR *LPHSNMP_ENTITY;
  25. typedef HANDLE HSNMP_CONTEXT, FAR *LPHSNMP_CONTEXT;
  26. typedef HANDLE HSNMP_PDU, FAR *LPHSNMP_PDU;
  27. typedef HANDLE HSNMP_VBL, FAR *LPHSNMP_VBL;
  28. typedef unsigned char smiBYTE, FAR *smiLPBYTE;
  29. /* SNMP-related types */
  30. #if ULONG_MAX == 4294967295U
  31. typedef signed long smiINT, FAR *smiLPINT;
  32. typedef smiINT smiINT32, FAR *smiLPINT32;
  33. typedef unsigned long smiUINT32, FAR *smiLPUINT32;
  34. #elif UINT_MAX == 4294967295U
  35. typedef int smiINT, FAR *smiLPINT;
  36. typedef smiINT smiINT32, FAR *smiLPINT32;
  37. typedef unsigned int smiUINT32, FAR *smiLPUINT32;
  38. #else
  39. #error can not define smiINT and smiUINT
  40. #endif
  41. typedef struct {
  42. smiUINT32 len;
  43. smiLPBYTE ptr;} smiOCTETS, FAR *smiLPOCTETS;
  44. typedef const smiOCTETS FAR *smiLPCOCTETS;
  45. typedef smiOCTETS smiBITS, FAR *smiLPBITS;
  46. typedef struct {
  47. smiUINT32 len;
  48. smiLPUINT32 ptr;} smiOID, FAR *smiLPOID;
  49. typedef const smiOID FAR *smiLPCOID;
  50. typedef smiOCTETS smiIPADDR, FAR *smiLPIPADDR;
  51. typedef smiUINT32 smiCNTR32, FAR *smiLPCNTR32;
  52. typedef smiUINT32 smiGAUGE32, FAR *smiLPGAUGE32;
  53. typedef smiUINT32 smiTIMETICKS, FAR *smiLPTIMETICKS;
  54. typedef smiOCTETS smiOPAQUE, FAR *smiLPOPAQUE;
  55. typedef smiOCTETS smiNSAPADDR, FAR *smiLPNSAPADDR;
  56. typedef struct {
  57. smiUINT32 hipart;
  58. smiUINT32 lopart;} smiCNTR64, FAR *smiLPCNTR64;
  59. /* ASN/BER Base Types */
  60. /* (used in forming SYNTAXes and certain SNMP types/values) */
  61. #define ASN_UNIVERSAL (0x00)
  62. #define ASN_APPLICATION (0x40)
  63. #define ASN_CONTEXT (0x80)
  64. #define ASN_PRIVATE (0xC0)
  65. #define ASN_PRIMITIVE (0x00)
  66. #define ASN_CONSTRUCTOR (0x20)
  67. /* SNMP ObjectSyntax Values */
  68. #define SNMP_SYNTAX_SEQUENCE (ASN_UNIVERSAL | ASN_CONSTRUCTOR | 0x10)
  69. /* These values are used in the "syntax" member of the smiVALUE structure which follows */
  70. #define SNMP_SYNTAX_INT (ASN_UNIVERSAL | ASN_PRIMITIVE | 0x02)
  71. #define SNMP_SYNTAX_BITS (ASN_UNIVERSAL | ASN_PRIMITIVE | 0x03)
  72. #define SNMP_SYNTAX_OCTETS (ASN_UNIVERSAL | ASN_PRIMITIVE | 0x04)
  73. #define SNMP_SYNTAX_NULL (ASN_UNIVERSAL | ASN_PRIMITIVE | 0x05)
  74. #define SNMP_SYNTAX_OID (ASN_UNIVERSAL | ASN_PRIMITIVE | 0x06)
  75. #define SNMP_SYNTAX_INT32 SNMP_SYNTAX_INT
  76. #define SNMP_SYNTAX_IPADDR (ASN_APPLICATION | ASN_PRIMITIVE | 0x00)
  77. #define SNMP_SYNTAX_CNTR32 (ASN_APPLICATION | ASN_PRIMITIVE | 0x01)
  78. #define SNMP_SYNTAX_GAUGE32 (ASN_APPLICATION | ASN_PRIMITIVE | 0x02)
  79. #define SNMP_SYNTAX_TIMETICKS (ASN_APPLICATION | ASN_PRIMITIVE | 0x03)
  80. #define SNMP_SYNTAX_OPAQUE (ASN_APPLICATION | ASN_PRIMITIVE | 0x04)
  81. #define SNMP_SYNTAX_NSAPADDR (ASN_APPLICATION | ASN_PRIMITIVE | 0x05)
  82. #define SNMP_SYNTAX_CNTR64 (ASN_APPLICATION | ASN_PRIMITIVE | 0x06)
  83. #define SNMP_SYNTAX_UINT32 (ASN_APPLICATION | ASN_PRIMITIVE | 0x07)
  84. #define SNMP_SYNTAX_UNSIGNED32 SNMP_SYNTAX_GAUGE32
  85. /* Exception conditions in response PDUs for SNMPv2 */
  86. #define SNMP_SYNTAX_NOSUCHOBJECT (ASN_CONTEXT | ASN_PRIMITIVE | 0x00)
  87. #define SNMP_SYNTAX_NOSUCHINSTANCE (ASN_CONTEXT | ASN_PRIMITIVE | 0x01)
  88. #define SNMP_SYNTAX_ENDOFMIBVIEW (ASN_CONTEXT | ASN_PRIMITIVE | 0x02)
  89. typedef struct { /* smiVALUE portion of VarBind */
  90. smiUINT32 syntax; /* Insert SNMP_SYNTAX_<type> */
  91. union {
  92. smiINT sNumber; /* SNMP_SYNTAX_INT
  93. SNMP_SYNTAX_INT32 */
  94. smiUINT32 uNumber; /* SNMP_SYNTAX_UINT32
  95. SNMP_SYNTAX_CNTR32
  96. SNMP_SYNTAX_GAUGE32
  97. SNMP_SYNTAX_TIMETICKS */
  98. smiCNTR64 hNumber; /* SNMP_SYNTAX_CNTR64 */
  99. smiOCTETS string; /* SNMP_SYNTAX_OCTETS
  100. SNMP_SYNTAX_BITS
  101. SNMP_SYNTAX_OPAQUE
  102. SNMP_SYNTAX_IPADDR
  103. SNMP_SYNTAX_NSAPADDR */
  104. smiOID oid; /* SNMP_SYNTAX_OID */
  105. smiBYTE empty; /* SNMP_SYNTAX_NULL
  106. SNMP_SYNTAX_NOSUCHOBJECT
  107. SNMP_SYNTAX_NOSUCHINSTANCE
  108. SNMP_SYNTAX_ENDOFMIBVIEW */
  109. } value; /* union */
  110. } smiVALUE, FAR *smiLPVALUE;
  111. typedef const smiVALUE FAR *smiLPCVALUE;
  112. /* SNMP Limits */
  113. #define MAXOBJIDSIZE 128 /* Max number of components in an OID */
  114. #define MAXOBJIDSTRSIZE 1408 /* Max len of decoded MAXOBJIDSIZE OID */
  115. /* PDU Type Values */
  116. #define SNMP_PDU_GET (ASN_CONTEXT | ASN_CONSTRUCTOR | 0x0)
  117. #define SNMP_PDU_GETNEXT (ASN_CONTEXT | ASN_CONSTRUCTOR | 0x1)
  118. #define SNMP_PDU_RESPONSE (ASN_CONTEXT | ASN_CONSTRUCTOR | 0x2)
  119. #define SNMP_PDU_SET (ASN_CONTEXT | ASN_CONSTRUCTOR | 0x3)
  120. /* SNMP_PDU_V1TRAP is obsolete in SNMPv2 */
  121. #define SNMP_PDU_V1TRAP (ASN_CONTEXT | ASN_CONSTRUCTOR | 0x4)
  122. #define SNMP_PDU_GETBULK (ASN_CONTEXT | ASN_CONSTRUCTOR | 0x5)
  123. #define SNMP_PDU_INFORM (ASN_CONTEXT | ASN_CONSTRUCTOR | 0x6)
  124. #define SNMP_PDU_TRAP (ASN_CONTEXT | ASN_CONSTRUCTOR | 0x7)
  125. /* SNMPv1 Trap Values */
  126. /* (These values might be superfluous wrt WinSNMP applications) */
  127. #define SNMP_TRAP_COLDSTART 0
  128. #define SNMP_TRAP_WARMSTART 1
  129. #define SNMP_TRAP_LINKDOWN 2
  130. #define SNMP_TRAP_LINKUP 3
  131. #define SNMP_TRAP_AUTHFAIL 4
  132. #define SNMP_TRAP_EGPNEIGHBORLOSS 5
  133. #define SNMP_TRAP_ENTERPRISESPECIFIC 6
  134. /* SNMP Error Codes Returned in Error_status Field of PDU */
  135. /* (these are NOT WinSNMP API Error Codes */
  136. /* Error Codes Common to SNMPv1 and SNMPv2 */
  137. #define SNMP_ERROR_NOERROR 0
  138. #define SNMP_ERROR_TOOBIG 1
  139. #define SNMP_ERROR_NOSUCHNAME 2
  140. #define SNMP_ERROR_BADVALUE 3
  141. #define SNMP_ERROR_READONLY 4
  142. #define SNMP_ERROR_GENERR 5
  143. /* Error Codes Added for SNMPv2 */
  144. #define SNMP_ERROR_NOACCESS 6
  145. #define SNMP_ERROR_WRONGTYPE 7
  146. #define SNMP_ERROR_WRONGLENGTH 8
  147. #define SNMP_ERROR_WRONGENCODING 9
  148. #define SNMP_ERROR_WRONGVALUE 10
  149. #define SNMP_ERROR_NOCREATION 11
  150. #define SNMP_ERROR_INCONSISTENTVALUE 12
  151. #define SNMP_ERROR_RESOURCEUNAVAILABLE 13
  152. #define SNMP_ERROR_COMMITFAILED 14
  153. #define SNMP_ERROR_UNDOFAILED 15
  154. #define SNMP_ERROR_AUTHORIZATIONERROR 16
  155. #define SNMP_ERROR_NOTWRITABLE 17
  156. #define SNMP_ERROR_INCONSISTENTNAME 18
  157. /* WinSNMP API Values */
  158. /* Values used to indicate entity/context translation modes */
  159. #define SNMPAPI_TRANSLATED 0
  160. #define SNMPAPI_UNTRANSLATED_V1 1
  161. #define SNMPAPI_UNTRANSLATED_V2 2
  162. /* Values used to indicate "SNMP level" supported by the implementation */
  163. #define SNMPAPI_NO_SUPPORT 0
  164. #define SNMPAPI_V1_SUPPORT 1
  165. #define SNMPAPI_V2_SUPPORT 2
  166. #define SNMPAPI_M2M_SUPPORT 3
  167. /* Values used to indicate retransmit mode in the implementation */
  168. #define SNMPAPI_OFF 0 /* Refuse support */
  169. #define SNMPAPI_ON 1 /* Request support */
  170. /* WinSNMP API Function Return Codes */
  171. typedef smiUINT32 SNMPAPI_STATUS; /* Used for function ret values */
  172. #define SNMPAPI_FAILURE 0 /* Generic error code */
  173. #define SNMPAPI_SUCCESS 1 /* Generic success code */
  174. /* WinSNMP API Error Codes (for SnmpGetLastError) */
  175. /* (NOT SNMP Response-PDU error_status codes) */
  176. #define SNMPAPI_ALLOC_ERROR 2 /* Error allocating memory */
  177. #define SNMPAPI_CONTEXT_INVALID 3 /* Invalid context parameter */
  178. #define SNMPAPI_CONTEXT_UNKNOWN 4 /* Unknown context parameter */
  179. #define SNMPAPI_ENTITY_INVALID 5 /* Invalid entity parameter */
  180. #define SNMPAPI_ENTITY_UNKNOWN 6 /* Unknown entity parameter */
  181. #define SNMPAPI_INDEX_INVALID 7 /* Invalid VBL index parameter */
  182. #define SNMPAPI_NOOP 8 /* No operation performed */
  183. #define SNMPAPI_OID_INVALID 9 /* Invalid OID parameter */
  184. #define SNMPAPI_OPERATION_INVALID 10 /* Invalid/unsupported operation */
  185. #define SNMPAPI_OUTPUT_TRUNCATED 11 /* Insufficient output buf len */
  186. #define SNMPAPI_PDU_INVALID 12 /* Invalid PDU parameter */
  187. #define SNMPAPI_SESSION_INVALID 13 /* Invalid session parameter */
  188. #define SNMPAPI_SYNTAX_INVALID 14 /* Invalid syntax in smiVALUE */
  189. #define SNMPAPI_VBL_INVALID 15 /* Invalid VBL parameter */
  190. #define SNMPAPI_MODE_INVALID 16 /* Invalid mode parameter */
  191. #define SNMPAPI_SIZE_INVALID 17 /* Invalid size/length parameter */
  192. #define SNMPAPI_NOT_INITIALIZED 18 /* SnmpStartup failed/not called */
  193. #define SNMPAPI_MESSAGE_INVALID 19 /* Invalid SNMP message format */
  194. #define SNMPAPI_HWND_INVALID 20 /* Invalid Window handle */
  195. #define SNMPAPI_OTHER_ERROR 99 /* For internal/undefined errors */
  196. /* Generic Transport Layer (TL) Errors */
  197. #define SNMPAPI_TL_NOT_INITIALIZED 100 /* TL not initialized */
  198. #define SNMPAPI_TL_NOT_SUPPORTED 101 /* TL does not support protocol */
  199. #define SNMPAPI_TL_NOT_AVAILABLE 102 /* Network subsystem has failed */
  200. #define SNMPAPI_TL_RESOURCE_ERROR 103 /* TL resource error */
  201. #define SNMPAPI_TL_UNDELIVERABLE 104 /* Destination unreachable */
  202. #define SNMPAPI_TL_SRC_INVALID 105 /* Source endpoint invalid */
  203. #define SNMPAPI_TL_INVALID_PARAM 106 /* Input parameter invalid */
  204. #define SNMPAPI_TL_IN_USE 107 /* Source endpoint in use */
  205. #define SNMPAPI_TL_TIMEOUT 108 /* No response before timeout */
  206. #define SNMPAPI_TL_PDU_TOO_BIG 109 /* PDU too big for send/receive */
  207. #define SNMPAPI_TL_OTHER 199 /* Undefined TL error */
  208. /* WinSNMP API Function Prototypes */
  209. #ifndef IN
  210. #define IN
  211. #endif
  212. #ifndef OUT
  213. #define OUT
  214. #endif
  215. #define SNMPAPI_CALL WINAPI /* FAR PASCAL calling conventions */
  216. /* v2.0: Structure for SnmpGetVendorInfo() output */
  217. #define MAXVENDORINFO 32
  218. typedef struct
  219. {
  220. char vendorName[MAXVENDORINFO*2];
  221. char vendorContact[MAXVENDORINFO*2];
  222. char vendorVersionId[MAXVENDORINFO];
  223. char vendorVersionDate[MAXVENDORINFO];
  224. smiUINT32 vendorEnterprise;
  225. } smiVENDORINFO, FAR *smiLPVENDORINFO;
  226. /* v2.0: Callback format for SnmpCreateSession() fCallback parameter */
  227. typedef SNMPAPI_STATUS (CALLBACK *SNMPAPI_CALLBACK)
  228. (IN HSNMP_SESSION hSession,
  229. IN HWND hWnd,
  230. IN UINT wMsg,
  231. IN WPARAM wParam,
  232. IN LPARAM lParam,
  233. IN LPVOID lpClientData);
  234. /* Local Database Functions */
  235. SNMPAPI_STATUS SNMPAPI_CALL SnmpGetTranslateMode
  236. (OUT smiLPUINT32 nTranslateMode);
  237. SNMPAPI_STATUS SNMPAPI_CALL SnmpSetTranslateMode
  238. (IN smiUINT32 nTranslateMode);
  239. SNMPAPI_STATUS SNMPAPI_CALL SnmpGetRetransmitMode
  240. (OUT smiLPUINT32 nRetransmitMode);
  241. SNMPAPI_STATUS SNMPAPI_CALL SnmpSetRetransmitMode
  242. (IN smiUINT32 nRetransmitMode);
  243. SNMPAPI_STATUS SNMPAPI_CALL SnmpGetTimeout
  244. (IN HSNMP_ENTITY hEntity,
  245. OUT smiLPTIMETICKS nPolicyTimeout,
  246. OUT smiLPTIMETICKS nActualTimeout);
  247. SNMPAPI_STATUS SNMPAPI_CALL SnmpSetTimeout
  248. (IN HSNMP_ENTITY hEntity,
  249. IN smiTIMETICKS nPolicyTimeout);
  250. SNMPAPI_STATUS SNMPAPI_CALL SnmpGetRetry
  251. (IN HSNMP_ENTITY hEntity,
  252. OUT smiLPUINT32 nPolicyRetry,
  253. OUT smiLPUINT32 nActualRetry);
  254. SNMPAPI_STATUS SNMPAPI_CALL SnmpSetRetry
  255. (IN HSNMP_ENTITY hEntity,
  256. IN smiUINT32 nPolicyRetry);
  257. /* Following Local Database Functions added in v2.0 */
  258. SNMPAPI_STATUS SNMPAPI_CALL SnmpGetVendorInfo
  259. (OUT smiLPVENDORINFO vendorInfo);
  260. /* Communications Functions */
  261. SNMPAPI_STATUS SNMPAPI_CALL SnmpStartup
  262. (OUT smiLPUINT32 nMajorVersion,
  263. OUT smiLPUINT32 nMinorVersion,
  264. OUT smiLPUINT32 nLevel,
  265. OUT smiLPUINT32 nTranslateMode,
  266. OUT smiLPUINT32 nRetransmitMode);
  267. SNMPAPI_STATUS SNMPAPI_CALL SnmpCleanup
  268. (void);
  269. HSNMP_SESSION SNMPAPI_CALL SnmpOpen
  270. (IN HWND hWnd,
  271. IN UINT wMsg);
  272. SNMPAPI_STATUS SNMPAPI_CALL SnmpClose
  273. (IN HSNMP_SESSION session);
  274. SNMPAPI_STATUS SNMPAPI_CALL SnmpSendMsg
  275. (IN HSNMP_SESSION session,
  276. IN HSNMP_ENTITY srcEntity,
  277. IN HSNMP_ENTITY dstEntity,
  278. IN HSNMP_CONTEXT context,
  279. IN HSNMP_PDU PDU);
  280. SNMPAPI_STATUS SNMPAPI_CALL SnmpRecvMsg
  281. (IN HSNMP_SESSION session,
  282. OUT LPHSNMP_ENTITY srcEntity,
  283. OUT LPHSNMP_ENTITY dstEntity,
  284. OUT LPHSNMP_CONTEXT context,
  285. OUT LPHSNMP_PDU PDU);
  286. SNMPAPI_STATUS SNMPAPI_CALL SnmpRegister
  287. (IN HSNMP_SESSION session,
  288. IN HSNMP_ENTITY srcEntity,
  289. IN HSNMP_ENTITY dstEntity,
  290. IN HSNMP_CONTEXT context,
  291. IN smiLPCOID notification,
  292. IN smiUINT32 state);
  293. /* Following Communications Functions added in v2.0 */
  294. HSNMP_SESSION SNMPAPI_CALL SnmpCreateSession
  295. (IN HWND hWnd,
  296. IN UINT wMsg,
  297. IN SNMPAPI_CALLBACK fCallBack,
  298. IN LPVOID lpClientData);
  299. SNMPAPI_STATUS SNMPAPI_CALL SnmpListen
  300. (IN HSNMP_ENTITY hEntity,
  301. IN SNMPAPI_STATUS lStatus);
  302. SNMPAPI_STATUS SNMPAPI_CALL SnmpCancelMsg
  303. (IN HSNMP_SESSION session,
  304. IN smiINT32 reqId);
  305. /* Entity/Context Functions */
  306. HSNMP_ENTITY SNMPAPI_CALL SnmpStrToEntity
  307. (IN HSNMP_SESSION session,
  308. IN LPCSTR string);
  309. SNMPAPI_STATUS SNMPAPI_CALL SnmpEntityToStr
  310. (IN HSNMP_ENTITY entity,
  311. IN smiUINT32 size,
  312. OUT LPSTR string);
  313. SNMPAPI_STATUS SNMPAPI_CALL SnmpFreeEntity
  314. (IN HSNMP_ENTITY entity);
  315. HSNMP_CONTEXT SNMPAPI_CALL SnmpStrToContext
  316. (IN HSNMP_SESSION session,
  317. IN smiLPCOCTETS string);
  318. SNMPAPI_STATUS SNMPAPI_CALL SnmpContextToStr
  319. (IN HSNMP_CONTEXT context,
  320. OUT smiLPOCTETS string);
  321. SNMPAPI_STATUS SNMPAPI_CALL SnmpFreeContext
  322. (IN HSNMP_CONTEXT context);
  323. /* Following Entity/Context Functions added in v2.0 */
  324. SNMPAPI_STATUS SNMPAPI_CALL SnmpSetPort
  325. (IN HSNMP_ENTITY hEntity,
  326. IN UINT nPort);
  327. /* PDU Functions */
  328. HSNMP_PDU SNMPAPI_CALL SnmpCreatePdu
  329. (IN HSNMP_SESSION session,
  330. IN smiINT PDU_type,
  331. IN smiINT32 request_id,
  332. IN smiINT error_status,
  333. IN smiINT error_index,
  334. IN HSNMP_VBL varbindlist);
  335. SNMPAPI_STATUS SNMPAPI_CALL SnmpGetPduData
  336. (IN HSNMP_PDU PDU,
  337. OUT smiLPINT PDU_type,
  338. OUT smiLPINT32 request_id,
  339. OUT smiLPINT error_status,
  340. OUT smiLPINT error_index,
  341. OUT LPHSNMP_VBL varbindlist);
  342. SNMPAPI_STATUS SNMPAPI_CALL SnmpSetPduData
  343. (IN HSNMP_PDU PDU,
  344. IN const smiINT FAR *PDU_type,
  345. IN const smiINT32 FAR *request_id,
  346. IN const smiINT FAR *non_repeaters,
  347. IN const smiINT FAR *max_repetitions,
  348. IN const HSNMP_VBL FAR *varbindlist);
  349. HSNMP_PDU SNMPAPI_CALL SnmpDuplicatePdu
  350. (IN HSNMP_SESSION session,
  351. IN HSNMP_PDU PDU);
  352. SNMPAPI_STATUS SNMPAPI_CALL SnmpFreePdu
  353. (IN HSNMP_PDU PDU);
  354. /* Variable-Binding Functions */
  355. HSNMP_VBL SNMPAPI_CALL SnmpCreateVbl
  356. (IN HSNMP_SESSION session,
  357. IN smiLPCOID name,
  358. IN smiLPCVALUE value);
  359. HSNMP_VBL SNMPAPI_CALL SnmpDuplicateVbl
  360. (IN HSNMP_SESSION session,
  361. IN HSNMP_VBL vbl);
  362. SNMPAPI_STATUS SNMPAPI_CALL SnmpFreeVbl
  363. (IN HSNMP_VBL vbl);
  364. SNMPAPI_STATUS SNMPAPI_CALL SnmpCountVbl
  365. (IN HSNMP_VBL vbl);
  366. SNMPAPI_STATUS SNMPAPI_CALL SnmpGetVb
  367. (IN HSNMP_VBL vbl,
  368. IN smiUINT32 index,
  369. OUT smiLPOID name,
  370. OUT smiLPVALUE value);
  371. SNMPAPI_STATUS SNMPAPI_CALL SnmpSetVb
  372. (IN HSNMP_VBL vbl,
  373. IN smiUINT32 index,
  374. IN smiLPCOID name,
  375. IN smiLPCVALUE value);
  376. SNMPAPI_STATUS SNMPAPI_CALL SnmpDeleteVb
  377. (IN HSNMP_VBL vbl,
  378. IN smiUINT32 index);
  379. /* Utility Functions */
  380. SNMPAPI_STATUS SNMPAPI_CALL SnmpGetLastError
  381. (IN HSNMP_SESSION session);
  382. SNMPAPI_STATUS SNMPAPI_CALL SnmpStrToOid
  383. (IN LPCSTR string,
  384. OUT smiLPOID dstOID);
  385. SNMPAPI_STATUS SNMPAPI_CALL SnmpOidToStr
  386. (IN smiLPCOID srcOID,
  387. IN smiUINT32 size,
  388. OUT LPSTR string);
  389. SNMPAPI_STATUS SNMPAPI_CALL SnmpOidCopy
  390. (IN smiLPCOID srcOID,
  391. OUT smiLPOID dstOID);
  392. SNMPAPI_STATUS SNMPAPI_CALL SnmpOidCompare
  393. (IN smiLPCOID xOID,
  394. IN smiLPCOID yOID,
  395. IN smiUINT32 maxlen,
  396. OUT smiLPINT result);
  397. SNMPAPI_STATUS SNMPAPI_CALL SnmpEncodeMsg
  398. (IN HSNMP_SESSION session,
  399. IN HSNMP_ENTITY srcEntity,
  400. IN HSNMP_ENTITY dstEntity,
  401. IN HSNMP_CONTEXT context,
  402. IN HSNMP_PDU pdu,
  403. OUT smiLPOCTETS msgBufDesc);
  404. SNMPAPI_STATUS SNMPAPI_CALL SnmpDecodeMsg
  405. (IN HSNMP_SESSION session,
  406. OUT LPHSNMP_ENTITY srcEntity,
  407. OUT LPHSNMP_ENTITY dstEntity,
  408. OUT LPHSNMP_CONTEXT context,
  409. OUT LPHSNMP_PDU pdu,
  410. IN smiLPCOCTETS msgBufDesc);
  411. SNMPAPI_STATUS SNMPAPI_CALL SnmpFreeDescriptor
  412. (IN smiUINT32 syntax,
  413. IN smiLPOPAQUE descriptor);
  414. #ifdef __cplusplus
  415. }
  416. #endif
  417. #endif /* _INC_WINSNMP */