64 PDU( netsnmp_pdu *p );
67 virtual void free(
void );
80 virtual void clear(
void );
83 virtual bool empty(
void )
const;
91 virtual operator netsnmp_pdu*( void ) {
return pdu; }
100 virtual operator netsnmp_variable_list *( void );
103 virtual netsnmp_variable_list *
operator[](
const size_t idx );
114 virtual size_t size(
void )
const;
EType type
Definition: PDU.hpp:139
All net-snmp includes needed by SNMPpp can be easily included by using net-snmppp.hpp.
virtual netsnmp_variable_list * operator[](const size_t idx)
Get access to a specific varlist for this PDU.
Definition: PDU.cpp:138
SNMPv1+ ???
Definition: PDU.hpp:48
virtual size_t size(void) const
Return the size of the variable list or zero if the PDU is empty.
Definition: PDU.cpp:181
virtual PDU & addNullVars(const SNMPpp::SetOID &s)
Add numerous OIDs to the variable list.
Definition: PDU.cpp:237
virtual bool empty(void) const
Returns TRUE if the PDU or the varlist is NULL.
Definition: PDU.cpp:73
SNMPv2+ ???
Definition: PDU.hpp:54
virtual PDU & setVarlist(Varlist &vl)
Free the existing variable list and use this one instead.
Definition: PDU.cpp:156
virtual void clear(void)
If a net-snmp function has been called which we know has already freed the PDU pointer, call clear() to ensure this C++ wrapper object doesn't keep the pointer to the old memory location.
Definition: PDU.cpp:64
SNMPv2+ traps with replies.
Definition: PDU.hpp:52
EType
When creating a new PDU, the type of PDU (how it will be used) needs to be declared so it can be crea...
Definition: PDU.hpp:41
Wrapper for net-snmp's PDU structures.
Definition: PDU.hpp:34
std::set< OID > SetOID
A std::set of OIDs.
Definition: OID.hpp:317
virtual bool contains(const SNMPpp::OID &o) const
Return TRUE if the variable list contains the given OID.
Definition: PDU.cpp:192
virtual ~PDU(void)
Destructor.
Definition: PDU.cpp:11
SNMPv2+ traps.
Definition: PDU.hpp:53
virtual PDU clone(void) const
Make a copy of this PDU using snmp_clone_pdu().
Definition: PDU.cpp:84
virtual SNMPpp::OID firstOID(void) const
Return the first OID object in the variable list.
Definition: PDU.cpp:204
virtual const SNMPpp::Varlist varlist(void) const
Get access to the varlist for this PDU. This will throw if the PDU is empty.
Definition: PDU.cpp:92
virtual void free(void)
Free up the underlying net-snmp structure using snmp_free_pdu().
Definition: PDU.cpp:52
SNMPv1+ get the OID that comes after the one specified.
Definition: PDU.hpp:47
virtual PDU & addNullVar(const SNMPpp::OID &o)
Add an OID as ASN_NULL to the variable list.
Definition: PDU.cpp:212
netsnmp_pdu * pdu
Definition: PDU.hpp:140
Wrapper for net-snmp's snmp_variable_list pointer.
Definition: Varlist.hpp:22
SNMPv2+ get many OIDs at once.
Definition: PDU.hpp:51
PDU(const EType t)
Create a PDU of the given type.
Definition: PDU.cpp:19
virtual EType getType(void) const
Get the PDU type.
Definition: PDU.hpp:70
SNMPv1+ set the specified OID.
Definition: PDU.hpp:49
Wrapper for net-snmp's OID arrays.
Definition: OID.hpp:26
std::ostream & operator<<(std::ostream &os, const SNMPpp::PDU &pdu)
Can be used to log or display some debugging information on the PDU, including all OIDs contained wit...
Definition: PDU.cpp:287
std::vector< OID > VecOID
A std::vector of OIDs.
Definition: OID.hpp:320
SNMPv1+ get the specified OIDs.
Definition: PDU.hpp:46