Yate
|
00001 // generated on Sep 17, 2010 4:11 PM 00002 00003 #ifndef __YATESNMP_H 00004 #define __YATESNMP_H 00005 00006 #include <yateasn.h> 00007 00008 #ifdef _WINDOWS 00009 00010 #ifdef LIBYSNMP_EXPORTS 00011 #define YSNMP_API __declspec(dllexport) 00012 #else 00013 #ifndef LIBYSNMP_STATIC 00014 #define YSNMP_API __declspec(dllimport) 00015 #endif 00016 #endif 00017 00018 #endif /* _WINDOWS */ 00019 00020 #ifndef YSNMP_API 00021 #define YSNMP_API 00022 #endif 00023 00024 using namespace TelEngine; 00025 00026 namespace Snmp { 00027 00028 class ObjectName; 00029 class ObjectSyntax; 00030 class SimpleSyntax; 00031 class ApplicationSyntax; 00032 class IpAddress; 00033 class Counter32; 00034 class Unsigned32; 00035 class Gauge32; 00036 class TimeTicks; 00037 class Opaque; 00038 class Counter64; 00039 class PDUs; 00040 class GetRequest_PDU; 00041 class GetNextRequest_PDU; 00042 class Response_PDU; 00043 class SetRequest_PDU; 00044 class GetBulkRequest_PDU; 00045 class InformRequest_PDU; 00046 class SNMPv2_Trap_PDU; 00047 class Report_PDU; 00048 class PDU; 00049 class BulkPDU; 00050 class VarBind; 00051 class VarBindList; 00052 00053 class DisplayString; 00054 class PhysAddress; 00055 class MacAddress; 00056 class TruthValue; 00057 class TestAndIncr; 00058 class AutonomousType; 00059 class InstancePointer; 00060 class VariablePointer; 00061 class RowPointer; 00062 class RowStatus; 00063 class TimeStamp; 00064 class TimeInterval; 00065 class DateAndTime; 00066 class StorageType; 00067 class TDomain; 00068 class TAddress; 00069 00070 class SNMPv3Message; 00071 class HeaderData; 00072 class ScopedPduData; 00073 class ScopedPDU; 00074 00075 00076 class Message; 00077 00078 class KeyChange; 00079 class UsmUserEntry; 00080 00081 class SnmpEngineID; 00082 class SnmpSecurityModel; 00083 class SnmpMessageProcessingModel; 00084 class SnmpSecurityLevel; 00085 class SnmpAdminString; 00086 00087 class UsmSecurityParameters; 00088 00089 class SysOREntry; 00090 00091 // defined in SNMPv2-PDU 00092 class YSNMP_API ObjectName : public AsnObject { 00093 YCLASS(ObjectName, AsnObject) 00094 public: 00095 static const int s_type = ASNLib::OBJECT_ID; 00096 ASNObjId m_ObjectName; 00097 ObjectName(); 00098 ObjectName(void* data, int len); 00099 ~ObjectName(); 00100 int decode(DataBlock& data); 00101 int encode(DataBlock& data); 00102 void getParams(NamedList* params); 00103 void setParams(NamedList* params); 00104 }; 00105 00106 // defined in SNMPv2-PDU 00107 class YSNMP_API ObjectSyntax : public AsnObject { 00108 YCLASS(ObjectSyntax, AsnObject) 00109 public: 00110 static const int s_type = ASNLib::CHOICE; 00111 enum ObjectSyntaxType { 00112 SIMPLE, 00113 APPLICATION_WIDE, 00114 }; 00115 int m_choiceType; 00116 SimpleSyntax* m_simple; 00117 ApplicationSyntax* m_application_wide; 00118 00119 ObjectSyntax(); 00120 ObjectSyntax(void* data, int len); 00121 ~ObjectSyntax(); 00122 int decode(DataBlock& data); 00123 int encode(DataBlock& data); 00124 void getParams(NamedList* params); 00125 void setParams(NamedList* params); 00126 }; 00127 00128 // defined in SNMPv2-PDU 00129 class YSNMP_API SimpleSyntax : public AsnObject { 00130 YCLASS(SimpleSyntax, AsnObject) 00131 public: 00132 static const int s_type = ASNLib::CHOICE; 00133 enum SimpleSyntaxType { 00134 INTEGER_VALUE, 00135 STRING_VALUE, 00136 OBJECTID_VALUE, 00137 }; 00138 int m_choiceType; 00139 int32_t m_integer_value; 00140 static const int32_t s_integer_valueMinSize = 0x80000000; 00141 static const int32_t s_integer_valueMaxSize = 0x7fffffff; 00142 00143 static const u_int16_t s_string_valueSizeMinSize = 0x0; 00144 static const u_int16_t s_string_valueSizeMaxSize = 0xffff; 00145 OctetString m_string_value; 00146 00147 ASNObjId m_objectID_value; 00148 00149 SimpleSyntax(); 00150 SimpleSyntax(void* data, int len); 00151 ~SimpleSyntax(); 00152 int decode(DataBlock& data); 00153 int encode(DataBlock& data); 00154 void getParams(NamedList* params); 00155 void setParams(NamedList* params); 00156 }; 00157 00158 // defined in SNMPv2-PDU 00159 class YSNMP_API ApplicationSyntax : public AsnObject { 00160 YCLASS(ApplicationSyntax, AsnObject) 00161 public: 00162 static const int s_type = ASNLib::CHOICE; 00163 enum ApplicationSyntaxType { 00164 IPADDRESS_VALUE, 00165 COUNTER_VALUE, 00166 TIMETICKS_VALUE, 00167 ARBITRARY_VALUE, 00168 BIG_COUNTER_VALUE, 00169 UNSIGNED_INTEGER_VALUE, 00170 }; 00171 int m_choiceType; 00172 IpAddress* m_ipAddress_value; 00173 Counter32* m_counter_value; 00174 TimeTicks* m_timeticks_value; 00175 Opaque* m_arbitrary_value; 00176 Counter64* m_big_counter_value; 00177 Unsigned32* m_unsigned_integer_value; 00178 00179 ApplicationSyntax(); 00180 ApplicationSyntax(void* data, int len); 00181 ~ApplicationSyntax(); 00182 int decode(DataBlock& data); 00183 int encode(DataBlock& data); 00184 void getParams(NamedList* params); 00185 void setParams(NamedList* params); 00186 }; 00187 00188 // defined in SNMPv2-PDU 00189 class YSNMP_API IpAddress : public AsnObject { 00190 YCLASS(IpAddress, AsnObject) 00191 public: 00192 static const int s_type = ASNLib::OCTET_STRING; 00193 static const int tag_IpAddress = 0x40; 00194 static const u_int8_t s_IpAddressSize = 0x4; 00195 OctetString m_IpAddress; 00196 00197 IpAddress(); 00198 IpAddress(void* data, int len); 00199 ~IpAddress(); 00200 int decode(DataBlock& data); 00201 int encode(DataBlock& data); 00202 void getParams(NamedList* params); 00203 void setParams(NamedList* params); 00204 }; 00205 00206 // defined in SNMPv2-PDU 00207 class YSNMP_API Counter32 : public AsnObject { 00208 YCLASS(Counter32, AsnObject) 00209 public: 00210 static const int s_type = ASNLib::INTEGER; 00211 static const int tag_Counter32 = 0x41; 00212 u_int32_t m_Counter32; 00213 static const u_int32_t s_Counter32MinSize = 0x0; 00214 static const u_int32_t s_Counter32MaxSize = 0xffffffff; 00215 00216 Counter32(); 00217 Counter32(void* data, int len); 00218 ~Counter32(); 00219 int decode(DataBlock& data); 00220 int encode(DataBlock& data); 00221 void getParams(NamedList* params); 00222 void setParams(NamedList* params); 00223 }; 00224 00225 // defined in SNMPv2-PDU 00226 class YSNMP_API Unsigned32 : public AsnObject { 00227 YCLASS(Unsigned32, AsnObject) 00228 public: 00229 static const int s_type = ASNLib::INTEGER; 00230 static const int tag_Unsigned32 = 0x42; 00231 u_int32_t m_Unsigned32; 00232 static const u_int32_t s_Unsigned32MinSize = 0x0; 00233 static const u_int32_t s_Unsigned32MaxSize = 0xffffffff; 00234 00235 Unsigned32(); 00236 Unsigned32(void* data, int len); 00237 ~Unsigned32(); 00238 int decode(DataBlock& data); 00239 int encode(DataBlock& data); 00240 void getParams(NamedList* params); 00241 void setParams(NamedList* params); 00242 }; 00243 00244 // defined in SNMPv2-PDU 00245 class YSNMP_API Gauge32 : public AsnObject { 00246 YCLASS(Gauge32, AsnObject) 00247 public: 00248 static const int s_type = ASNLib::DEFINED; 00249 Unsigned32* m_Gauge32; 00250 Gauge32(); 00251 Gauge32(void* data, int len); 00252 ~Gauge32(); 00253 int decode(DataBlock& data); 00254 int encode(DataBlock& data); 00255 void getParams(NamedList* params); 00256 void setParams(NamedList* params); 00257 }; 00258 00259 // defined in SNMPv2-PDU 00260 class YSNMP_API TimeTicks : public AsnObject { 00261 YCLASS(TimeTicks, AsnObject) 00262 public: 00263 static const int s_type = ASNLib::INTEGER; 00264 static const int tag_TimeTicks = 0x43; 00265 u_int32_t m_TimeTicks; 00266 static const u_int32_t s_TimeTicksMinSize = 0x0; 00267 static const u_int32_t s_TimeTicksMaxSize = 0xffffffff; 00268 00269 TimeTicks(); 00270 TimeTicks(void* data, int len); 00271 ~TimeTicks(); 00272 int decode(DataBlock& data); 00273 int encode(DataBlock& data); 00274 void getParams(NamedList* params); 00275 void setParams(NamedList* params); 00276 }; 00277 00278 // defined in SNMPv2-PDU 00279 class YSNMP_API Opaque : public AsnObject { 00280 YCLASS(Opaque, AsnObject) 00281 public: 00282 static const int s_type = ASNLib::OCTET_STRING; 00283 static const int tag_Opaque = 0x44; 00284 OctetString m_Opaque; 00285 00286 Opaque(); 00287 Opaque(void* data, int len); 00288 ~Opaque(); 00289 int decode(DataBlock& data); 00290 int encode(DataBlock& data); 00291 void getParams(NamedList* params); 00292 void setParams(NamedList* params); 00293 }; 00294 00295 // defined in SNMPv2-PDU 00296 class YSNMP_API Counter64 : public AsnObject { 00297 YCLASS(Counter64, AsnObject) 00298 public: 00299 static const int s_type = ASNLib::INTEGER; 00300 static const int tag_Counter64 = 0x46; 00301 u_int64_t m_Counter64; 00302 static const u_int64_t s_Counter64MinSize = 0x0; 00303 static const u_int64_t s_Counter64MaxSize = 0xffffffffffffffffULL; 00304 00305 Counter64(); 00306 Counter64(void* data, int len); 00307 ~Counter64(); 00308 int decode(DataBlock& data); 00309 int encode(DataBlock& data); 00310 void getParams(NamedList* params); 00311 void setParams(NamedList* params); 00312 }; 00313 00314 // defined in SNMPv2-PDU 00315 class YSNMP_API PDUs : public AsnObject { 00316 YCLASS(PDUs, AsnObject) 00317 public: 00318 static const int s_type = ASNLib::CHOICE; 00319 enum PDUsType { 00320 GET_REQUEST, 00321 GET_NEXT_REQUEST, 00322 GET_BULK_REQUEST, 00323 RESPONSE, 00324 SET_REQUEST, 00325 INFORM_REQUEST, 00326 SNMPV2_TRAP, 00327 REPORT, 00328 }; 00329 int m_choiceType; 00330 GetRequest_PDU* m_get_request; 00331 GetNextRequest_PDU* m_get_next_request; 00332 GetBulkRequest_PDU* m_get_bulk_request; 00333 Response_PDU* m_response; 00334 SetRequest_PDU* m_set_request; 00335 InformRequest_PDU* m_inform_request; 00336 SNMPv2_Trap_PDU* m_snmpV2_trap; 00337 Report_PDU* m_report; 00338 00339 PDUs(); 00340 PDUs(void* data, int len); 00341 ~PDUs(); 00342 int decode(DataBlock& data); 00343 int encode(DataBlock& data); 00344 void getParams(NamedList* params); 00345 void setParams(NamedList* params); 00346 }; 00347 00348 // defined in SNMPv2-PDU 00349 class YSNMP_API GetRequest_PDU : public AsnObject { 00350 YCLASS(GetRequest_PDU, AsnObject) 00351 public: 00352 static const int s_type = ASNLib::DEFINED; 00353 static const int tag_GetRequest_PDU = 0xa0; 00354 PDU* m_GetRequest_PDU; 00355 GetRequest_PDU(); 00356 GetRequest_PDU(void* data, int len); 00357 ~GetRequest_PDU(); 00358 int decode(DataBlock& data); 00359 int encode(DataBlock& data); 00360 void getParams(NamedList* params); 00361 void setParams(NamedList* params); 00362 }; 00363 00364 // defined in SNMPv2-PDU 00365 class YSNMP_API GetNextRequest_PDU : public AsnObject { 00366 YCLASS(GetNextRequest_PDU, AsnObject) 00367 public: 00368 static const int s_type = ASNLib::DEFINED; 00369 static const int tag_GetNextRequest_PDU = 0xa1; 00370 PDU* m_GetNextRequest_PDU; 00371 GetNextRequest_PDU(); 00372 GetNextRequest_PDU(void* data, int len); 00373 ~GetNextRequest_PDU(); 00374 int decode(DataBlock& data); 00375 int encode(DataBlock& data); 00376 void getParams(NamedList* params); 00377 void setParams(NamedList* params); 00378 }; 00379 00380 // defined in SNMPv2-PDU 00381 class YSNMP_API Response_PDU : public AsnObject { 00382 YCLASS(Response_PDU, AsnObject) 00383 public: 00384 static const int s_type = ASNLib::DEFINED; 00385 static const int tag_Response_PDU = 0xa2; 00386 PDU* m_Response_PDU; 00387 Response_PDU(); 00388 Response_PDU(void* data, int len); 00389 ~Response_PDU(); 00390 int decode(DataBlock& data); 00391 int encode(DataBlock& data); 00392 void getParams(NamedList* params); 00393 void setParams(NamedList* params); 00394 }; 00395 00396 // defined in SNMPv2-PDU 00397 class YSNMP_API SetRequest_PDU : public AsnObject { 00398 YCLASS(SetRequest_PDU, AsnObject) 00399 public: 00400 static const int s_type = ASNLib::DEFINED; 00401 static const int tag_SetRequest_PDU = 0xa3; 00402 PDU* m_SetRequest_PDU; 00403 SetRequest_PDU(); 00404 SetRequest_PDU(void* data, int len); 00405 ~SetRequest_PDU(); 00406 int decode(DataBlock& data); 00407 int encode(DataBlock& data); 00408 void getParams(NamedList* params); 00409 void setParams(NamedList* params); 00410 }; 00411 00412 // defined in SNMPv2-PDU 00413 class YSNMP_API GetBulkRequest_PDU : public AsnObject { 00414 YCLASS(GetBulkRequest_PDU, AsnObject) 00415 public: 00416 static const int s_type = ASNLib::DEFINED; 00417 static const int tag_GetBulkRequest_PDU = 0xa5; 00418 BulkPDU* m_GetBulkRequest_PDU; 00419 GetBulkRequest_PDU(); 00420 GetBulkRequest_PDU(void* data, int len); 00421 ~GetBulkRequest_PDU(); 00422 int decode(DataBlock& data); 00423 int encode(DataBlock& data); 00424 void getParams(NamedList* params); 00425 void setParams(NamedList* params); 00426 }; 00427 00428 // defined in SNMPv2-PDU 00429 class YSNMP_API InformRequest_PDU : public AsnObject { 00430 YCLASS(InformRequest_PDU, AsnObject) 00431 public: 00432 static const int s_type = ASNLib::DEFINED; 00433 static const int tag_InformRequest_PDU = 0xa6; 00434 PDU* m_InformRequest_PDU; 00435 InformRequest_PDU(); 00436 InformRequest_PDU(void* data, int len); 00437 ~InformRequest_PDU(); 00438 int decode(DataBlock& data); 00439 int encode(DataBlock& data); 00440 void getParams(NamedList* params); 00441 void setParams(NamedList* params); 00442 }; 00443 00444 // defined in SNMPv2-PDU 00445 class YSNMP_API SNMPv2_Trap_PDU : public AsnObject { 00446 YCLASS(SNMPv2_Trap_PDU, AsnObject) 00447 public: 00448 static const int s_type = ASNLib::DEFINED; 00449 static const int tag_SNMPv2_Trap_PDU = 0xa7; 00450 PDU* m_SNMPv2_Trap_PDU; 00451 SNMPv2_Trap_PDU(); 00452 SNMPv2_Trap_PDU(void* data, int len); 00453 ~SNMPv2_Trap_PDU(); 00454 int decode(DataBlock& data); 00455 int encode(DataBlock& data); 00456 void getParams(NamedList* params); 00457 void setParams(NamedList* params); 00458 }; 00459 00460 // defined in SNMPv2-PDU 00461 class YSNMP_API Report_PDU : public AsnObject { 00462 YCLASS(Report_PDU, AsnObject) 00463 public: 00464 static const int s_type = ASNLib::DEFINED; 00465 static const int tag_Report_PDU = 0xa8; 00466 PDU* m_Report_PDU; 00467 Report_PDU(); 00468 Report_PDU(void* data, int len); 00469 ~Report_PDU(); 00470 int decode(DataBlock& data); 00471 int encode(DataBlock& data); 00472 void getParams(NamedList* params); 00473 void setParams(NamedList* params); 00474 }; 00475 00476 // defined in SNMPv2-PDU 00477 class YSNMP_API PDU : public AsnObject { 00478 YCLASS(PDU, AsnObject) 00479 public: 00480 static const int s_type = ASNLib::SEQUENCE; 00481 int32_t m_request_id; 00482 static const int32_t s_request_idMinSize = -0xccd56a0; 00483 static const int32_t s_request_idMaxSize = 0xccd569f; 00484 00485 int32_t m_error_status; 00486 static const int32_t s_noError_error_status = 0x0; 00487 static const int32_t s_tooBig_error_status = 0x1; 00488 static const int32_t s_noSuchName_error_status = 0x2; 00489 static const int32_t s_badValue_error_status = 0x3; 00490 static const int32_t s_readOnly_error_status = 0x4; 00491 static const int32_t s_genErr_error_status = 0x5; 00492 static const int32_t s_noAccess_error_status = 0x6; 00493 static const int32_t s_wrongType_error_status = 0x7; 00494 static const int32_t s_wrongLength_error_status = 0x8; 00495 static const int32_t s_wrongEncoding_error_status = 0x9; 00496 static const int32_t s_wrongValue_error_status = 0xa; 00497 static const int32_t s_noCreation_error_status = 0xb; 00498 static const int32_t s_inconsistentValue_error_status = 0xc; 00499 static const int32_t s_resourceUnavailable_error_status = 0xd; 00500 static const int32_t s_commitFailed_error_status = 0xe; 00501 static const int32_t s_undoFailed_error_status = 0xf; 00502 static const int32_t s_authorizationError_error_status = 0x10; 00503 static const int32_t s_notWritable_error_status = 0x11; 00504 static const int32_t s_inconsistentName_error_status = 0x12; 00505 00506 int32_t m_error_index; 00507 static const int32_t s_error_indexMinSize = 0x0; 00508 static const int32_t s_error_indexMaxSize = 0x7fffffff; 00509 00510 VarBindList* m_variable_bindings; 00511 00512 PDU(); 00513 PDU(void* data, int len); 00514 ~PDU(); 00515 int decode(DataBlock& data); 00516 int encode(DataBlock& data); 00517 void getParams(NamedList* params); 00518 void setParams(NamedList* params); 00519 }; 00520 00521 // defined in SNMPv2-PDU 00522 class YSNMP_API BulkPDU : public AsnObject { 00523 YCLASS(BulkPDU, AsnObject) 00524 public: 00525 static const int s_type = ASNLib::SEQUENCE; 00526 int32_t m_request_id; 00527 static const int32_t s_request_idMinSize = -0xccd56a0; 00528 static const int32_t s_request_idMaxSize = 0xccd569f; 00529 00530 int32_t m_non_repeaters; 00531 static const int32_t s_non_repeatersMinSize = 0x0; 00532 static const int32_t s_non_repeatersMaxSize = 0x7fffffff; 00533 00534 int32_t m_max_repetitions; 00535 static const int32_t s_max_repetitionsMinSize = 0x0; 00536 static const int32_t s_max_repetitionsMaxSize = 0x7fffffff; 00537 00538 VarBindList* m_variable_bindings; 00539 00540 BulkPDU(); 00541 BulkPDU(void* data, int len); 00542 ~BulkPDU(); 00543 int decode(DataBlock& data); 00544 int encode(DataBlock& data); 00545 void getParams(NamedList* params); 00546 void setParams(NamedList* params); 00547 }; 00548 00549 // defined in SNMPv2-PDU 00550 class YSNMP_API VarBind : public AsnObject { 00551 YCLASS(VarBind, AsnObject) 00552 public: 00553 static const int s_type = ASNLib::SEQUENCE; 00554 ObjectName* m_name; 00555 enum AsnChoiceTypeType { 00556 VALUE, 00557 UNSPECIFIED, 00558 NOSUCHOBJECT, 00559 NOSUCHINSTANCE, 00560 ENDOFMIBVIEW, 00561 }; 00562 int m_choiceType; 00563 ObjectSyntax* m_value; 00564 int m_unSpecified; 00565 00566 static const int tag_noSuchObject = 0x80; 00567 int m_noSuchObject; 00568 00569 static const int tag_noSuchInstance = 0x81; 00570 int m_noSuchInstance; 00571 00572 static const int tag_endOfMibView = 0x82; 00573 int m_endOfMibView; 00574 00575 VarBind(); 00576 VarBind(void* data, int len); 00577 ~VarBind(); 00578 int decode(DataBlock& data); 00579 int encode(DataBlock& data); 00580 void getParams(NamedList* params); 00581 void setParams(NamedList* params); 00582 }; 00583 00584 // defined in SNMPv2-PDU 00585 class YSNMP_API VarBindList : public AsnObject { 00586 YCLASS(VarBindList, AsnObject) 00587 public: 00588 static const int s_type = ASNLib::SEQUENCE; 00589 ObjList m_list; 00590 // object list type = VarBind* 00591 00592 VarBindList(); 00593 VarBindList(void* data, int len); 00594 ~VarBindList(); 00595 int decode(DataBlock& data); 00596 int encode(DataBlock& data); 00597 void getParams(NamedList* params); 00598 void setParams(NamedList* params); 00599 }; 00600 00601 // defined in SNMPv2-TC 00602 class YSNMP_API DisplayString : public AsnObject { 00603 YCLASS(DisplayString, AsnObject) 00604 public: 00605 static const int s_type = ASNLib::OCTET_STRING; 00606 static const u_int8_t s_DisplayStringSizeMinSize = 0x0; 00607 static const u_int8_t s_DisplayStringSizeMaxSize = 0xff; 00608 OctetString m_DisplayString; 00609 00610 DisplayString(); 00611 DisplayString(void* data, int len); 00612 ~DisplayString(); 00613 int decode(DataBlock& data); 00614 int encode(DataBlock& data); 00615 void getParams(NamedList* params); 00616 void setParams(NamedList* params); 00617 }; 00618 00619 // defined in SNMPv2-TC 00620 class YSNMP_API PhysAddress : public AsnObject { 00621 YCLASS(PhysAddress, AsnObject) 00622 public: 00623 static const int s_type = ASNLib::OCTET_STRING; 00624 OctetString m_PhysAddress; 00625 00626 PhysAddress(); 00627 PhysAddress(void* data, int len); 00628 ~PhysAddress(); 00629 int decode(DataBlock& data); 00630 int encode(DataBlock& data); 00631 void getParams(NamedList* params); 00632 void setParams(NamedList* params); 00633 }; 00634 00635 // defined in SNMPv2-TC 00636 class YSNMP_API MacAddress : public AsnObject { 00637 YCLASS(MacAddress, AsnObject) 00638 public: 00639 static const int s_type = ASNLib::OCTET_STRING; 00640 static const u_int8_t s_MacAddressSize = 0x6; 00641 OctetString m_MacAddress; 00642 00643 MacAddress(); 00644 MacAddress(void* data, int len); 00645 ~MacAddress(); 00646 int decode(DataBlock& data); 00647 int encode(DataBlock& data); 00648 void getParams(NamedList* params); 00649 void setParams(NamedList* params); 00650 }; 00651 00652 // defined in SNMPv2-TC 00653 class YSNMP_API TruthValue : public AsnObject { 00654 YCLASS(TruthValue, AsnObject) 00655 public: 00656 static const int s_type = ASNLib::INTEGER; 00657 int32_t m_TruthValue; 00658 static const int32_t s_true_TruthValue = 0x1; 00659 static const int32_t s_false_TruthValue = 0x2; 00660 00661 TruthValue(); 00662 TruthValue(void* data, int len); 00663 ~TruthValue(); 00664 int decode(DataBlock& data); 00665 int encode(DataBlock& data); 00666 void getParams(NamedList* params); 00667 void setParams(NamedList* params); 00668 }; 00669 00670 // defined in SNMPv2-TC 00671 class YSNMP_API TestAndIncr : public AsnObject { 00672 YCLASS(TestAndIncr, AsnObject) 00673 public: 00674 static const int s_type = ASNLib::INTEGER; 00675 u_int32_t m_TestAndIncr; 00676 static const u_int32_t s_TestAndIncrMinSize = 0x0; 00677 static const u_int32_t s_TestAndIncrMaxSize = 0x7fffffff; 00678 00679 TestAndIncr(); 00680 TestAndIncr(void* data, int len); 00681 ~TestAndIncr(); 00682 int decode(DataBlock& data); 00683 int encode(DataBlock& data); 00684 void getParams(NamedList* params); 00685 void setParams(NamedList* params); 00686 }; 00687 00688 // defined in SNMPv2-TC 00689 class YSNMP_API AutonomousType : public AsnObject { 00690 YCLASS(AutonomousType, AsnObject) 00691 public: 00692 static const int s_type = ASNLib::OBJECT_ID; 00693 ASNObjId m_AutonomousType; 00694 AutonomousType(); 00695 AutonomousType(void* data, int len); 00696 ~AutonomousType(); 00697 int decode(DataBlock& data); 00698 int encode(DataBlock& data); 00699 void getParams(NamedList* params); 00700 void setParams(NamedList* params); 00701 }; 00702 00703 // defined in SNMPv2-TC 00704 class YSNMP_API InstancePointer : public AsnObject { 00705 YCLASS(InstancePointer, AsnObject) 00706 public: 00707 static const int s_type = ASNLib::OBJECT_ID; 00708 ASNObjId m_InstancePointer; 00709 InstancePointer(); 00710 InstancePointer(void* data, int len); 00711 ~InstancePointer(); 00712 int decode(DataBlock& data); 00713 int encode(DataBlock& data); 00714 void getParams(NamedList* params); 00715 void setParams(NamedList* params); 00716 }; 00717 00718 // defined in SNMPv2-TC 00719 class YSNMP_API VariablePointer : public AsnObject { 00720 YCLASS(VariablePointer, AsnObject) 00721 public: 00722 static const int s_type = ASNLib::OBJECT_ID; 00723 ASNObjId m_VariablePointer; 00724 VariablePointer(); 00725 VariablePointer(void* data, int len); 00726 ~VariablePointer(); 00727 int decode(DataBlock& data); 00728 int encode(DataBlock& data); 00729 void getParams(NamedList* params); 00730 void setParams(NamedList* params); 00731 }; 00732 00733 // defined in SNMPv2-TC 00734 class YSNMP_API RowPointer : public AsnObject { 00735 YCLASS(RowPointer, AsnObject) 00736 public: 00737 static const int s_type = ASNLib::OBJECT_ID; 00738 ASNObjId m_RowPointer; 00739 RowPointer(); 00740 RowPointer(void* data, int len); 00741 ~RowPointer(); 00742 int decode(DataBlock& data); 00743 int encode(DataBlock& data); 00744 void getParams(NamedList* params); 00745 void setParams(NamedList* params); 00746 }; 00747 00748 // defined in SNMPv2-TC 00749 class YSNMP_API RowStatus : public AsnObject { 00750 YCLASS(RowStatus, AsnObject) 00751 public: 00752 static const int s_type = ASNLib::INTEGER; 00753 int32_t m_RowStatus; 00754 static const int32_t s_active_RowStatus = 0x1; 00755 static const int32_t s_notInService_RowStatus = 0x2; 00756 static const int32_t s_notReady_RowStatus = 0x3; 00757 static const int32_t s_createAndGo_RowStatus = 0x4; 00758 static const int32_t s_createAndWait_RowStatus = 0x5; 00759 static const int32_t s_destroy_RowStatus = 0x6; 00760 00761 RowStatus(); 00762 RowStatus(void* data, int len); 00763 ~RowStatus(); 00764 int decode(DataBlock& data); 00765 int encode(DataBlock& data); 00766 void getParams(NamedList* params); 00767 void setParams(NamedList* params); 00768 }; 00769 00770 // defined in SNMPv2-TC 00771 class YSNMP_API TimeStamp : public AsnObject { 00772 YCLASS(TimeStamp, AsnObject) 00773 public: 00774 static const int s_type = ASNLib::DEFINED; 00775 TimeTicks* m_TimeStamp; 00776 TimeStamp(); 00777 TimeStamp(void* data, int len); 00778 ~TimeStamp(); 00779 int decode(DataBlock& data); 00780 int encode(DataBlock& data); 00781 void getParams(NamedList* params); 00782 void setParams(NamedList* params); 00783 }; 00784 00785 // defined in SNMPv2-TC 00786 class YSNMP_API TimeInterval : public AsnObject { 00787 YCLASS(TimeInterval, AsnObject) 00788 public: 00789 static const int s_type = ASNLib::INTEGER; 00790 u_int32_t m_TimeInterval; 00791 static const u_int32_t s_TimeIntervalMinSize = 0x0; 00792 static const u_int32_t s_TimeIntervalMaxSize = 0x7fffffff; 00793 00794 TimeInterval(); 00795 TimeInterval(void* data, int len); 00796 ~TimeInterval(); 00797 int decode(DataBlock& data); 00798 int encode(DataBlock& data); 00799 void getParams(NamedList* params); 00800 void setParams(NamedList* params); 00801 }; 00802 00803 // defined in SNMPv2-TC 00804 class YSNMP_API DateAndTime : public AsnObject { 00805 YCLASS(DateAndTime, AsnObject) 00806 public: 00807 static const int s_type = ASNLib::OCTET_STRING; 00808 static const u_int8_t s_DateAndTimeSize_0 = 0x8; 00809 static const u_int8_t s_DateAndTimeSize_1 = 0xb; 00810 OctetString m_DateAndTime; 00811 00812 DateAndTime(); 00813 DateAndTime(void* data, int len); 00814 ~DateAndTime(); 00815 int decode(DataBlock& data); 00816 int encode(DataBlock& data); 00817 void getParams(NamedList* params); 00818 void setParams(NamedList* params); 00819 }; 00820 00821 // defined in SNMPv2-TC 00822 class YSNMP_API StorageType : public AsnObject { 00823 YCLASS(StorageType, AsnObject) 00824 public: 00825 static const int s_type = ASNLib::INTEGER; 00826 int32_t m_StorageType; 00827 static const int32_t s_other_StorageType = 0x1; 00828 static const int32_t s_volatile_StorageType = 0x2; 00829 static const int32_t s_nonVolatile_StorageType = 0x3; 00830 static const int32_t s_permanent_StorageType = 0x4; 00831 static const int32_t s_readOnly_StorageType = 0x5; 00832 00833 StorageType(); 00834 StorageType(void* data, int len); 00835 ~StorageType(); 00836 int decode(DataBlock& data); 00837 int encode(DataBlock& data); 00838 void getParams(NamedList* params); 00839 void setParams(NamedList* params); 00840 }; 00841 00842 // defined in SNMPv2-TC 00843 class YSNMP_API TDomain : public AsnObject { 00844 YCLASS(TDomain, AsnObject) 00845 public: 00846 static const int s_type = ASNLib::OBJECT_ID; 00847 ASNObjId m_TDomain; 00848 TDomain(); 00849 TDomain(void* data, int len); 00850 ~TDomain(); 00851 int decode(DataBlock& data); 00852 int encode(DataBlock& data); 00853 void getParams(NamedList* params); 00854 void setParams(NamedList* params); 00855 }; 00856 00857 // defined in SNMPv2-TC 00858 class YSNMP_API TAddress : public AsnObject { 00859 YCLASS(TAddress, AsnObject) 00860 public: 00861 static const int s_type = ASNLib::OCTET_STRING; 00862 static const u_int8_t s_TAddressSizeMinSize = 0x1; 00863 static const u_int8_t s_TAddressSizeMaxSize = 0xff; 00864 OctetString m_TAddress; 00865 00866 TAddress(); 00867 TAddress(void* data, int len); 00868 ~TAddress(); 00869 int decode(DataBlock& data); 00870 int encode(DataBlock& data); 00871 void getParams(NamedList* params); 00872 void setParams(NamedList* params); 00873 }; 00874 00875 // defined in SNMPv3MessageSyntax 00876 class YSNMP_API SNMPv3Message : public AsnObject { 00877 YCLASS(SNMPv3Message, AsnObject) 00878 public: 00879 static const int s_type = ASNLib::SEQUENCE; 00880 u_int32_t m_msgVersion; 00881 static const u_int32_t s_msgVersionMinSize = 0x0; 00882 static const u_int32_t s_msgVersionMaxSize = 0x7fffffff; 00883 00884 HeaderData* m_msgGlobalData; 00885 OctetString m_msgSecurityParameters; 00886 00887 ScopedPduData* m_msgData; 00888 00889 SNMPv3Message(); 00890 SNMPv3Message(void* data, int len); 00891 ~SNMPv3Message(); 00892 int decode(DataBlock& data); 00893 int encode(DataBlock& data); 00894 void getParams(NamedList* params); 00895 void setParams(NamedList* params); 00896 }; 00897 00898 // defined in SNMPv3MessageSyntax 00899 class YSNMP_API HeaderData : public AsnObject { 00900 YCLASS(HeaderData, AsnObject) 00901 public: 00902 static const int s_type = ASNLib::SEQUENCE; 00903 u_int32_t m_msgID; 00904 static const u_int32_t s_msgIDMinSize = 0x0; 00905 static const u_int32_t s_msgIDMaxSize = 0x7fffffff; 00906 00907 u_int32_t m_msgMaxSize; 00908 static const u_int32_t s_msgMaxSizeMinSize = 0x1e4; 00909 static const u_int32_t s_msgMaxSizeMaxSize = 0x7fffffff; 00910 00911 static const u_int8_t s_msgFlagsSize = 0x1; 00912 OctetString m_msgFlags; 00913 00914 u_int32_t m_msgSecurityModel; 00915 static const u_int32_t s_msgSecurityModelMinSize = 0x1; 00916 static const u_int32_t s_msgSecurityModelMaxSize = 0x7fffffff; 00917 00918 00919 HeaderData(); 00920 HeaderData(void* data, int len); 00921 ~HeaderData(); 00922 int decode(DataBlock& data); 00923 int encode(DataBlock& data); 00924 void getParams(NamedList* params); 00925 void setParams(NamedList* params); 00926 }; 00927 00928 // defined in SNMPv3MessageSyntax 00929 class YSNMP_API ScopedPduData : public AsnObject { 00930 YCLASS(ScopedPduData, AsnObject) 00931 public: 00932 static const int s_type = ASNLib::CHOICE; 00933 enum ScopedPduDataType { 00934 PLAINTEXT, 00935 ENCRYPTEDPDU, 00936 }; 00937 int m_choiceType; 00938 ScopedPDU* m_plaintext; 00939 OctetString m_encryptedPDU; 00940 00941 00942 ScopedPduData(); 00943 ScopedPduData(void* data, int len); 00944 ~ScopedPduData(); 00945 int decode(DataBlock& data); 00946 int encode(DataBlock& data); 00947 void getParams(NamedList* params); 00948 void setParams(NamedList* params); 00949 }; 00950 00951 // defined in SNMPv3MessageSyntax 00952 class YSNMP_API ScopedPDU : public AsnObject { 00953 YCLASS(ScopedPDU, AsnObject) 00954 public: 00955 static const int s_type = ASNLib::SEQUENCE; 00956 OctetString m_contextEngineID; 00957 00958 OctetString m_contextName; 00959 00960 DataBlock m_data; 00961 00962 ScopedPDU(); 00963 ScopedPDU(void* data, int len); 00964 ~ScopedPDU(); 00965 int decode(DataBlock& data); 00966 int encode(DataBlock& data); 00967 void getParams(NamedList* params); 00968 void setParams(NamedList* params); 00969 }; 00970 00971 // defined in COMMUNITY-BASED-SNMPv2 00972 class YSNMP_API Message : public AsnObject { 00973 YCLASS(Message, AsnObject) 00974 public: 00975 static const int s_type = ASNLib::SEQUENCE; 00976 int32_t m_version; 00977 static const int32_t s_version_1_version = 0x0; 00978 static const int32_t s_version_2_version = 0x1; 00979 00980 OctetString m_community; 00981 00982 DataBlock m_data; 00983 00984 Message(); 00985 Message(void* data, int len); 00986 ~Message(); 00987 int decode(DataBlock& data); 00988 int encode(DataBlock& data); 00989 void getParams(NamedList* params); 00990 void setParams(NamedList* params); 00991 }; 00992 00993 // defined in SNMP-USER-BASED-SM-MIB 00994 class YSNMP_API KeyChange : public AsnObject { 00995 YCLASS(KeyChange, AsnObject) 00996 public: 00997 static const int s_type = ASNLib::OCTET_STRING; 00998 OctetString m_KeyChange; 00999 01000 KeyChange(); 01001 KeyChange(void* data, int len); 01002 ~KeyChange(); 01003 int decode(DataBlock& data); 01004 int encode(DataBlock& data); 01005 void getParams(NamedList* params); 01006 void setParams(NamedList* params); 01007 }; 01008 01009 // defined in SNMP-USER-BASED-SM-MIB 01010 class YSNMP_API UsmUserEntry : public AsnObject { 01011 YCLASS(UsmUserEntry, AsnObject) 01012 public: 01013 static const int s_type = ASNLib::SEQUENCE; 01014 SnmpEngineID* m_usmUserEngineID; 01015 SnmpAdminString* m_usmUserName; 01016 SnmpAdminString* m_usmUserSecurityName; 01017 RowPointer* m_usmUserCloneFrom; 01018 AutonomousType* m_usmUserAuthProtocol; 01019 KeyChange* m_usmUserAuthKeyChange; 01020 KeyChange* m_usmUserOwnAuthKeyChange; 01021 AutonomousType* m_usmUserPrivProtocol; 01022 KeyChange* m_usmUserPrivKeyChange; 01023 KeyChange* m_usmUserOwnPrivKeyChange; 01024 OctetString m_usmUserPublic; 01025 01026 StorageType* m_usmUserStorageType; 01027 RowStatus* m_usmUserStatus; 01028 01029 UsmUserEntry(); 01030 UsmUserEntry(void* data, int len); 01031 ~UsmUserEntry(); 01032 int decode(DataBlock& data); 01033 int encode(DataBlock& data); 01034 void getParams(NamedList* params); 01035 void setParams(NamedList* params); 01036 }; 01037 01038 // defined in SNMP-FRAMEWORK-MIB 01039 class YSNMP_API SnmpEngineID : public AsnObject { 01040 YCLASS(SnmpEngineID, AsnObject) 01041 public: 01042 static const int s_type = ASNLib::OCTET_STRING; 01043 static const u_int8_t s_SnmpEngineIDSizeMinSize = 0x5; 01044 static const u_int8_t s_SnmpEngineIDSizeMaxSize = 0x20; 01045 OctetString m_SnmpEngineID; 01046 01047 SnmpEngineID(); 01048 SnmpEngineID(void* data, int len); 01049 ~SnmpEngineID(); 01050 int decode(DataBlock& data); 01051 int encode(DataBlock& data); 01052 void getParams(NamedList* params); 01053 void setParams(NamedList* params); 01054 }; 01055 01056 // defined in SNMP-FRAMEWORK-MIB 01057 class YSNMP_API SnmpSecurityModel : public AsnObject { 01058 YCLASS(SnmpSecurityModel, AsnObject) 01059 public: 01060 static const int s_type = ASNLib::INTEGER; 01061 u_int32_t m_SnmpSecurityModel; 01062 static const u_int32_t s_SnmpSecurityModelMinSize = 0x0; 01063 static const u_int32_t s_SnmpSecurityModelMaxSize = 0x7fffffff; 01064 01065 SnmpSecurityModel(); 01066 SnmpSecurityModel(void* data, int len); 01067 ~SnmpSecurityModel(); 01068 int decode(DataBlock& data); 01069 int encode(DataBlock& data); 01070 void getParams(NamedList* params); 01071 void setParams(NamedList* params); 01072 }; 01073 01074 // defined in SNMP-FRAMEWORK-MIB 01075 class YSNMP_API SnmpMessageProcessingModel : public AsnObject { 01076 YCLASS(SnmpMessageProcessingModel, AsnObject) 01077 public: 01078 static const int s_type = ASNLib::INTEGER; 01079 u_int32_t m_SnmpMessageProcessingModel; 01080 static const u_int32_t s_SnmpMessageProcessingModelMinSize = 0x0; 01081 static const u_int32_t s_SnmpMessageProcessingModelMaxSize = 0x7fffffff; 01082 01083 SnmpMessageProcessingModel(); 01084 SnmpMessageProcessingModel(void* data, int len); 01085 ~SnmpMessageProcessingModel(); 01086 int decode(DataBlock& data); 01087 int encode(DataBlock& data); 01088 void getParams(NamedList* params); 01089 void setParams(NamedList* params); 01090 }; 01091 01092 // defined in SNMP-FRAMEWORK-MIB 01093 class YSNMP_API SnmpSecurityLevel : public AsnObject { 01094 YCLASS(SnmpSecurityLevel, AsnObject) 01095 public: 01096 static const int s_type = ASNLib::INTEGER; 01097 int32_t m_SnmpSecurityLevel; 01098 static const int32_t s_noAuthNoPriv_SnmpSecurityLevel = 0x1; 01099 static const int32_t s_authNoPriv_SnmpSecurityLevel = 0x2; 01100 static const int32_t s_authPriv_SnmpSecurityLevel = 0x3; 01101 01102 SnmpSecurityLevel(); 01103 SnmpSecurityLevel(void* data, int len); 01104 ~SnmpSecurityLevel(); 01105 int decode(DataBlock& data); 01106 int encode(DataBlock& data); 01107 void getParams(NamedList* params); 01108 void setParams(NamedList* params); 01109 }; 01110 01111 // defined in SNMP-FRAMEWORK-MIB 01112 class YSNMP_API SnmpAdminString : public AsnObject { 01113 YCLASS(SnmpAdminString, AsnObject) 01114 public: 01115 static const int s_type = ASNLib::OCTET_STRING; 01116 static const u_int8_t s_SnmpAdminStringSizeMinSize = 0x0; 01117 static const u_int8_t s_SnmpAdminStringSizeMaxSize = 0xff; 01118 OctetString m_SnmpAdminString; 01119 01120 SnmpAdminString(); 01121 SnmpAdminString(void* data, int len); 01122 ~SnmpAdminString(); 01123 int decode(DataBlock& data); 01124 int encode(DataBlock& data); 01125 void getParams(NamedList* params); 01126 void setParams(NamedList* params); 01127 }; 01128 01129 // defined in USMSecurityParametersSyntax 01130 class YSNMP_API UsmSecurityParameters : public AsnObject { 01131 YCLASS(UsmSecurityParameters, AsnObject) 01132 public: 01133 static const int s_type = ASNLib::SEQUENCE; 01134 OctetString m_msgAuthoritativeEngineID; 01135 01136 u_int32_t m_msgAuthoritativeEngineBoots; 01137 static const u_int32_t s_msgAuthoritativeEngineBootsMinSize = 0x0; 01138 static const u_int32_t s_msgAuthoritativeEngineBootsMaxSize = 0x7fffffff; 01139 01140 u_int32_t m_msgAuthoritativeEngineTime; 01141 static const u_int32_t s_msgAuthoritativeEngineTimeMinSize = 0x0; 01142 static const u_int32_t s_msgAuthoritativeEngineTimeMaxSize = 0x7fffffff; 01143 01144 static const u_int8_t s_msgUserNameSizeMinSize = 0x0; 01145 static const u_int8_t s_msgUserNameSizeMaxSize = 0x20; 01146 OctetString m_msgUserName; 01147 01148 OctetString m_msgAuthenticationParameters; 01149 01150 OctetString m_msgPrivacyParameters; 01151 01152 01153 UsmSecurityParameters(); 01154 UsmSecurityParameters(void* data, int len); 01155 ~UsmSecurityParameters(); 01156 int decode(DataBlock& data); 01157 int encode(DataBlock& data); 01158 void getParams(NamedList* params); 01159 void setParams(NamedList* params); 01160 }; 01161 01162 // defined in SNMPv2-MIB 01163 class YSNMP_API YSNMP_API SysOREntry : public AsnObject { 01164 YCLASS(SysOREntry, AsnObject) 01165 public: 01166 static const int s_type = ASNLib::SEQUENCE; 01167 int32_t m_sysORIndex; 01168 01169 ASNObjId m_sysORID; 01170 DisplayString* m_sysORDescr; 01171 TimeStamp* m_sysORUpTime; 01172 01173 SysOREntry(); 01174 SysOREntry(void* data, int len); 01175 ~SysOREntry(); 01176 int decode(DataBlock& data); 01177 int encode(DataBlock& data); 01178 void getParams(NamedList* params); 01179 void setParams(NamedList* params); 01180 }; 01181 01182 } 01183 01184 #endif /* __YATESNMP_H */