home *** CD-ROM | disk | FTP | other *** search
/ PC Format (South-Africa) 2001 June / PCFJune.iso / Xenon / C++ / FreeCommandLineTools.exe / Include / winsnmp.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-01-31  |  21.1 KB  |  491 lines

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