4 // Code automatically generated by asnparse.
16 #include <ptclib/asner.h>
17 #include <ptclib/rfc1155.h>
24 class PSNMP_Message
: public PASN_Sequence
26 #ifndef PASN_LEANANDMEAN
27 PCLASSINFO(PSNMP_Message
, PASN_Sequence
);
30 PSNMP_Message(unsigned tag
= UniversalSequence
, TagClass tagClass
= UniversalTagClass
);
32 PASN_Integer m_version
;
33 PASN_OctetString m_community
;
34 PASN_OctetString m_data
;
36 PINDEX
GetDataLength() const;
37 BOOL
Decode(PASN_Stream
& strm
);
38 void Encode(PASN_Stream
& strm
) const;
39 #ifndef PASN_NOPRINTON
40 void PrintOn(ostream
& strm
) const;
42 Comparison
Compare(const PObject
& obj
) const;
43 PObject
* Clone() const;
51 class PSNMP_GetRequest_PDU
;
52 class PSNMP_GetNextRequest_PDU
;
53 class PSNMP_GetResponse_PDU
;
54 class PSNMP_SetRequest_PDU
;
57 class PSNMP_PDUs
: public PASN_Choice
59 #ifndef PASN_LEANANDMEAN
60 PCLASSINFO(PSNMP_PDUs
, PASN_Choice
);
63 PSNMP_PDUs(unsigned tag
= 0, TagClass tagClass
= UniversalTagClass
);
73 #if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
74 operator PSNMP_GetRequest_PDU
&() const;
76 operator PSNMP_GetRequest_PDU
&();
77 operator const PSNMP_GetRequest_PDU
&() const;
79 #if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
80 operator PSNMP_GetNextRequest_PDU
&() const;
82 operator PSNMP_GetNextRequest_PDU
&();
83 operator const PSNMP_GetNextRequest_PDU
&() const;
85 #if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
86 operator PSNMP_GetResponse_PDU
&() const;
88 operator PSNMP_GetResponse_PDU
&();
89 operator const PSNMP_GetResponse_PDU
&() const;
91 #if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
92 operator PSNMP_SetRequest_PDU
&() const;
94 operator PSNMP_SetRequest_PDU
&();
95 operator const PSNMP_SetRequest_PDU
&() const;
97 #if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
98 operator PSNMP_Trap_PDU
&() const;
100 operator PSNMP_Trap_PDU
&();
101 operator const PSNMP_Trap_PDU
&() const;
105 PObject
* Clone() const;
113 class PSNMP_VarBind
: public PASN_Sequence
115 #ifndef PASN_LEANANDMEAN
116 PCLASSINFO(PSNMP_VarBind
, PASN_Sequence
);
119 PSNMP_VarBind(unsigned tag
= UniversalSequence
, TagClass tagClass
= UniversalTagClass
);
121 PRFC1155_ObjectName m_name
;
122 PRFC1155_ObjectSyntax m_value
;
124 PINDEX
GetDataLength() const;
125 BOOL
Decode(PASN_Stream
& strm
);
126 void Encode(PASN_Stream
& strm
) const;
127 #ifndef PASN_NOPRINTON
128 void PrintOn(ostream
& strm
) const;
130 Comparison
Compare(const PObject
& obj
) const;
131 PObject
* Clone() const;
141 class PSNMP_VarBindList
: public PASN_Array
143 #ifndef PASN_LEANANDMEAN
144 PCLASSINFO(PSNMP_VarBindList
, PASN_Array
);
147 PSNMP_VarBindList(unsigned tag
= UniversalSequence
, TagClass tagClass
= UniversalTagClass
);
149 PASN_Object
* CreateObject() const;
150 PSNMP_VarBind
& operator[](PINDEX i
) const;
151 PObject
* Clone() const;
159 class PSNMP_PDU
: public PASN_Sequence
161 #ifndef PASN_LEANANDMEAN
162 PCLASSINFO(PSNMP_PDU
, PASN_Sequence
);
165 PSNMP_PDU(unsigned tag
= UniversalSequence
, TagClass tagClass
= UniversalTagClass
);
167 PASN_Integer m_request_id
;
168 PASN_Integer m_error_status
;
169 PASN_Integer m_error_index
;
170 PSNMP_VarBindList m_variable_bindings
;
172 PINDEX
GetDataLength() const;
173 BOOL
Decode(PASN_Stream
& strm
);
174 void Encode(PASN_Stream
& strm
) const;
175 #ifndef PASN_NOPRINTON
176 void PrintOn(ostream
& strm
) const;
178 Comparison
Compare(const PObject
& obj
) const;
179 PObject
* Clone() const;
187 class PSNMP_Trap_PDU
: public PASN_Sequence
189 #ifndef PASN_LEANANDMEAN
190 PCLASSINFO(PSNMP_Trap_PDU
, PASN_Sequence
);
193 PSNMP_Trap_PDU(unsigned tag
= 4, TagClass tagClass
= ContextSpecificTagClass
);
195 PASN_ObjectId m_enterprise
;
196 PRFC1155_NetworkAddress m_agent_addr
;
197 PASN_Integer m_generic_trap
;
198 PASN_Integer m_specific_trap
;
199 PRFC1155_TimeTicks m_time_stamp
;
200 PSNMP_VarBindList m_variable_bindings
;
202 PINDEX
GetDataLength() const;
203 BOOL
Decode(PASN_Stream
& strm
);
204 void Encode(PASN_Stream
& strm
) const;
205 #ifndef PASN_NOPRINTON
206 void PrintOn(ostream
& strm
) const;
208 Comparison
Compare(const PObject
& obj
) const;
209 PObject
* Clone() const;
217 class PSNMP_GetRequest_PDU
: public PSNMP_PDU
219 #ifndef PASN_LEANANDMEAN
220 PCLASSINFO(PSNMP_GetRequest_PDU
, PSNMP_PDU
);
223 PSNMP_GetRequest_PDU(unsigned tag
= 0, TagClass tagClass
= ContextSpecificTagClass
);
225 PObject
* Clone() const;
230 // GetNextRequest-PDU
233 class PSNMP_GetNextRequest_PDU
: public PSNMP_PDU
235 #ifndef PASN_LEANANDMEAN
236 PCLASSINFO(PSNMP_GetNextRequest_PDU
, PSNMP_PDU
);
239 PSNMP_GetNextRequest_PDU(unsigned tag
= 1, TagClass tagClass
= ContextSpecificTagClass
);
241 PObject
* Clone() const;
249 class PSNMP_GetResponse_PDU
: public PSNMP_PDU
251 #ifndef PASN_LEANANDMEAN
252 PCLASSINFO(PSNMP_GetResponse_PDU
, PSNMP_PDU
);
255 PSNMP_GetResponse_PDU(unsigned tag
= 2, TagClass tagClass
= ContextSpecificTagClass
);
257 PObject
* Clone() const;
265 class PSNMP_SetRequest_PDU
: public PSNMP_PDU
267 #ifndef PASN_LEANANDMEAN
268 PCLASSINFO(PSNMP_SetRequest_PDU
, PSNMP_PDU
);
271 PSNMP_SetRequest_PDU(unsigned tag
= 3, TagClass tagClass
= ContextSpecificTagClass
);
273 PObject
* Clone() const;
279 #endif // if ! H323_DISABLE_PSNMP