00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067 #ifndef _SMIDEF
00068 #define _SMIDEF
00069
00070
00071 #include "snmp_pp/config_snmp_pp.h"
00072
00073 #ifdef SNMP_PP_NAMESPACE
00074 namespace Snmp_pp {
00075 #endif
00076
00077 #define WINFAR
00078 #define STRCAT strcat
00079 #define STRLEN strlen
00080 #define MEMCPY memcpy
00081 #define STRCPY strcpy
00082 #define MEMCMP memcmp
00083 #define XPORT
00084
00085
00086
00087
00088
00089 #ifdef WIN32
00090 #ifndef SNMPHANDLE
00091 #define SNMPHANDLE HWND
00092 #endif
00093 #endif
00094
00095
00096 #ifdef __unix
00097 #ifndef SNMPHANDLE
00098 #define SNMPHANDLE unsigned long
00099 #define DLLOPT
00100 #endif
00101 #endif
00102
00103 #ifndef TRUE
00104 #define TRUE 1
00105 #endif
00106
00107 #ifndef FALSE
00108 #define FALSE 0
00109 #endif
00110
00111
00112
00113
00114
00115
00116
00117
00118 #define aSN_UNIVERSAL (0x00)
00119 #define aSN_APPLICATION (0x40)
00120 #define aSN_CONTEXT (0x80)
00121 #define aSN_PRIVATE (0xC0)
00122 #define aSN_PRIMITIVE (0x00)
00123 #define aSN_CONSTRUCTOR (0x20)
00124
00125
00126
00127 #define sNMP_SYNTAX_SEQUENCE (aSN_CONTEXT | aSN_CONSTRUCTOR | 0x10)
00128
00129
00130
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141 #define sNMP_SYNTAX_INT (aSN_UNIVERSAL | aSN_PRIMITIVE | 0x02)
00142 #define sNMP_SYNTAX_BITS (aSN_UNIVERSAL | aSN_PRIMITIVE | 0x03)
00143 #define sNMP_SYNTAX_OCTETS (aSN_UNIVERSAL | aSN_PRIMITIVE | 0x04)
00144 #define sNMP_SYNTAX_NULL (aSN_UNIVERSAL | aSN_PRIMITIVE | 0x05)
00145 #define sNMP_SYNTAX_OID (aSN_UNIVERSAL | aSN_PRIMITIVE | 0x06)
00146 #define sNMP_SYNTAX_INT32 sNMP_SYNTAX_INT
00147 #define sNMP_SYNTAX_IPADDR (aSN_APPLICATION | aSN_PRIMITIVE | 0x00)
00148 #define sNMP_SYNTAX_CNTR32 (aSN_APPLICATION | aSN_PRIMITIVE | 0x01)
00149 #define sNMP_SYNTAX_GAUGE32 (aSN_APPLICATION | aSN_PRIMITIVE | 0x02)
00150 #define sNMP_SYNTAX_TIMETICKS (aSN_APPLICATION | aSN_PRIMITIVE | 0x03)
00151 #define sNMP_SYNTAX_OPAQUE (aSN_APPLICATION | aSN_PRIMITIVE | 0x04)
00152 #define sNMP_SYNTAX_CNTR64 (aSN_APPLICATION | aSN_PRIMITIVE | 0x06)
00153 #define sNMP_SYNTAX_UINT32 sNMP_SYNTAX_GAUGE32
00154
00155
00156
00157
00158
00159
00160
00161 #define sNMP_SYNTAX_NOSUCHOBJECT (aSN_CONTEXT | aSN_PRIMITIVE | 0x00)
00162 #define sNMP_SYNTAX_NOSUCHINSTANCE (aSN_CONTEXT | aSN_PRIMITIVE | 0x01)
00163 #define sNMP_SYNTAX_ENDOFMIBVIEW (aSN_CONTEXT | aSN_PRIMITIVE | 0x02)
00164
00165
00166
00167
00168
00169 #define sNMP_PDU_GET (aSN_CONTEXT | aSN_CONSTRUCTOR | 0x0)
00170 #define sNMP_PDU_GETNEXT (aSN_CONTEXT | aSN_CONSTRUCTOR | 0x1)
00171 #define sNMP_PDU_RESPONSE (aSN_CONTEXT | aSN_CONSTRUCTOR | 0x2)
00172 #define sNMP_PDU_SET (aSN_CONTEXT | aSN_CONSTRUCTOR | 0x3)
00173 #define sNMP_PDU_V1TRAP (aSN_CONTEXT | aSN_CONSTRUCTOR | 0x4)
00174 #define sNMP_PDU_GETBULK (aSN_CONTEXT | aSN_CONSTRUCTOR | 0x5)
00175 #define sNMP_PDU_INFORM (aSN_CONTEXT | aSN_CONSTRUCTOR | 0x6)
00176 #define sNMP_PDU_TRAP (aSN_CONTEXT | aSN_CONSTRUCTOR | 0x7)
00177 #define sNMP_PDU_REPORT (aSN_CONTEXT | aSN_CONSTRUCTOR | 0x8)
00178
00179
00180
00181
00182
00183
00184
00185
00186
00187
00188
00189 typedef unsigned char SmiBYTE, WINFAR *SmiLPBYTE;
00190
00191
00192 typedef long SmiINT, WINFAR *SmiLPINT;
00193
00194
00195 typedef SmiINT SmiINT32, WINFAR *SmiLPINT32;
00196
00197
00198 typedef unsigned long SmiUINT32, WINFAR *SmiLPUINT32;
00199
00200
00201 typedef struct {
00202 SmiUINT32 len;
00203 SmiLPBYTE ptr;} SmiOCTETS, WINFAR *SmiLPOCTETS;
00204
00205
00206 typedef SmiOCTETS SmiBITS, WINFAR *SmiLPBITS;
00207
00208
00209 typedef struct {
00210 SmiUINT32 len;
00211 SmiLPUINT32 ptr;} SmiOID, WINFAR *SmiLPOID;
00212
00213
00214 typedef SmiOCTETS SmiIPADDR, WINFAR *SmiLPIPADDR;
00215
00216
00217 typedef SmiUINT32 SmiCNTR32, WINFAR *SmiLPCNTR32;
00218
00219
00220 typedef SmiUINT32 SmiGAUGE32, WINFAR *SmiLPGAUGE32;
00221
00222
00223 typedef SmiUINT32 SmiTIMETICKS, WINFAR *SmiLPTIMETICKS;
00224
00225
00226 typedef SmiOCTETS SmiOPAQUE, WINFAR *SmiLPOPAQUE;
00227
00228
00229 typedef SmiOCTETS SmiNSAPADDR, WINFAR *SmiLPNSAPADDR;
00230
00231
00232 typedef struct {
00233 SmiUINT32 hipart;
00234 SmiUINT32 lopart;} SmiCNTR64, WINFAR *SmiLPCNTR64;
00235
00236
00237 #ifdef SNMP_PP_NAMESPACE
00238 };
00239 #endif
00240
00241 #endif
00242
00243