34#define WINSNMPAPI WINAPI
41#define MAXOBJIDSIZE 128
42#define MAXOBJIDSTRSIZE 1408
43#define MAXVENDORINFO 32
44#ifndef _SNMP_ASN_DEFINED
45#define _SNMP_ASN_DEFINED
46#define ASN_UNIVERSAL 0x00
47#define ASN_PRIMITIVE 0x00
48#define ASN_CONSTRUCTOR 0x20
49#define ASN_APPLICATION 0x40
50#define ASN_CONTEXT 0x80
51#define ASN_PRIVATE 0xC0
52#define SNMP_PDU_GET (ASN_CONTEXT | ASN_CONSTRUCTOR | 0)
53#define SNMP_PDU_GETNEXT (ASN_CONTEXT | ASN_CONSTRUCTOR | 1)
54#define SNMP_PDU_RESPONSE (ASN_CONTEXT | ASN_CONSTRUCTOR | 2)
55#define SNMP_PDU_SET (ASN_CONTEXT | ASN_CONSTRUCTOR | 3)
56#define SNMP_PDU_GETBULK (ASN_CONTEXT | ASN_CONSTRUCTOR | 4)
57#define SNMP_PDU_V1TRAP (ASN_CONTEXT | ASN_CONSTRUCTOR | 4)
58#define SNMP_PDU_INFORM (ASN_CONTEXT | ASN_CONSTRUCTOR | 6)
59#define SNMP_PDU_TRAP (ASN_CONTEXT | ASN_CONSTRUCTOR | 7)
60#define SNMP_PDU_REPORT (ASN_CONTEXT | ASN_CONSTRUCTOR | 8)
62#define SNMP_SYNTAX_SEQUENCE (ASN_UNIVERSAL | ASN_CONSTRUCTOR | 0x10)
63#define SNMP_SYNTAX_INT (ASN_UNIVERSAL | ASN_PRIMITIVE | 0x02)
64#define SNMP_SYNTAX_BITS (ASN_UNIVERSAL | ASN_PRIMITIVE | 0x03)
65#define SNMP_SYNTAX_OCTETS (ASN_UNIVERSAL | ASN_PRIMITIVE | 0x04)
66#define SNMP_SYNTAX_NULL (ASN_UNIVERSAL | ASN_PRIMITIVE | 0x05)
67#define SNMP_SYNTAX_OID (ASN_UNIVERSAL | ASN_PRIMITIVE | 0x06)
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#define SNMP_SYNTAX_NOSUCHOBJECT (ASN_CONTEXT | ASN_PRIMITIVE | 0x00)
77#define SNMP_SYNTAX_NOSUCHINSTANCE (ASN_CONTEXT | ASN_PRIMITIVE | 0x01)
78#define SNMP_SYNTAX_ENDOFMIBVIEW (ASN_CONTEXT | ASN_PRIMITIVE | 0x02)
79#define SNMP_SYNTAX_INT32 SNMP_SYNTAX_INT
80#define SNMP_TRAP_COLDSTART 0
81#define SNMP_TRAP_WARMSTART 1
82#define SNMP_TRAP_LINKDOWN 2
83#define SNMP_TRAP_LINKUP 3
84#define SNMP_TRAP_AUTHFAIL 4
85#define SNMP_TRAP_EGPNEIGHBORLOSS 5
86#define SNMP_TRAP_ENTERPRISESPECIFIC 6
87#define SNMP_ERROR_NOERROR 0
88#define SNMP_ERROR_TOOBIG 1
89#define SNMP_ERROR_NOSUCHNAME 2
90#define SNMP_ERROR_BADVALUE 3
91#define SNMP_ERROR_READONLY 4
92#define SNMP_ERROR_GENERR 5
93#define SNMP_ERROR_NOACCESS 6
94#define SNMP_ERROR_WRONGTYPE 7
95#define SNMP_ERROR_WRONGLENGTH 8
96#define SNMP_ERROR_WRONGENCODING 9
97#define SNMP_ERROR_WRONGVALUE 10
98#define SNMP_ERROR_NOCREATION 11
99#define SNMP_ERROR_INCONSISTENTVALUE 12
100#define SNMP_ERROR_RESOURCEUNAVAILABLE 13
101#define SNMP_ERROR_COMMITFAILED 14
102#define SNMP_ERROR_UNDOFAILED 15
103#define SNMP_ERROR_AUTHORIZATIONERROR 16
104#define SNMP_ERROR_NOTWRITABLE 17
105#define SNMP_ERROR_INCONSISTENTNAME 18
106#define SNMP_SEC_MODEL_V1 1
107#define SNMP_SEC_MODEL_V2 2
108#define SNMP_SEC_MODEL_USM 3
109#define SNMP_NOAUTH_NOPRIV 0
110#define SNMP_AUTH_NOPRIV 1
111#define SNMP_AUTH_PRIV 3
112#define SNMP_USM_NO_AUTH_PROTOCOL 1
113#define SNMP_USM_HMACMD5_AUTH_PROTOCOL 2
114#define SNMP_USM_HMACSHA_AUTH_PROTOCOL 3
115#define SNMP_USM_NO_PRIV_PROTOCOL 1
116#define SNMP_USM_DES_PRIV_PROTOCOL 2
117#define SNMPAPI_TRANSLATED 0
118#define SNMPAPI_UNTRANSLATED_V1 1
119#define SNMPAPI_UNTRANSLATED_V2 2
120#define SNMPAPI_UNTRANSLATED_V3 3
123#define SNMPAPI_FAILURE 0
124#define SNMPAPI_SUCCESS 1
125#define SNMPAPI_NO_SUPPORT 0
126#define SNMPAPI_V1_SUPPORT 1
127#define SNMPAPI_V2_SUPPORT 2
128#define SNMPAPI_M2M_SUPPORT 3
129#define SNMPAPI_V3_SUPPORT 3
130#define SNMPAPI_ALLOC_ERROR 2
131#define SNMPAPI_CONTEXT_INVALID 3
132#define SNMPAPI_CONTEXT_UNKNOWN 4
133#define SNMPAPI_ENTITY_INVALID 5
134#define SNMPAPI_ENTITY_UNKNOWN 6
135#define SNMPAPI_INDEX_INVALID 7
136#define SNMPAPI_NOOP 8
137#define SNMPAPI_OID_INVALID 9
138#define SNMPAPI_OPERATION_INVALID 10
139#define SNMPAPI_OUTPUT_TRUNCATED 11
140#define SNMPAPI_PDU_INVALID 12
141#define SNMPAPI_SESSION_INVALID 13
142#define SNMPAPI_SYNTAX_INVALID 14
143#define SNMPAPI_VBL_INVALID 15
144#define SNMPAPI_MODE_INVALID 16
145#define SNMPAPI_SIZE_INVALID 17
146#define SNMPAPI_NOT_INITIALIZED 18
147#define SNMPAPI_MESSAGE_INVALID 19
148#define SNMPAPI_HWND_INVALID 20
149#define SNMPAPI_ENGINE_INVALID 30
150#define SNMPAPI_ENGINE_DISCOVERY_FAILED 31
151#define SNMPAPI_OTHER_ERROR 99
152#define SNMPAPI_TL_NOT_INITIALIZED 100
153#define SNMPAPI_TL_NOT_SUPPORTED 101
154#define SNMPAPI_TL_NOT_AVAILABLE 102
155#define SNMPAPI_TL_RESOURCE_ERROR 103
156#define SNMPAPI_TL_UNDELIVERABLE 104
157#define SNMPAPI_TL_SRC_INVALID 105
158#define SNMPAPI_TL_INVALID_PARAM 106
159#define SNMPAPI_TL_IN_USE 107
160#define SNMPAPI_TL_TIMEOUT 108
161#define SNMPAPI_TL_PDU_TOO_BIG 109
162#define SNMPAPI_TL_OTHER 199
163#define SNMPAPI_RPT_INVALIDMSG 200
164#define SNMPAPI_RPT_INASNPARSEERR 201
165#define SNMPAPI_RPT_UNKNOWNSECMODEL 202
166#define SNMPAPI_RPT_UNKNOWNENGINEID 203
167#define SNMPAPI_RPT_UNSUPPSECLEVEL 204
168#define SNMPAPI_RPT_UNKNOWNUSERNAME 205
169#define SNMPAPI_RPT_WRONGDIGEST 206
170#define SNMPAPI_RPT_NOTINTIMEWINDOW 207
171#define SNMPAPI_RPT_DECRYPTIONERROR 208
172#define SNMPAPI_RPT_OTHER 299
smiOCTETS dContextEngineID
smiOCTETS dSecurityAuthKey
smiOCTETS dSecurityPrivKey
smiUINT32 nSecurityPrivProtocol
smiUINT32 nSecurityAuthProtocol
smiUINT32 nNotificationPort
smiUINT32 nRetransmitMode
smiTIMETICKS nActualTimeout
smiTIMETICKS nPolicyTimeout
smiUINT32 vendorEnterprise
SNMPAPI_STATUS WINSNMPAPI SnmpGetTranslateMode(smiLPUINT32)
struct smiOCTETS smiNSAPADDR
SNMPAPI_STATUS WINSNMPAPI SnmpGetRetry(HSNMP_ENTITY, smiLPUINT32, smiLPUINT32)
struct smiOCTETS * smiLPIPADDR
struct smiOCTETS smiOPAQUE
SNMPAPI_STATUS WINSNMPAPI SnmpFreeDescriptor(smiUINT32, smiLPOPAQUE)
SNMPAPI_STATUS WINSNMPAPI SnmpListen(HSNMP_ENTITY, SNMPAPI_STATUS)
SNMPAPI_STATUS WINSNMPAPI SnmpSetRetry(HSNMP_ENTITY, smiUINT32)
SNMPAPI_STATUS WINSNMPAPI SnmpClose(HSNMP_SESSION)
SNMPAPI_STATUS WINSNMPAPI SnmpEntityToStr(HSNMP_ENTITY, smiUINT32, LPSTR)
HSNMP_VBL WINSNMPAPI SnmpDuplicateVbl(HSNMP_SESSION, HSNMP_VBL)
SNMPAPI_STATUS WINSNMPAPI SnmpSetContextInfo(HSNMP_CONTEXT, smiLPCONTEXTINFO)
SNMPAPI_STATUS WINSNMPAPI SnmpGetContextInfo(HSNMP_CONTEXT, smiLPCONTEXTINFO)
SNMPAPI_STATUS WINSNMPAPI SnmpFreeVbl(HSNMP_VBL)
HSNMP_CONTEXT WINSNMPAPI SnmpStrToContext(HSNMP_SESSION, smiLPCOCTETS)
SNMPAPI_STATUS WINSNMPAPI SnmpFreeContextInfo(smiLPCONTEXTINFO)
SNMPAPI_STATUS WINSNMPAPI SnmpOidToStr(smiLPCOID, smiUINT32, LPSTR)
SNMPAPI_STATUS WINSNMPAPI SnmpGetVb(HSNMP_VBL, smiUINT32, smiLPOID, smiLPVALUE)
HSNMP_ENTITY WINSNMPAPI SnmpStrToEntity(HSNMP_SESSION, LPCSTR)
HSNMP_SESSION WINSNMPAPI SnmpCreateSession(HWND, UINT, SNMPAPI_CALLBACK, LPVOID)
HSNMP_PDU WINSNMPAPI SnmpDuplicatePdu(HSNMP_SESSION, HSNMP_PDU)
SNMPAPI_STATUS WINSNMPAPI SnmpSetEntityInfo(HSNMP_ENTITY, smiLPENTITYINFO)
SNMPAPI_STATUS WINSNMPAPI SnmpOidCopy(smiLPCOID, smiLPOID)
struct smiVENDORINFO * smiLPVENDORINFO
SNMPAPI_STATUS WINSNMPAPI SnmpGetTimeout(HSNMP_ENTITY, smiLPTIMETICKS, smiLPTIMETICKS)
SNMPAPI_STATUS WINSNMPAPI SnmpStartup(smiLPUINT32, smiLPUINT32, smiLPUINT32, smiLPUINT32, smiLPUINT32)
struct smiOCTETS * smiLPBITS
HSNMP_CONTEXT WINSNMPAPI SnmpCreateContext(HSNMP_SESSION, smiLPCONTEXTINFO)
SNMPAPI_STATUS WINSNMPAPI SnmpContextToStr(HSNMP_CONTEXT, smiLPOCTETS)
SNMPAPI_STATUS WINSNMPAPI SnmpSetPduData(HSNMP_PDU, const smiINT *, const smiINT32 *, const smiINT *, const smiINT *, const HSNMP_VBL *)
const smiLPVALUE smiLPCVALUE
SNMPAPI_STATUS WINSNMPAPI SnmpCleanup(VOID)
SNMPAPI_STATUS WINSNMPAPI SnmpGetEntityInfo(HSNMP_ENTITY, smiLPENTITYINFO)
SNMPAPI_STATUS WINSNMPAPI SnmpRegister(HSNMP_SESSION, HSNMP_ENTITY, HSNMP_ENTITY, HSNMP_CONTEXT, smiLPCOID, smiUINT32)
SNMPAPI_STATUS WINSNMPAPI SnmpCountVbl(HSNMP_VBL)
SNMPAPI_STATUS WINSNMPAPI SnmpSendMsg(HSNMP_SESSION, HSNMP_ENTITY, HSNMP_ENTITY, HSNMP_CONTEXT, HSNMP_PDU)
smiUINT32 * smiLPTIMETICKS
SNMPAPI_STATUS WINSNMPAPI SnmpStrToOid(LPCSTR, smiLPOID)
SNMPAPI_STATUS WINSNMPAPI SnmpDecodeMsg(HSNMP_SESSION, LPHSNMP_ENTITY, LPHSNMP_ENTITY, LPHSNMP_CONTEXT, LPHSNMP_PDU, smiLPCOCTETS)
SNMPAPI_STATUS WINSNMPAPI SnmpSetTranslateMode(smiUINT32)
struct smiENTITYINFO * smiLPENTITYINFO
HSNMP_SESSION WINSNMPAPI SnmpOpen(HWND, UINT)
SNMPAPI_STATUS WINSNMPAPI SnmpFreeEntityInfo(smiLPENTITYINFO)
struct smiCNTR64 * smiLPCNTR64
SNMPAPI_STATUS WINSNMPAPI SnmpOidCompare(smiLPCOID, smiLPCOID, smiUINT32, smiLPINT)
SNMPAPI_STATUS WINSNMPAPI SnmpCancelMsg(HSNMP_SESSION, smiINT32)
SNMPAPI_STATUS WINSNMPAPI SnmpGetVendorInfo(smiLPVENDORINFO)
SNMPAPI_STATUS WINSNMPAPI SnmpEncodeMsg(HSNMP_SESSION, HSNMP_ENTITY, HSNMP_ENTITY, HSNMP_CONTEXT, HSNMP_PDU, smiLPOCTETS)
struct smiVALUE * smiLPVALUE
SNMPAPI_STATUS WINSNMPAPI SnmpFreeContext(HSNMP_CONTEXT)
SNMPAPI_STATUS WINSNMPAPI SnmpSetTimeout(HSNMP_ENTITY, smiTIMETICKS)
unsigned char * smiLPBYTE
SNMPAPI_STATUS WINSNMPAPI SnmpPasswordToKey(smiLPOCTETS, smiINT32, smiLPOCTETS)
struct smiCONTEXTINFO * smiLPCONTEXTINFO
struct smiOCTETS smiIPADDR
struct smiOCTETS * smiLPNSAPADDR
HSNMP_VBL WINSNMPAPI SnmpCreateVbl(HSNMP_SESSION, smiLPCOID, smiLPCVALUE)
SNMPAPI_STATUS WINSNMPAPI SnmpSetRetransmitMode(smiUINT32)
SNMPAPI_STATUS WINSNMPAPI SnmpGetRetransmitMode(smiLPUINT32)
struct smiOCTETS * smiLPOCTETS
const smiLPOCTETS smiLPCOCTETS
SNMPAPI_STATUS WINSNMPAPI SnmpSetPort(HSNMP_ENTITY, UINT)
HSNMP_PDU WINSNMPAPI SnmpCreatePdu(HSNMP_SESSION, smiINT, smiINT32, smiINT, smiINT, HSNMP_VBL)
SNMPAPI_STATUS(CALLBACK * SNMPAPI_CALLBACK)(HSNMP_SESSION, HWND, UINT, WPARAM, LPARAM, LPVOID)
SNMPAPI_STATUS WINSNMPAPI SnmpGetLastError(HSNMP_SESSION)
SNMPAPI_STATUS WINSNMPAPI SnmpFreeEntity(HSNMP_ENTITY)
struct smiOCTETS * smiLPOPAQUE
SNMPAPI_STATUS WINSNMPAPI SnmpSetVb(HSNMP_VBL, smiUINT32, smiLPCOID, smiLPCVALUE)
SNMPAPI_STATUS WINSNMPAPI SnmpGetPduData(HSNMP_PDU, smiLPINT, smiLPINT32, smiLPINT, smiLPINT, LPHSNMP_VBL)
SNMPAPI_STATUS WINSNMPAPI SnmpDeleteVb(HSNMP_VBL, smiUINT32)
HSNMP_ENTITY WINSNMPAPI SnmpCreateEntity(HSNMP_SESSION, smiLPENTITYINFO)
unsigned int * smiLPUINT32
SNMPAPI_STATUS WINSNMPAPI SnmpFreePdu(HSNMP_PDU)
SNMPAPI_STATUS WINSNMPAPI SnmpRecvMsg(HSNMP_SESSION, LPHSNMP_ENTITY, LPHSNMP_ENTITY, LPHSNMP_CONTEXT, LPHSNMP_PDU)