snmp.h
Go to the documentation of this file.
//
// snmp.h
//
// Code automatically generated by asnparse.
//
#ifdef P_SNMP
#ifndef PTLIB_SNMP_H
#define PTLIB_SNMP_H
#ifdef P_USE_PRAGMA
#pragma interface
#endif
#include <ptclib/asner.h>
#include <ptclib/rfc1155.h>
//
// PDUs
//
class PSNMP_GetRequest_PDU;
class PSNMP_GetNextRequest_PDU;
class PSNMP_GetResponse_PDU;
class PSNMP_SetRequest_PDU;
class PSNMP_Trap_PDU;
class PSNMP_PDUs : public PASN_Choice
{
#ifndef PASN_LEANANDMEAN
PCLASSINFO(PSNMP_PDUs, PASN_Choice);
#endif
public:
PSNMP_PDUs(unsigned tag = 0, TagClass tagClass = UniversalTagClass);
enum Choices {
e_get_request,
e_get_next_request,
e_get_response,
e_set_request,
e_trap
};
#if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
operator PSNMP_GetRequest_PDU &() const;
#else
operator PSNMP_GetRequest_PDU &();
operator const PSNMP_GetRequest_PDU &() const;
#endif
#if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
operator PSNMP_GetNextRequest_PDU &() const;
#else
operator PSNMP_GetNextRequest_PDU &();
operator const PSNMP_GetNextRequest_PDU &() const;
#endif
#if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
operator PSNMP_GetResponse_PDU &() const;
#else
operator PSNMP_GetResponse_PDU &();
operator const PSNMP_GetResponse_PDU &() const;
#endif
#if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
operator PSNMP_SetRequest_PDU &() const;
#else
operator PSNMP_SetRequest_PDU &();
operator const PSNMP_SetRequest_PDU &() const;
#endif
#if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
operator PSNMP_Trap_PDU &() const;
#else
operator PSNMP_Trap_PDU &();
operator const PSNMP_Trap_PDU &() const;
#endif
virtual PBoolean Decode(PASN_Stream & strm);
virtual void Encode(PASN_Stream & strm) const;
PBoolean CreateObject();
PObject * Clone() const;
};
//
// VarBind
//
class PSNMP_VarBind : public PASN_Sequence
{
#ifndef PASN_LEANANDMEAN
PCLASSINFO(PSNMP_VarBind, PASN_Sequence);
#endif
public:
PSNMP_VarBind(unsigned tag = UniversalSequence, TagClass tagClass = UniversalTagClass);
PRFC1155_ObjectName m_name;
PRFC1155_ObjectSyntax m_value;
PINDEX GetDataLength() const;
PBoolean Decode(PASN_Stream & strm);
void Encode(PASN_Stream & strm) const;
#ifndef PASN_NOPRINTON
void PrintOn(ostream & strm) const;
#endif
Comparison Compare(const PObject & obj) const;
PObject * Clone() const;
};
//
// VarBindList
//
class PSNMP_VarBind;
class PSNMP_VarBindList : public PASN_Array
{
#ifndef PASN_LEANANDMEAN
PCLASSINFO(PSNMP_VarBindList, PASN_Array);
#endif
public:
PSNMP_VarBindList(unsigned tag = UniversalSequence, TagClass tagClass = UniversalTagClass);
PASN_Object * CreateObject() const;
PSNMP_VarBind & operator[](PINDEX i) const;
PObject * Clone() const;
};
//
// PDU
//
class PSNMP_PDU : public PASN_Sequence
{
#ifndef PASN_LEANANDMEAN
PCLASSINFO(PSNMP_PDU, PASN_Sequence);
#endif
public:
PSNMP_PDU(unsigned tag = UniversalSequence, TagClass tagClass = UniversalTagClass);
PASN_Integer m_request_id;
PASN_Integer m_error_status;
PASN_Integer m_error_index;
PSNMP_VarBindList m_variable_bindings;
PINDEX GetDataLength() const;
PBoolean Decode(PASN_Stream & strm);
void Encode(PASN_Stream & strm) const;
#ifndef PASN_NOPRINTON
void PrintOn(ostream & strm) const;
#endif
Comparison Compare(const PObject & obj) const;
PObject * Clone() const;
};
//
// Trap-PDU
//
class PSNMP_Trap_PDU : public PASN_Sequence
{
#ifndef PASN_LEANANDMEAN
PCLASSINFO(PSNMP_Trap_PDU, PASN_Sequence);
#endif
public:
PSNMP_Trap_PDU(unsigned tag = 4, TagClass tagClass = ContextSpecificTagClass);
PASN_ObjectId m_enterprise;
PRFC1155_NetworkAddress m_agent_addr;
PASN_Integer m_generic_trap;
PASN_Integer m_specific_trap;
PRFC1155_TimeTicks m_time_stamp;
PSNMP_VarBindList m_variable_bindings;
PINDEX GetDataLength() const;
PBoolean Decode(PASN_Stream & strm);
void Encode(PASN_Stream & strm) const;
#ifndef PASN_NOPRINTON
void PrintOn(ostream & strm) const;
#endif
Comparison Compare(const PObject & obj) const;
PObject * Clone() const;
};
//
// GetRequest-PDU
//
class PSNMP_GetRequest_PDU : public PSNMP_PDU
{
#ifndef PASN_LEANANDMEAN
PCLASSINFO(PSNMP_GetRequest_PDU, PSNMP_PDU);
#endif
public:
PSNMP_GetRequest_PDU(unsigned tag = 0, TagClass tagClass = ContextSpecificTagClass);
PObject * Clone() const;
};
//
// GetNextRequest-PDU
//
class PSNMP_GetNextRequest_PDU : public PSNMP_PDU
{
#ifndef PASN_LEANANDMEAN
PCLASSINFO(PSNMP_GetNextRequest_PDU, PSNMP_PDU);
#endif
public:
PSNMP_GetNextRequest_PDU(unsigned tag = 1, TagClass tagClass = ContextSpecificTagClass);
PObject * Clone() const;
};
//
// GetResponse-PDU
//
class PSNMP_GetResponse_PDU : public PSNMP_PDU
{
#ifndef PASN_LEANANDMEAN
PCLASSINFO(PSNMP_GetResponse_PDU, PSNMP_PDU);
#endif
public:
PSNMP_GetResponse_PDU(unsigned tag = 2, TagClass tagClass = ContextSpecificTagClass);
PObject * Clone() const;
};
//
// SetRequest-PDU
//
class PSNMP_SetRequest_PDU : public PSNMP_PDU
{
#ifndef PASN_LEANANDMEAN
PCLASSINFO(PSNMP_SetRequest_PDU, PSNMP_PDU);
#endif
public:
PSNMP_SetRequest_PDU(unsigned tag = 3, TagClass tagClass = ContextSpecificTagClass);
PObject * Clone() const;
};
//
// Message
//
class PSNMP_Message : public PASN_Sequence
{
#ifndef PASN_LEANANDMEAN
PCLASSINFO(PSNMP_Message, PASN_Sequence);
#endif
public:
PSNMP_Message(unsigned tag = UniversalSequence, TagClass tagClass = UniversalTagClass);
PASN_Integer m_version;
PASN_OctetString m_community;
PSNMP_PDUs m_pdu;
PASN_OctetString m_data;
PINDEX GetDataLength() const;
PBoolean Decode(PASN_Stream & strm);
void Encode(PASN_Stream & strm) const;
#ifndef PASN_NOPRINTON
void PrintOn(ostream & strm) const;
#endif
Comparison Compare(const PObject & obj) const;
PObject * Clone() const;
};
#endif // PTLIB_SNMP_H
#endif // if ! H323_DISABLE_PSNMP
// End Of File ///////////////////////////////////////////////////////////////
PSNMP_GetResponse_PDU::Clone
PObject * Clone() const
Create a copy of the class on the heap.
PSNMP_Trap_PDU::m_enterprise
PASN_ObjectId m_enterprise
Definition: snmp.h:171
PSNMP_PDUs::Clone
PObject * Clone() const
Create a copy of the class on the heap.
PSNMP_PDU::Decode
PBoolean Decode(PASN_Stream &strm)
PASN_Object::TagClass
TagClass
Definition: asner.h:76
PSNMP_PDU::Clone
PObject * Clone() const
Create a copy of the class on the heap.
rfc1155.h
PSNMP_Trap_PDU::m_time_stamp
PRFC1155_TimeTicks m_time_stamp
Definition: snmp.h:175
PSNMP_Message
Definition: snmp.h:257
PSNMP_Trap_PDU::Compare
Comparison Compare(const PObject &obj) const
Compare the two objects and return their relative rank.
PSNMP_SetRequest_PDU::Clone
PObject * Clone() const
Create a copy of the class on the heap.
PSNMP_GetRequest_PDU::PSNMP_GetRequest_PDU
PSNMP_GetRequest_PDU(unsigned tag=0, TagClass tagClass=ContextSpecificTagClass)
PSNMP_VarBindList::PSNMP_VarBindList
PSNMP_VarBindList(unsigned tag=UniversalSequence, TagClass tagClass=UniversalTagClass)
PSNMP_Message::Compare
Comparison Compare(const PObject &obj) const
Compare the two objects and return their relative rank.
PRFC1155_TimeTicks
Definition: rfc1155.h:245
PSNMP_GetNextRequest_PDU::Clone
PObject * Clone() const
Create a copy of the class on the heap.
PSNMP_PDUs::e_set_request
Definition: snmp.h:42
PSNMP_PDU::PSNMP_PDU
PSNMP_PDU(unsigned tag=UniversalSequence, TagClass tagClass=UniversalTagClass)
PSNMP_VarBind::PSNMP_VarBind
PSNMP_VarBind(unsigned tag=UniversalSequence, TagClass tagClass=UniversalTagClass)
PSNMP_PDUs::Choices
Choices
Definition: snmp.h:38
PSNMP_PDU::m_variable_bindings
PSNMP_VarBindList m_variable_bindings
Definition: snmp.h:146
PObject::Comparison
Comparison
Result of the comparison operation performed by the Compare() function.
Definition: object.h:1184
PASN_Stream
Base class for ASN decoder/encoder stream.
Definition: asner.h:919
PSNMP_PDU::m_error_status
PASN_Integer m_error_status
Definition: snmp.h:144
PSNMP_VarBindList::Clone
PObject * Clone() const
Create a copy of the class on the heap.
PSNMP_GetResponse_PDU
Definition: snmp.h:225
PSNMP_VarBind::Clone
PObject * Clone() const
Create a copy of the class on the heap.
PASN_Object::ContextSpecificTagClass
Definition: asner.h:79
PSNMP_SetRequest_PDU
Definition: snmp.h:241
PSNMP_PDUs::PSNMP_PDUs
PSNMP_PDUs(unsigned tag=0, TagClass tagClass=UniversalTagClass)
PSNMP_SetRequest_PDU::PSNMP_SetRequest_PDU
PSNMP_SetRequest_PDU(unsigned tag=3, TagClass tagClass=ContextSpecificTagClass)
PASN_Object::UniversalSequence
Definition: asner.h:98
PSNMP_GetNextRequest_PDU::PSNMP_GetNextRequest_PDU
PSNMP_GetNextRequest_PDU(unsigned tag=1, TagClass tagClass=ContextSpecificTagClass)
PSNMP_Trap_PDU::Decode
PBoolean Decode(PASN_Stream &strm)
PSNMP_Message::m_data
PASN_OctetString m_data
Definition: snmp.h:268
PSNMP_Trap_PDU::Clone
PObject * Clone() const
Create a copy of the class on the heap.
PRFC1155_ObjectName
Definition: rfc1155.h:22
PSNMP_Message::Decode
PBoolean Decode(PASN_Stream &strm)
PBoolean
BOOL PBoolean
Definition: object.h:102
PSNMP_GetNextRequest_PDU
Definition: snmp.h:209
PSNMP_PDUs::Decode
virtual PBoolean Decode(PASN_Stream &strm)
PSNMP_VarBind::m_value
PRFC1155_ObjectSyntax m_value
Definition: snmp.h:98
PSNMP_VarBind::Encode
void Encode(PASN_Stream &strm) const
asner.h
PSNMP_Trap_PDU::m_specific_trap
PASN_Integer m_specific_trap
Definition: snmp.h:174
PSNMP_Message::PrintOn
void PrintOn(ostream &strm) const
Output the contents of the object to the stream.
PSNMP_VarBind::Compare
Comparison Compare(const PObject &obj) const
Compare the two objects and return their relative rank.
PSNMP_VarBind::GetDataLength
PINDEX GetDataLength() const
PASN_Sequence
Class for ASN Sequence type.
Definition: asner.h:787
PSNMP_GetRequest_PDU
Definition: snmp.h:193
PSNMP_VarBind::Decode
PBoolean Decode(PASN_Stream &strm)
PSNMP_Message::Encode
void Encode(PASN_Stream &strm) const
PSNMP_Trap_PDU::GetDataLength
PINDEX GetDataLength() const
PSNMP_PDUs::e_get_next_request
Definition: snmp.h:40
PSNMP_Message::GetDataLength
PINDEX GetDataLength() const
PSNMP_PDU::m_error_index
PASN_Integer m_error_index
Definition: snmp.h:145
PSNMP_VarBind
Definition: snmp.h:89
PSNMP_PDU::m_request_id
PASN_Integer m_request_id
Definition: snmp.h:143
PSNMP_VarBind::m_name
PRFC1155_ObjectName m_name
Definition: snmp.h:97
PSNMP_GetResponse_PDU::PSNMP_GetResponse_PDU
PSNMP_GetResponse_PDU(unsigned tag=2, TagClass tagClass=ContextSpecificTagClass)
PSNMP_PDUs::Encode
virtual void Encode(PASN_Stream &strm) const
PSNMP_Message::Clone
PObject * Clone() const
Create a copy of the class on the heap.
PSNMP_PDUs
Definition: snmp.h:30
PSNMP_Trap_PDU::PSNMP_Trap_PDU
PSNMP_Trap_PDU(unsigned tag=4, TagClass tagClass=ContextSpecificTagClass)
PRFC1155_NetworkAddress
Definition: rfc1155.h:158
PSNMP_VarBindList::CreateObject
PASN_Object * CreateObject() const
PSNMP_VarBind::PrintOn
void PrintOn(ostream &strm) const
Output the contents of the object to the stream.
PASN_Object::tag
unsigned tag
ASN object tag.
Definition: asner.h:155
PSNMP_Trap_PDU::m_agent_addr
PRFC1155_NetworkAddress m_agent_addr
Definition: snmp.h:172
PSNMP_Trap_PDU::Encode
void Encode(PASN_Stream &strm) const
PSNMP_PDU::GetDataLength
PINDEX GetDataLength() const
PSNMP_Message::m_community
PASN_OctetString m_community
Definition: snmp.h:266
PSNMP_Message::PSNMP_Message
PSNMP_Message(unsigned tag=UniversalSequence, TagClass tagClass=UniversalTagClass)
PASN_Choice
Class for ASN Choice type.
Definition: asner.h:677
PSNMP_PDU::PrintOn
void PrintOn(ostream &strm) const
Output the contents of the object to the stream.
PSNMP_PDUs::e_get_request
Definition: snmp.h:39
PASN_Object::tagClass
TagClass tagClass
BER tag class.
Definition: asner.h:153
PSNMP_Trap_PDU
Definition: snmp.h:163
PRFC1155_ObjectSyntax
Definition: rfc1155.h:41
PSNMP_PDUs::CreateObject
PBoolean CreateObject()
PSNMP_Message::m_version
PASN_Integer m_version
Definition: snmp.h:265
PASN_OctetString
Class for ASN Octet String type.
Definition: asner.h:458
PASN_Integer
Class for ASN Integer type.
Definition: asner.h:234
PSNMP_VarBindList
Definition: snmp.h:117
PSNMP_PDUs::e_trap
Definition: snmp.h:43
PASN_Object::UniversalTagClass
Definition: asner.h:77
PSNMP_PDU
Definition: snmp.h:135
PSNMP_PDUs::e_get_response
Definition: snmp.h:41
PSNMP_Trap_PDU::m_variable_bindings
PSNMP_VarBindList m_variable_bindings
Definition: snmp.h:176
PSNMP_Trap_PDU::PrintOn
void PrintOn(ostream &strm) const
Output the contents of the object to the stream.
PSNMP_GetRequest_PDU::Clone
PObject * Clone() const
Create a copy of the class on the heap.
PASN_ObjectId
Class for ASN Object Identifier type.
Definition: asner.h:357
PASN_Array
Class for ASN Array type.
Definition: asner.h:880
PObject
Ultimate parent class for all objects in the class library.
Definition: object.h:1118
PSNMP_VarBindList::operator[]
PSNMP_VarBind & operator[](PINDEX i) const
PSNMP_PDU::Compare
Comparison Compare(const PObject &obj) const
Compare the two objects and return their relative rank.
PASN_Object
Base class for ASN encoding/decoding.
Definition: asner.h:59
PSNMP_Message::m_pdu
PSNMP_PDUs m_pdu
Definition: snmp.h:267
PSNMP_Trap_PDU::m_generic_trap
PASN_Integer m_generic_trap
Definition: snmp.h:173
PSNMP_PDU::Encode
void Encode(PASN_Stream &strm) const