home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1995 April / Internet Tools.iso / dos_win / winsnmp / apps / winsnmp.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-08  |  18.5 KB  |  428 lines

  1. /* WinSNMP.h */
  2. /* v1.0 - Sep 13, 1993 */
  3. /* v1.1 - Jun 12, 1994 */
  4. /* v1.1 - Nov  8, 1994 - fixed SNMP_SYNTAX_SEQUENCE */
  5.  
  6. /* Questions/comments to Bob Natale, natale@acec.com */
  7.  
  8. #ifndef _INC_WINSNMP     /* Include WinSNMP declarations */
  9. #define  _INC_WINSNMP    /* Just once! */
  10.  
  11. #ifndef _INC_WINDOWS     /* Include Windows declarations, if not already done */
  12. #include <windows.h>
  13. #define _INC_WINDOWS     /* Just once! */
  14. #endif                   /* _INC_WINDOWS */
  15.  
  16. #ifdef __cplusplus
  17. extern "C" {
  18. #endif
  19.  
  20. /* WinSNMP API Type Definitions  */
  21. typedef  HANDLE          HSNMP_SESSION,      FAR *LPHSNMP_SESSION;
  22. typedef  HANDLE          HSNMP_ENTITY,       FAR *LPHSNMP_ENTITY;
  23. typedef  HANDLE          HSNMP_CONTEXT,      FAR *LPHSNMP_CONTEXT;
  24. typedef  HANDLE          HSNMP_PDU,          FAR *LPHSNMP_PDU;
  25. typedef  HANDLE          HSNMP_VBL,          FAR *LPHSNMP_VBL;
  26. typedef unsigned char    smiBYTE,            FAR *smiLPBYTE;
  27. /* SNMP-related types from RFC1442 (SMI) */
  28. typedef signed long      smiINT,             FAR *smiLPINT;
  29. typedef smiINT           smiINT32,           FAR *smiLPINT32;
  30. typedef unsigned long    smiUINT32,          FAR *smiLPUINT32;
  31. typedef struct {
  32.      smiUINT32 len;
  33.      smiLPBYTE ptr;}     smiOCTETS,          FAR *smiLPOCTETS;
  34. typedef const smiOCTETS                      FAR *smiLPCOCTETS;
  35. typedef smiOCTETS        smiBITS,            FAR *smiLPBITS;
  36. typedef struct {
  37.      smiUINT32   len;
  38.      smiLPUINT32 ptr;}   smiOID,             FAR *smiLPOID;
  39. typedef const smiOID                         FAR *smiLPCOID;
  40. typedef smiOCTETS        smiIPADDR,          FAR *smiLPIPADDR;
  41. typedef smiUINT32        smiCNTR32,          FAR *smiLPCNTR32;
  42. typedef smiUINT32        smiGAUGE32,         FAR *smiLPGAUGE32;
  43. typedef smiUINT32        smiTIMETICKS,       FAR *smiLPTIMETICKS;
  44. typedef smiOCTETS        smiOPAQUE,          FAR *smiLPOPAQUE;
  45. typedef smiOCTETS        smiNSAPADDR,        FAR *smiLPNSAPADDR;
  46. typedef struct {
  47.      smiUINT32 hipart;
  48.      smiUINT32 lopart;}  smiCNTR64,          FAR *smiLPCNTR64;
  49.  
  50. /* ASN/BER Base Types */
  51. /* (used in forming SYNTAXes and certain SNMP types/values) */
  52. #define ASN_UNIVERSAL         (0x00)
  53. #define ASN_APPLICATION       (0x40)
  54. #define ASN_CONTEXT           (0x80)
  55. #define ASN_PRIVATE           (0xC0)
  56. #define ASN_PRIMITIVE         (0x00)
  57. #define ASN_CONSTRUCTOR       (0x20)
  58.  
  59. /* SNMP ObjectSyntax Values */
  60. #define SNMP_SYNTAX_SEQUENCE  (ASN_UNIVERSAL | ASN_CONSTRUCTOR | 0x10)
  61. /* These values are used in the "syntax" member of the smiVALUE structure which follows */
  62. #define SNMP_SYNTAX_INT       (ASN_UNIVERSAL | ASN_PRIMITIVE | 0x02)
  63. #define SNMP_SYNTAX_BITS      (ASN_UNIVERSAL | ASN_PRIMITIVE | 0x03)
  64. #define SNMP_SYNTAX_OCTETS    (ASN_UNIVERSAL | ASN_PRIMITIVE | 0x04)
  65. #define SNMP_SYNTAX_NULL      (ASN_UNIVERSAL | ASN_PRIMITIVE | 0x05)
  66. #define SNMP_SYNTAX_OID       (ASN_UNIVERSAL | ASN_PRIMITIVE | 0x06)
  67. #define SNMP_SYNTAX_INT32     SNMP_SYNTAX_INT
  68. #define SNMP_SYNTAX_IPADDR    (ASN_APPLICATION | ASN_PRIMITIVE | 0x00)
  69. #define SNMP_SYNTAX_CNTR32    (ASN_APPLICATION | ASN_PRIMITIVE | 0x01)
  70. #define SNMP_SYNTAX_GAUGE32   (ASN_APPLICATION | ASN_PRIMITIVE | 0x02)
  71. #define SNMP_SYNTAX_TIMETICKS (ASN_APPLICATION | ASN_PRIMITIVE | 0x03)
  72. #define SNMP_SYNTAX_OPAQUE    (ASN_APPLICATION | ASN_PRIMITIVE | 0x04)
  73. #define SNMP_SYNTAX_NSAPADDR  (ASN_APPLICATION | ASN_PRIMITIVE | 0x05)
  74. #define SNMP_SYNTAX_CNTR64    (ASN_APPLICATION | ASN_PRIMITIVE | 0x06)
  75. #define SNMP_SYNTAX_UINT32    (ASN_APPLICATION | ASN_PRIMITIVE | 0x07)
  76. /* Exception conditions in response PDUs for SNMPv2 */
  77. #define SNMP_SYNTAX_NOSUCHOBJECT   (ASN_CONTEXT | ASN_PRIMITIVE | 0x00)
  78. #define SNMP_SYNTAX_NOSUCHINSTANCE (ASN_CONTEXT | ASN_PRIMITIVE | 0x01)
  79. #define SNMP_SYNTAX_ENDOFMIBVIEW   (ASN_CONTEXT | ASN_PRIMITIVE | 0x02)
  80.  
  81. typedef struct {              /* smiVALUE portion of VarBind */
  82.      smiUINT32 syntax;        /* Insert SNMP_SYNTAX_<type> */
  83.      union {
  84.      smiINT    sNumber;       /* SNMP_SYNTAX_INT
  85.                                  SNMP_SYNTAX_INT32 */
  86.      smiUINT32 uNumber;       /* SNMP_SYNTAX_UINT32
  87.                                  SNMP_SYNTAX_CNTR32
  88.                                  SNMP_SYNTAX_GAUGE32
  89.                                  SNMP_SYNTAX_TIMETICKS */
  90.      smiCNTR64 hNumber;       /* SNMP_SYNTAX_CNTR64 */
  91.      smiOCTETS string;        /* SNMP_SYNTAX_OCTETS
  92.                                  SNMP_SYNTAX_BITS
  93.                                  SNMP_SYNTAX_OPAQUE
  94.                                  SNMP_SYNTAX_IPADDR
  95.                                  SNMP_SYNTAX_NSAPADDR */
  96.      smiOID    oid;           /* SNMP_SYNTAX_OID */
  97.      smiBYTE   empty;         /* SNMP_SYNTAX_NULL
  98.                                  SNMP_SYNTAX_NOSUCHOBJECT
  99.                                  SNMP_SYNTAX_NOSUCHINSTANCE
  100.                                  SNMP_SYNTAX_ENDOFMIBVIEW */
  101.          }     value;         /* union */
  102.      }         smiVALUE,      FAR *smiLPVALUE;
  103. typedef const  smiVALUE       FAR *smiLPCVALUE;
  104.  
  105. /* SNMP Limits   */
  106. #define MAXOBJIDSIZE     128  /* Max number of components in an OID */
  107. #define MAXOBJIDSTRSIZE  1408 /* Max len of decoded MAXOBJIDSIZE OID */
  108.  
  109. /* PDU Type Values */
  110. #define SNMP_PDU_GET          (ASN_CONTEXT | ASN_CONSTRUCTOR | 0x0)
  111. #define SNMP_PDU_GETNEXT      (ASN_CONTEXT | ASN_CONSTRUCTOR | 0x1)
  112. #define SNMP_PDU_RESPONSE     (ASN_CONTEXT | ASN_CONSTRUCTOR | 0x2)
  113. #define SNMP_PDU_SET          (ASN_CONTEXT | ASN_CONSTRUCTOR | 0x3)
  114. /* SNMP_PDU_V1TRAP is obsolete in SNMPv2 */
  115. #define SNMP_PDU_V1TRAP       (ASN_CONTEXT | ASN_CONSTRUCTOR | 0x4)
  116. #define SNMP_PDU_GETBULK      (ASN_CONTEXT | ASN_CONSTRUCTOR | 0x5)
  117. #define SNMP_PDU_INFORM       (ASN_CONTEXT | ASN_CONSTRUCTOR | 0x6)
  118. #define SNMP_PDU_TRAP         (ASN_CONTEXT | ASN_CONSTRUCTOR | 0x7)
  119.  
  120. /* SNMPv1 Trap Values */
  121. /* (These values might be superfluous wrt WinSNMP applications) */
  122. #define SNMP_TRAP_COLDSTART             0
  123. #define SNMP_TRAP_WARMSTART             1
  124. #define SNMP_TRAP_LINKDOWN              2
  125. #define SNMP_TRAP_LINKUP                3
  126. #define SNMP_TRAP_AUTHFAIL              4
  127. #define SNMP_TRAP_EGPNEIGHBORLOSS       5
  128. #define SNMP_TRAP_ENTERPRISESPECIFIC    6
  129.  
  130. /* SNMP Error Codes Returned in Error_status Field of PDU */
  131. /* (these are NOT WinSNMP API Error Codes */
  132. /* Error Codes Common to SNMPv1 and SNMPv2 */
  133. #define SNMP_ERROR_NOERROR              0
  134. #define SNMP_ERROR_TOOBIG               1
  135. #define SNMP_ERROR_NOSUCHNAME           2
  136. #define SNMP_ERROR_BADVALUE             3
  137. #define SNMP_ERROR_READONLY             4
  138. #define SNMP_ERROR_GENERR               5
  139. /* Error Codes Added for SNMPv2 */
  140. #define SNMP_ERROR_NOACCESS             6
  141. #define SNMP_ERROR_WRONGTYPE            7
  142. #define SNMP_ERROR_WRONGLENGTH          8
  143. #define SNMP_ERROR_WRONGENCODING        9
  144. #define SNMP_ERROR_WRONGVALUE           10
  145. #define SNMP_ERROR_NOCREATION           11
  146. #define SNMP_ERROR_INCONSISTENTVALUE    12
  147. #define SNMP_ERROR_RESOURCEUNAVAILABLE  13
  148. #define SNMP_ERROR_COMMITFAILED         14
  149. #define SNMP_ERROR_UNDOFAILED           15
  150. #define SNMP_ERROR_AUTHORIZATIONERROR   16
  151. #define SNMP_ERROR_NOTWRITABLE          17
  152. #define SNMP_ERROR_INCONSISTENTNAME     18
  153.  
  154. /* WinSNMP API Values */
  155. /* Values used to indicate entity/context translation modes */
  156. #define SNMPAPI_TRANSLATED         0
  157. #define SNMPAPI_UNTRANSLATED_V1    1
  158. #define SNMPAPI_UNTRANSLATED_V2    2
  159.  
  160. /* Values used to indicate "SNMP level" supported by the implementation */
  161. #define SNMPAPI_NO_SUPPORT         0
  162. #define SNMPAPI_V1_SUPPORT         1
  163. #define SNMPAPI_V2_SUPPORT         2
  164. #define SNMPAPI_M2M_SUPPORT        3
  165.  
  166. /* Values used to indicate retransmit mode in the implementation */
  167. #define SNMPAPI_OFF                0    /* Refuse support */
  168. #define SNMPAPI_ON                 1    /* Request support */
  169.  
  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.  
  209. /* WinSNMP API Function Prototypes */
  210. #define IN                              /* Documentation only */
  211. #define OUT                             /* Documentation only */
  212. #define SNMPAPI_CALL     WINAPI         /* FAR PASCAL calling conventions */
  213.  
  214. /* Local Database Functions */
  215.  
  216. SNMPAPI_STATUS SNMPAPI_CALL   SnmpGetTranslateMode
  217.                               (OUT smiLPUINT32 nTranslateMode);
  218.  
  219. SNMPAPI_STATUS SNMPAPI_CALL   SnmpSetTranslateMode
  220.                               (IN smiUINT32 nTranslateMode);
  221.  
  222. SNMPAPI_STATUS SNMPAPI_CALL   SnmpGetRetransmitMode
  223.                               (OUT smiLPUINT32 nRetransmitMode);
  224.  
  225. SNMPAPI_STATUS SNMPAPI_CALL   SnmpSetRetransmitMode
  226.                               (IN smiUINT32 nRetransmitMode);
  227.  
  228. SNMPAPI_STATUS SNMPAPI_CALL   SnmpGetTimeout
  229.                               (IN HSNMP_ENTITY hEntity,
  230.                               OUT smiLPTIMETICKS nPolicyTimeout,
  231.                               OUT smiLPTIMETICKS nActualTimeout);
  232.  
  233. SNMPAPI_STATUS SNMPAPI_CALL   SnmpSetTimeout
  234.                               (IN HSNMP_ENTITY hEntity,
  235.                               IN smiTIMETICKS nPolicyTimeout);
  236.  
  237. SNMPAPI_STATUS SNMPAPI_CALL   SnmpGetRetry
  238.                               (IN HSNMP_ENTITY hEntity,
  239.                               OUT smiLPUINT32 nPolicyRetry,
  240.                               OUT smiLPUINT32 nActualRetry);
  241.  
  242. SNMPAPI_STATUS SNMPAPI_CALL   SnmpSetRetry
  243.                               (IN HSNMP_ENTITY hEntity,
  244.                               IN smiUINT32 nPolicyRetry);
  245.  
  246. /* Communications Functions */
  247.  
  248. SNMPAPI_STATUS SNMPAPI_CALL   SnmpStartup
  249.                               (OUT smiLPUINT32 nMajorVersion,
  250.                               OUT smiLPUINT32 nMinorVersion,
  251.                               OUT smiLPUINT32 nLevel,
  252.                               OUT smiLPUINT32 nTranslateMode,
  253.                               OUT smiLPUINT32 nRetransmitMode);
  254.  
  255. SNMPAPI_STATUS SNMPAPI_CALL   SnmpCleanup
  256.                               (void);
  257.  
  258. HSNMP_SESSION  SNMPAPI_CALL   SnmpOpen
  259.                               (IN HWND hWnd,
  260.                               IN UINT wMsg);
  261.  
  262. SNMPAPI_STATUS SNMPAPI_CALL   SnmpClose
  263.                               (IN HSNMP_SESSION session);
  264.  
  265. SNMPAPI_STATUS SNMPAPI_CALL   SnmpSendMsg
  266.                               (IN HSNMP_SESSION session,
  267.                               IN HSNMP_ENTITY srcEntity,
  268.                               IN HSNMP_ENTITY dstEntity,
  269.                               IN HSNMP_CONTEXT context,
  270.                               IN HSNMP_PDU PDU);
  271.  
  272. SNMPAPI_STATUS SNMPAPI_CALL   SnmpRecvMsg
  273.                               (IN HSNMP_SESSION session,
  274.                               OUT LPHSNMP_ENTITY srcEntity,
  275.                               OUT LPHSNMP_ENTITY dstEntity,
  276.                               OUT LPHSNMP_CONTEXT  context,
  277.                               OUT LPHSNMP_PDU PDU);
  278.  
  279. SNMPAPI_STATUS SNMPAPI_CALL   SnmpRegister
  280.                               (IN HSNMP_SESSION session,
  281.                               IN HSNMP_ENTITY srcEntity,
  282.                               IN HSNMP_ENTITY dstEntity,
  283.                               IN HSNMP_CONTEXT context,
  284.                               IN smiLPCOID notification,
  285.                               IN smiUINT32 state);
  286.  
  287. /* Entity/Context Functions */
  288.  
  289. HSNMP_ENTITY   SNMPAPI_CALL   SnmpStrToEntity
  290.                               (IN HSNMP_SESSION session,
  291.                               IN LPCSTR string);
  292.  
  293. SNMPAPI_STATUS SNMPAPI_CALL   SnmpEntityToStr
  294.                               (IN HSNMP_ENTITY entity,
  295.                               IN smiUINT32 size,
  296.                               OUT LPSTR string);
  297.  
  298. SNMPAPI_STATUS SNMPAPI_CALL   SnmpFreeEntity
  299.                               (IN HSNMP_ENTITY entity);
  300.  
  301. HSNMP_CONTEXT  SNMPAPI_CALL   SnmpStrToContext
  302.                               (IN HSNMP_SESSION session,
  303.                               IN smiLPCOCTETS string);
  304.  
  305. SNMPAPI_STATUS SNMPAPI_CALL   SnmpContextToStr
  306.                               (IN HSNMP_CONTEXT context,
  307.                               OUT smiLPOCTETS string);
  308.  
  309. SNMPAPI_STATUS SNMPAPI_CALL   SnmpFreeContext
  310.                               (IN HSNMP_CONTEXT context);
  311.  
  312. /* PDU Functions */
  313.  
  314. HSNMP_PDU      SNMPAPI_CALL   SnmpCreatePdu
  315.                               (IN HSNMP_SESSION session,
  316.                               IN smiINT PDU_type,
  317.                               IN smiINT32 request_id,
  318.                               IN smiINT error_status,
  319.                               IN smiINT error_index,
  320.                               IN HSNMP_VBL varbindlist);
  321.  
  322. SNMPAPI_STATUS SNMPAPI_CALL   SnmpGetPduData
  323.                               (IN HSNMP_PDU PDU,
  324.                               OUT smiLPINT PDU_type,
  325.                               OUT smiLPINT32 request_id,
  326.                               OUT smiLPINT error_status,
  327.                               OUT smiLPINT error_index,
  328.                               OUT LPHSNMP_VBL varbindlist);
  329.  
  330. SNMPAPI_STATUS SNMPAPI_CALL   SnmpSetPduData
  331.                               (IN HSNMP_PDU PDU,
  332.                               IN const smiINT FAR *PDU_type,
  333.                               IN const smiINT32 FAR *request_id,
  334.                               IN const smiINT FAR *non_repeaters,
  335.                               IN const smiINT FAR *max_repetitions,
  336.                               IN const HSNMP_VBL FAR *varbindlist);
  337.  
  338. HSNMP_PDU      SNMPAPI_CALL   SnmpDuplicatePdu
  339.                               (IN HSNMP_SESSION session,
  340.                               IN HSNMP_PDU PDU);
  341.  
  342. SNMPAPI_STATUS SNMPAPI_CALL   SnmpFreePdu
  343.                               (IN HSNMP_PDU PDU);
  344.  
  345. /* Variable-Binding Functions */
  346.  
  347. HSNMP_VBL      SNMPAPI_CALL   SnmpCreateVbl
  348.                               (IN HSNMP_SESSION session,
  349.                               IN smiLPCOID name,
  350.                               IN smiLPCVALUE value);
  351.  
  352. HSNMP_VBL      SNMPAPI_CALL   SnmpDuplicateVbl
  353.                               (IN HSNMP_SESSION session,
  354.                               IN HSNMP_VBL vbl);
  355.  
  356. SNMPAPI_STATUS SNMPAPI_CALL   SnmpFreeVbl
  357.                               (IN HSNMP_VBL vbl);
  358.  
  359. SNMPAPI_STATUS SNMPAPI_CALL   SnmpCountVbl
  360.                               (IN HSNMP_VBL vbl);
  361.  
  362. SNMPAPI_STATUS SNMPAPI_CALL   SnmpGetVb
  363.                               (IN HSNMP_VBL vbl,
  364.                               IN smiUINT32 index,
  365.                               OUT smiLPOID name,
  366.                               OUT smiLPVALUE value);
  367.  
  368. SNMPAPI_STATUS SNMPAPI_CALL   SnmpSetVb
  369.                               (IN HSNMP_VBL vbl,
  370.                               IN smiUINT32 index,
  371.                               IN smiLPCOID name,
  372.                               IN smiLPCVALUE value);
  373.  
  374. SNMPAPI_STATUS SNMPAPI_CALL   SnmpDeleteVb
  375.                               (IN HSNMP_VBL vbl,
  376.                               IN smiUINT32 index);
  377.  
  378. /* Utility Functions */
  379.  
  380. SNMPAPI_STATUS SNMPAPI_CALL   SnmpGetLastError
  381.                               (IN HSNMP_SESSION session);
  382.  
  383. SNMPAPI_STATUS SNMPAPI_CALL   SnmpStrToOid
  384.                               (IN LPCSTR string,
  385.                               OUT smiLPOID dstOID);
  386.  
  387. SNMPAPI_STATUS SNMPAPI_CALL   SnmpOidToStr
  388.                               (IN smiLPCOID srcOID,
  389.                               IN smiUINT32 size,
  390.                               OUT LPSTR string);
  391.  
  392. SNMPAPI_STATUS SNMPAPI_CALL   SnmpOidCopy
  393.                               (IN smiLPCOID srcOID,
  394.                               OUT smiLPOID dstOID);
  395.  
  396. SNMPAPI_STATUS SNMPAPI_CALL   SnmpOidCompare
  397.                               (IN smiLPCOID xOID,
  398.                               IN smiLPCOID yOID,
  399.                               IN smiUINT32 maxlen,
  400.                               OUT smiLPINT result);
  401.  
  402. SNMPAPI_STATUS SNMPAPI_CALL   SnmpEncodeMsg
  403.                               (IN HSNMP_SESSION session,
  404.                               IN HSNMP_ENTITY srcEntity,
  405.                               IN HSNMP_ENTITY dstEntity,
  406.                               IN HSNMP_CONTEXT context,
  407.                               IN HSNMP_PDU pdu,
  408.                               OUT smiLPOCTETS msgBufDesc);
  409.  
  410. SNMPAPI_STATUS SNMPAPI_CALL   SnmpDecodeMsg
  411.                               (IN HSNMP_SESSION session,
  412.                               OUT LPHSNMP_ENTITY srcEntity,
  413.                               OUT LPHSNMP_ENTITY dstEntity,
  414.                               OUT LPHSNMP_CONTEXT context,
  415.                               OUT LPHSNMP_PDU pdu,
  416.                               IN smiLPCOCTETS msgBufDesc);
  417.  
  418. SNMPAPI_STATUS SNMPAPI_CALL   SnmpFreeDescriptor
  419.                               (IN smiUINT32 syntax,
  420.                               IN smiLPOPAQUE descriptor);
  421.  
  422. #ifdef __cplusplus
  423. }
  424. #endif
  425.  
  426. #endif         /* _INC_WINSNMP */
  427.  
  428.