home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / vc98 / include / winsnmp.h < prev    next >
C/C++ Source or Header  |  1998-04-25  |  22KB  |  630 lines

  1. /*++
  2.  
  3. Copyright 1992 - 1998 Microsoft Corporation
  4.  
  5. Module Name:
  6.  
  7.     winsnmp.h
  8.  
  9. Abstract:
  10.  
  11.     Definitions for WinSNMP development.
  12.  
  13. --*/
  14.  
  15. #ifndef _INC_WINSNMP  
  16. #define _INC_WINSNMP 
  17.  
  18. ///////////////////////////////////////////////////////////////////////////////
  19. //                                                                           //
  20. // Additional Header Files                                                   //
  21. //                                                                           //
  22. ///////////////////////////////////////////////////////////////////////////////
  23.  
  24. #ifndef _INC_WINDOWS  
  25. #include <windows.h>
  26. #define _INC_WINDOWS  
  27. #endif                
  28.  
  29. #ifdef __cplusplus
  30. extern "C" {
  31. #endif
  32.  
  33. ///////////////////////////////////////////////////////////////////////////////
  34. //                                                                           //
  35. // WinSNMP API Type Definitions                                              //
  36. //                                                                           //
  37. ///////////////////////////////////////////////////////////////////////////////
  38.  
  39. typedef HANDLE              HSNMP_SESSION,  FAR *LPHSNMP_SESSION;
  40. typedef HANDLE              HSNMP_ENTITY,   FAR *LPHSNMP_ENTITY;
  41. typedef HANDLE              HSNMP_CONTEXT,  FAR *LPHSNMP_CONTEXT;
  42. typedef HANDLE              HSNMP_PDU,      FAR *LPHSNMP_PDU;
  43. typedef HANDLE              HSNMP_VBL,      FAR *LPHSNMP_VBL;
  44. typedef unsigned char       smiBYTE,        FAR *smiLPBYTE;
  45. typedef signed long         smiINT,         FAR *smiLPINT;
  46. typedef smiINT              smiINT32,       FAR *smiLPINT32;
  47. typedef unsigned long       smiUINT32,      FAR *smiLPUINT32;
  48. typedef struct {
  49.     smiUINT32 len;
  50.     smiLPBYTE ptr;
  51. }                           smiOCTETS,      FAR *smiLPOCTETS;
  52. typedef const smiOCTETS                     FAR *smiLPCOCTETS;
  53. typedef smiOCTETS           smiBITS,        FAR *smiLPBITS;
  54. typedef struct {
  55.     smiUINT32   len;                        
  56.     smiLPUINT32 ptr;
  57. }                           smiOID,         FAR *smiLPOID;
  58. typedef const smiOID                        FAR *smiLPCOID;
  59. typedef smiOCTETS           smiIPADDR,      FAR *smiLPIPADDR;
  60. typedef smiUINT32           smiCNTR32,      FAR *smiLPCNTR32;
  61. typedef smiUINT32           smiGAUGE32,     FAR *smiLPGAUGE32;
  62. typedef smiUINT32           smiTIMETICKS,   FAR *smiLPTIMETICKS;
  63. typedef smiOCTETS           smiOPAQUE,      FAR *smiLPOPAQUE;
  64. typedef smiOCTETS           smiNSAPADDR,    FAR *smiLPNSAPADDR;
  65. typedef struct {
  66.      smiUINT32 hipart;
  67.      smiUINT32 lopart;
  68. }                           smiCNTR64,      FAR *smiLPCNTR64;
  69.     
  70. typedef struct {       
  71.     smiUINT32 syntax;  
  72.     union {
  73.     smiINT    sNumber;      // SNMP_SYNTAX_INT
  74.                             // SNMP_SYNTAX_INT32 
  75.     smiUINT32 uNumber;      // SNMP_SYNTAX_UINT32
  76.                             // SNMP_SYNTAX_CNTR32
  77.                             // SNMP_SYNTAX_GAUGE32
  78.                             // SNMP_SYNTAX_TIMETICKS
  79.     smiCNTR64 hNumber;      // SNMP_SYNTAX_CNTR64 
  80.     smiOCTETS string;       // SNMP_SYNTAX_OCTETS
  81.                             // SNMP_SYNTAX_BITS
  82.                             // SNMP_SYNTAX_OPAQUE
  83.                             // SNMP_SYNTAX_IPADDR
  84.                             // SNMP_SYNTAX_NSAPADDR
  85.     smiOID    oid;          // SNMP_SYNTAX_OID 
  86.     smiBYTE   empty;        // SNMP_SYNTAX_NULL
  87.                             // SNMP_SYNTAX_NOSUCHOBJECT
  88.                             // SNMP_SYNTAX_NOSUCHINSTANCE
  89.                             // SNMP_SYNTAX_ENDOFMIBVIEW 
  90.     } value;      
  91. }                           smiVALUE,       FAR *smiLPVALUE;
  92. typedef const  smiVALUE                     FAR *smiLPCVALUE;
  93.  
  94. ///////////////////////////////////////////////////////////////////////////////
  95. //                                                                           //
  96. // ASN/BER Base Types                                                        //
  97. //                                                                           //
  98. ///////////////////////////////////////////////////////////////////////////////
  99.  
  100. #define ASN_UNIVERSAL               (0x00)
  101. #define ASN_APPLICATION             (0x40)
  102. #define ASN_CONTEXT                 (0x80)
  103. #define ASN_PRIVATE                 (0xC0)
  104. #define ASN_PRIMITIVE               (0x00)
  105. #define ASN_CONSTRUCTOR             (0x20)
  106.  
  107. ///////////////////////////////////////////////////////////////////////////////
  108. //                                                                           //
  109. // SNMP ObjectSyntax Values                                                  //
  110. //                                                                           //
  111. ///////////////////////////////////////////////////////////////////////////////
  112.                                     
  113. #define SNMP_SYNTAX_INT             (ASN_UNIVERSAL   | ASN_PRIMITIVE   | 0x02)
  114. #define SNMP_SYNTAX_BITS            (ASN_UNIVERSAL   | ASN_PRIMITIVE   | 0x03)
  115. #define SNMP_SYNTAX_OCTETS          (ASN_UNIVERSAL   | ASN_PRIMITIVE   | 0x04)
  116. #define SNMP_SYNTAX_NULL            (ASN_UNIVERSAL   | ASN_PRIMITIVE   | 0x05)
  117. #define SNMP_SYNTAX_OID             (ASN_UNIVERSAL   | ASN_PRIMITIVE   | 0x06)
  118. #define SNMP_SYNTAX_INT32           SNMP_SYNTAX_INT
  119.  
  120. #define SNMP_SYNTAX_SEQUENCE        (ASN_UNIVERSAL   | ASN_CONSTRUCTOR | 0x10)
  121.  
  122. #define SNMP_SYNTAX_IPADDR          (ASN_APPLICATION | ASN_PRIMITIVE   | 0x00)
  123. #define SNMP_SYNTAX_CNTR32          (ASN_APPLICATION | ASN_PRIMITIVE   | 0x01)
  124. #define SNMP_SYNTAX_GAUGE32         (ASN_APPLICATION | ASN_PRIMITIVE   | 0x02)
  125. #define SNMP_SYNTAX_TIMETICKS       (ASN_APPLICATION | ASN_PRIMITIVE   | 0x03)
  126. #define SNMP_SYNTAX_OPAQUE          (ASN_APPLICATION | ASN_PRIMITIVE   | 0x04)
  127. #define SNMP_SYNTAX_NSAPADDR        (ASN_APPLICATION | ASN_PRIMITIVE   | 0x05)
  128. #define SNMP_SYNTAX_CNTR64          (ASN_APPLICATION | ASN_PRIMITIVE   | 0x06)
  129. #define SNMP_SYNTAX_UINT32          (ASN_APPLICATION | ASN_PRIMITIVE   | 0x07)
  130.  
  131. #define SNMP_SYNTAX_NOSUCHOBJECT    (ASN_CONTEXT     | ASN_PRIMITIVE   | 0x00)
  132. #define SNMP_SYNTAX_NOSUCHINSTANCE  (ASN_CONTEXT     | ASN_PRIMITIVE   | 0x01)
  133. #define SNMP_SYNTAX_ENDOFMIBVIEW    (ASN_CONTEXT     | ASN_PRIMITIVE   | 0x02)
  134.  
  135. ///////////////////////////////////////////////////////////////////////////////
  136. //                                                                           //
  137. // SNMP Limits                                                               //
  138. //                                                                           //
  139. ///////////////////////////////////////////////////////////////////////////////
  140.  
  141. #define MAXOBJIDSIZE     128    // Max number of components in an OID   
  142. #define MAXOBJIDSTRSIZE  1408   // Max len of decoded MAXOBJIDSIZE OID   
  143.  
  144. ///////////////////////////////////////////////////////////////////////////////
  145. //                                                                           //
  146. // PDU Type Values                                                           //
  147. //                                                                           //
  148. ///////////////////////////////////////////////////////////////////////////////
  149.                                     
  150. #define SNMP_PDU_GET                (ASN_CONTEXT | ASN_CONSTRUCTOR | 0x0)
  151. #define SNMP_PDU_GETNEXT            (ASN_CONTEXT | ASN_CONSTRUCTOR | 0x1)
  152. #define SNMP_PDU_RESPONSE           (ASN_CONTEXT | ASN_CONSTRUCTOR | 0x2)
  153. #define SNMP_PDU_SET                (ASN_CONTEXT | ASN_CONSTRUCTOR | 0x3)
  154. #define SNMP_PDU_V1TRAP             (ASN_CONTEXT | ASN_CONSTRUCTOR | 0x4)
  155. #define SNMP_PDU_GETBULK            (ASN_CONTEXT | ASN_CONSTRUCTOR | 0x5)
  156. #define SNMP_PDU_INFORM             (ASN_CONTEXT | ASN_CONSTRUCTOR | 0x6)
  157. #define SNMP_PDU_TRAP               (ASN_CONTEXT | ASN_CONSTRUCTOR | 0x7)
  158.  
  159. ///////////////////////////////////////////////////////////////////////////////
  160. //                                                                           //
  161. // SNMPv1 Trap Values                                                        //
  162. //                                                                           //
  163. ///////////////////////////////////////////////////////////////////////////////
  164.                                     
  165. #define SNMP_TRAP_COLDSTART             0
  166. #define SNMP_TRAP_WARMSTART             1
  167. #define SNMP_TRAP_LINKDOWN              2
  168. #define SNMP_TRAP_LINKUP                3
  169. #define SNMP_TRAP_AUTHFAIL              4
  170. #define SNMP_TRAP_EGPNEIGHBORLOSS       5
  171. #define SNMP_TRAP_ENTERPRISESPECIFIC    6
  172.  
  173. ///////////////////////////////////////////////////////////////////////////////
  174. //                                                                           //
  175. // SNMP Error Codes Returned in Error_status Field of PDU                    //
  176. //                                                                           //
  177. ///////////////////////////////////////////////////////////////////////////////
  178.  
  179. #define SNMP_ERROR_NOERROR              0
  180. #define SNMP_ERROR_TOOBIG               1
  181. #define SNMP_ERROR_NOSUCHNAME           2
  182. #define SNMP_ERROR_BADVALUE             3
  183. #define SNMP_ERROR_READONLY             4
  184. #define SNMP_ERROR_GENERR               5
  185. #define SNMP_ERROR_NOACCESS             6
  186. #define SNMP_ERROR_WRONGTYPE            7
  187. #define SNMP_ERROR_WRONGLENGTH          8
  188. #define SNMP_ERROR_WRONGENCODING        9
  189. #define SNMP_ERROR_WRONGVALUE           10
  190. #define SNMP_ERROR_NOCREATION           11
  191. #define SNMP_ERROR_INCONSISTENTVALUE    12
  192. #define SNMP_ERROR_RESOURCEUNAVAILABLE  13
  193. #define SNMP_ERROR_COMMITFAILED         14
  194. #define SNMP_ERROR_UNDOFAILED           15
  195. #define SNMP_ERROR_AUTHORIZATIONERROR   16
  196. #define SNMP_ERROR_NOTWRITABLE          17
  197. #define SNMP_ERROR_INCONSISTENTNAME     18
  198.  
  199. ///////////////////////////////////////////////////////////////////////////////
  200. //                                                                           //
  201. // Values used to indicate entity/context translation modes                  //
  202. //                                                                           //
  203. ///////////////////////////////////////////////////////////////////////////////
  204.  
  205. #define SNMPAPI_TRANSLATED         0
  206. #define SNMPAPI_UNTRANSLATED_V1    1
  207. #define SNMPAPI_UNTRANSLATED_V2    2
  208.  
  209. ///////////////////////////////////////////////////////////////////////////////
  210. //                                                                           //
  211. // Values used to indicate "SNMP level" supported by the implementation      //
  212. //                                                                           //
  213. ///////////////////////////////////////////////////////////////////////////////
  214.  
  215. #define SNMPAPI_NO_SUPPORT         0
  216. #define SNMPAPI_V1_SUPPORT         1
  217. #define SNMPAPI_V2_SUPPORT         2
  218. #define SNMPAPI_M2M_SUPPORT        3
  219.  
  220. ///////////////////////////////////////////////////////////////////////////////
  221. //                                                                           //
  222. // Values used to indicate retransmit mode in the implementation             //
  223. //                                                                           //
  224. ///////////////////////////////////////////////////////////////////////////////
  225.  
  226. #define SNMPAPI_OFF                0    // Refuse support 
  227. #define SNMPAPI_ON                 1    // Request support 
  228.  
  229. ///////////////////////////////////////////////////////////////////////////////
  230. //                                                                           //
  231. // WinSNMP API Function Return Codes                                         //
  232. //                                                                           //
  233. ///////////////////////////////////////////////////////////////////////////////
  234.  
  235. typedef smiUINT32 SNMPAPI_STATUS;       // Used for function ret values 
  236.  
  237. #define SNMPAPI_FAILURE            0    // Generic error code 
  238. #define SNMPAPI_SUCCESS            1    // Generic success code
  239.  
  240. ///////////////////////////////////////////////////////////////////////////////
  241. //                                                                           //
  242. // WinSNMP API Error Codes (for SnmpGetLastError)                            //
  243. //                                                                           //
  244. ///////////////////////////////////////////////////////////////////////////////
  245.  
  246. #define SNMPAPI_ALLOC_ERROR        2    // Error allocating memory 
  247. #define SNMPAPI_CONTEXT_INVALID    3    // Invalid context parameter 
  248. #define SNMPAPI_CONTEXT_UNKNOWN    4    // Unknown context parameter 
  249. #define SNMPAPI_ENTITY_INVALID     5    // Invalid entity parameter 
  250. #define SNMPAPI_ENTITY_UNKNOWN     6    // Unknown entity parameter 
  251. #define SNMPAPI_INDEX_INVALID      7    // Invalid VBL index parameter 
  252. #define SNMPAPI_NOOP               8    // No operation performed 
  253. #define SNMPAPI_OID_INVALID        9    // Invalid OID parameter 
  254. #define SNMPAPI_OPERATION_INVALID  10   // Invalid/unsupported operation 
  255. #define SNMPAPI_OUTPUT_TRUNCATED   11   // Insufficient output buf len 
  256. #define SNMPAPI_PDU_INVALID        12   // Invalid PDU parameter 
  257. #define SNMPAPI_SESSION_INVALID    13   // Invalid session parameter 
  258. #define SNMPAPI_SYNTAX_INVALID     14   // Invalid syntax in smiVALUE 
  259. #define SNMPAPI_VBL_INVALID        15   // Invalid VBL parameter 
  260. #define SNMPAPI_MODE_INVALID       16   // Invalid mode parameter 
  261. #define SNMPAPI_SIZE_INVALID       17   // Invalid size/length parameter 
  262. #define SNMPAPI_NOT_INITIALIZED    18   // SnmpStartup failed/not called 
  263. #define SNMPAPI_MESSAGE_INVALID    19   // Invalid SNMP message format 
  264. #define SNMPAPI_HWND_INVALID       20   // Invalid Window handle 
  265. #define SNMPAPI_OTHER_ERROR        99   // For internal/undefined errors 
  266. #define SNMPAPI_TL_NOT_INITIALIZED 100  // TL not initialized 
  267. #define SNMPAPI_TL_NOT_SUPPORTED   101  // TL does not support protocol 
  268. #define SNMPAPI_TL_NOT_AVAILABLE   102  // Network subsystem has failed 
  269. #define SNMPAPI_TL_RESOURCE_ERROR  103  // TL resource error 
  270. #define SNMPAPI_TL_UNDELIVERABLE   104  // Destination unreachable 
  271. #define SNMPAPI_TL_SRC_INVALID     105  // Source endpoint invalid 
  272. #define SNMPAPI_TL_INVALID_PARAM   106  // Input parameter invalid 
  273. #define SNMPAPI_TL_IN_USE          107  // Source endpoint in use 
  274. #define SNMPAPI_TL_TIMEOUT         108  // No response before timeout 
  275. #define SNMPAPI_TL_PDU_TOO_BIG     109  // PDU too big for send/receive 
  276. #define SNMPAPI_TL_OTHER           199  // Undefined TL error 
  277.  
  278. ///////////////////////////////////////////////////////////////////////////////
  279. //                                                                           //
  280. // WinSNMP API Function Prototypes                                           //
  281. //                                                                           //
  282. ///////////////////////////////////////////////////////////////////////////////
  283.  
  284. #define IN                  
  285. #define OUT                 
  286. #define SNMPAPI_CALL WINAPI 
  287.  
  288. typedef SNMPAPI_STATUS (CALLBACK *SNMPAPI_CALLBACK)(
  289.                             IN HSNMP_SESSION hSession,
  290.                             IN HWND hWnd,
  291.                             IN UINT wMsg,
  292.                             IN WPARAM wParam,
  293.                             IN LPARAM lParam,
  294.                             IN LPVOID lClientpData
  295.                             );
  296.  
  297. SNMPAPI_STATUS 
  298. SNMPAPI_CALL   
  299. SnmpGetTranslateMode(
  300.     OUT smiLPUINT32 nTranslateMode
  301.     );
  302.  
  303. SNMPAPI_STATUS 
  304. SNMPAPI_CALL   
  305. SnmpSetTranslateMode(
  306.     IN smiUINT32 nTranslateMode
  307.     );
  308.  
  309. SNMPAPI_STATUS 
  310. SNMPAPI_CALL   
  311. SnmpGetRetransmitMode(
  312.     OUT smiLPUINT32 nRetransmitMode
  313.     );
  314.  
  315. SNMPAPI_STATUS 
  316. SNMPAPI_CALL   
  317. SnmpSetRetransmitMode(
  318.     IN smiUINT32 nRetransmitMode
  319.     );
  320.  
  321. SNMPAPI_STATUS 
  322. SNMPAPI_CALL   
  323. SnmpGetTimeout(
  324.     IN HSNMP_ENTITY hEntity,
  325.     OUT smiLPTIMETICKS nPolicyTimeout,
  326.     OUT smiLPTIMETICKS nActualTimeout
  327.     );
  328.  
  329. SNMPAPI_STATUS 
  330. SNMPAPI_CALL   
  331. SnmpSetTimeout(
  332.     IN HSNMP_ENTITY hEntity,
  333.     IN smiTIMETICKS nPolicyTimeout
  334.     );
  335.  
  336. SNMPAPI_STATUS 
  337. SNMPAPI_CALL   
  338. SnmpGetRetry(
  339.     IN HSNMP_ENTITY hEntity,
  340.     OUT smiLPUINT32 nPolicyRetry,
  341.     OUT smiLPUINT32 nActualRetry
  342.     );
  343.  
  344. SNMPAPI_STATUS 
  345. SNMPAPI_CALL   
  346. SnmpSetRetry(
  347.     IN HSNMP_ENTITY hEntity,
  348.     IN smiUINT32 nPolicyRetry
  349.     );
  350.  
  351. SNMPAPI_STATUS 
  352. SNMPAPI_CALL   
  353. SnmpStartup(
  354.     OUT smiLPUINT32 nMajorVersion,
  355.     OUT smiLPUINT32 nMinorVersion,
  356.     OUT smiLPUINT32 nLevel,
  357.     OUT smiLPUINT32 nTranslateMode,
  358.     OUT smiLPUINT32 nRetransmitMode
  359.     );
  360.  
  361. SNMPAPI_STATUS 
  362. SNMPAPI_CALL   
  363. SnmpCleanup(
  364.     );
  365.  
  366. HSNMP_SESSION  
  367. SNMPAPI_CALL   
  368. SnmpOpen(
  369.     IN HWND hWnd,
  370.     IN UINT wMsg
  371.     );
  372.  
  373. HSNMP_SESSION  
  374. SNMPAPI_CALL   
  375. SnmpCreateSession(
  376.     IN HWND hWnd,
  377.     IN UINT wMsg,
  378.     IN SNMPAPI_CALLBACK fCallBack,
  379.     IN LPVOID lpClientData
  380.     );
  381.  
  382. SNMPAPI_STATUS 
  383. SNMPAPI_CALL   
  384. SnmpClose(
  385.     IN HSNMP_SESSION session
  386.     );
  387.  
  388. SNMPAPI_STATUS 
  389. SNMPAPI_CALL   
  390. SnmpSendMsg(
  391.     IN HSNMP_SESSION session,
  392.     IN HSNMP_ENTITY srcEntity,
  393.     IN HSNMP_ENTITY dstEntity,
  394.     IN HSNMP_CONTEXT context,
  395.     IN HSNMP_PDU PDU
  396.     );
  397.  
  398. SNMPAPI_STATUS 
  399. SNMPAPI_CALL   
  400. SnmpRecvMsg(
  401.     IN HSNMP_SESSION session,
  402.     OUT LPHSNMP_ENTITY srcEntity,
  403.     OUT LPHSNMP_ENTITY dstEntity,
  404.     OUT LPHSNMP_CONTEXT  context,
  405.     OUT LPHSNMP_PDU PDU
  406.     );
  407.  
  408. SNMPAPI_STATUS 
  409. SNMPAPI_CALL   
  410. SnmpRegister(
  411.     IN HSNMP_SESSION session,
  412.     IN HSNMP_ENTITY srcEntity,
  413.     IN HSNMP_ENTITY dstEntity,
  414.     IN HSNMP_CONTEXT context,
  415.     IN smiLPCOID notification,
  416.     IN smiUINT32 state
  417.     );
  418.  
  419. HSNMP_ENTITY   
  420. SNMPAPI_CALL   
  421. SnmpStrToEntity(
  422.     IN HSNMP_SESSION session,
  423.     IN LPCSTR string
  424.     );
  425.  
  426. SNMPAPI_STATUS 
  427. SNMPAPI_CALL   
  428. SnmpEntityToStr(
  429.     IN HSNMP_ENTITY entity,
  430.     IN smiUINT32 size,
  431.     OUT LPSTR string
  432.     );
  433.  
  434. SNMPAPI_STATUS 
  435. SNMPAPI_CALL   
  436. SnmpFreeEntity(
  437.     IN HSNMP_ENTITY entity
  438.     );
  439.  
  440. HSNMP_CONTEXT  
  441. SNMPAPI_CALL   
  442. SnmpStrToContext(
  443.     IN HSNMP_SESSION session,
  444.     IN smiLPCOCTETS string
  445.     );
  446.  
  447. SNMPAPI_STATUS 
  448. SNMPAPI_CALL   
  449. SnmpContextToStr(
  450.     IN HSNMP_CONTEXT context,
  451.     OUT smiLPOCTETS string
  452.     );
  453.  
  454. SNMPAPI_STATUS 
  455. SNMPAPI_CALL   
  456. SnmpFreeContext(
  457.     IN HSNMP_CONTEXT context
  458.     );
  459.  
  460. HSNMP_PDU      
  461. SNMPAPI_CALL   
  462. SnmpCreatePdu(
  463.     IN HSNMP_SESSION session,
  464.     IN smiINT PDU_type,
  465.     IN smiINT32 request_id,
  466.     IN smiINT error_status,
  467.     IN smiINT error_index,
  468.     IN HSNMP_VBL varbindlist
  469.     );
  470.  
  471. SNMPAPI_STATUS 
  472. SNMPAPI_CALL   
  473. SnmpGetPduData(
  474.     IN HSNMP_PDU PDU,
  475.     OUT smiLPINT PDU_type,
  476.     OUT smiLPINT32 request_id,
  477.     OUT smiLPINT error_status,
  478.     OUT smiLPINT error_index,
  479.     OUT LPHSNMP_VBL varbindlist
  480.     );
  481.  
  482. SNMPAPI_STATUS 
  483. SNMPAPI_CALL   
  484. SnmpSetPduData(
  485.     IN HSNMP_PDU PDU,
  486.     IN const smiINT FAR *PDU_type,
  487.     IN const smiINT32 FAR *request_id,
  488.     IN const smiINT FAR *non_repeaters,
  489.     IN const smiINT FAR *max_repetitions,
  490.     IN const HSNMP_VBL FAR *varbindlist
  491.     );
  492.  
  493. HSNMP_PDU      
  494. SNMPAPI_CALL   
  495. SnmpDuplicatePdu(
  496.     IN HSNMP_SESSION session,
  497.     IN HSNMP_PDU PDU
  498.     );
  499.  
  500. SNMPAPI_STATUS 
  501. SNMPAPI_CALL   
  502. SnmpFreePdu(
  503.     IN HSNMP_PDU PDU
  504.     );
  505.  
  506. HSNMP_VBL      
  507. SNMPAPI_CALL   
  508. SnmpCreateVbl(
  509.     IN HSNMP_SESSION session,
  510.     IN smiLPCOID name,
  511.     IN smiLPCVALUE value
  512.     );
  513.  
  514. HSNMP_VBL      
  515. SNMPAPI_CALL   
  516. SnmpDuplicateVbl(
  517.     IN HSNMP_SESSION session,
  518.     IN HSNMP_VBL vbl
  519.     );
  520.  
  521. SNMPAPI_STATUS 
  522. SNMPAPI_CALL   
  523. SnmpFreeVbl(
  524.     IN HSNMP_VBL vbl
  525.     );
  526.  
  527. SNMPAPI_STATUS 
  528. SNMPAPI_CALL   
  529. SnmpCountVbl(
  530.     IN HSNMP_VBL vbl
  531.     );
  532.  
  533. SNMPAPI_STATUS 
  534. SNMPAPI_CALL   
  535. SnmpGetVb(
  536.     IN HSNMP_VBL vbl,
  537.     IN smiUINT32 index,
  538.     OUT smiLPOID name,
  539.     OUT smiLPVALUE value
  540.     );
  541.  
  542. SNMPAPI_STATUS 
  543. SNMPAPI_CALL   
  544. SnmpSetVb(
  545.     IN HSNMP_VBL vbl,
  546.     IN smiUINT32 index,
  547.     IN smiLPCOID name,
  548.     IN smiLPCVALUE value
  549.     );
  550.  
  551. SNMPAPI_STATUS 
  552. SNMPAPI_CALL   
  553. SnmpDeleteVb(
  554.     IN HSNMP_VBL vbl,
  555.     IN smiUINT32 index
  556.     );
  557.  
  558. SNMPAPI_STATUS 
  559. SNMPAPI_CALL   
  560. SnmpGetLastError(
  561.     IN HSNMP_SESSION session
  562.     );
  563.  
  564. SNMPAPI_STATUS 
  565. SNMPAPI_CALL   
  566. SnmpStrToOid(
  567.     IN LPCSTR string,
  568.     OUT smiLPOID dstOID
  569.     );
  570.  
  571. SNMPAPI_STATUS 
  572. SNMPAPI_CALL   
  573. SnmpOidToStr(
  574.     IN smiLPCOID srcOID,
  575.     IN smiUINT32 size,
  576.     OUT LPSTR string
  577.     );
  578.  
  579. SNMPAPI_STATUS 
  580. SNMPAPI_CALL   
  581. SnmpOidCopy(
  582.     IN smiLPCOID srcOID,
  583.     OUT smiLPOID dstOID
  584.     );
  585.  
  586. SNMPAPI_STATUS 
  587. SNMPAPI_CALL   
  588. SnmpOidCompare(
  589.     IN smiLPCOID xOID,
  590.     IN smiLPCOID yOID,
  591.     IN smiUINT32 maxlen,
  592.     OUT smiLPINT result
  593.     );
  594.  
  595. SNMPAPI_STATUS 
  596. SNMPAPI_CALL   
  597. SnmpEncodeMsg(
  598.     IN HSNMP_SESSION session,
  599.     IN HSNMP_ENTITY srcEntity,
  600.     IN HSNMP_ENTITY dstEntity,
  601.     IN HSNMP_CONTEXT context,
  602.     IN HSNMP_PDU pdu,
  603.     OUT smiLPOCTETS msgBufDesc
  604.     );
  605.  
  606. SNMPAPI_STATUS 
  607. SNMPAPI_CALL   
  608. SnmpDecodeMsg(
  609.     IN HSNMP_SESSION session,
  610.     OUT LPHSNMP_ENTITY srcEntity,
  611.     OUT LPHSNMP_ENTITY dstEntity,
  612.     OUT LPHSNMP_CONTEXT context,
  613.     OUT LPHSNMP_PDU pdu,
  614.     IN smiLPCOCTETS msgBufDesc
  615.     );
  616.  
  617. SNMPAPI_STATUS 
  618. SNMPAPI_CALL   
  619. SnmpFreeDescriptor(
  620.     IN smiUINT32 syntax,
  621.     IN smiLPOPAQUE descriptor
  622.     );
  623.  
  624. #ifdef __cplusplus
  625. }
  626. #endif
  627.  
  628. #endif // _INC_WINSNMP 
  629.  
  630.