56 #ifndef _SNMP_SNMPMSG_H_ 57 #define _SNMP_SNMPMSG_H_ 67 #ifdef SNMP_PP_NAMESPACE 74 #define SNMP_MSG_OID_SYSUPTIME "1.3.6.1.2.1.1.3.0" 75 #define SNMP_MSG_OID_TRAPID "1.3.6.1.6.3.1.1.4.1.0" 90 int load(
const Pdu &pdu,
95 const int security_model);
100 {
return load(pdu, community, version, 0, 0, 0); };
104 int load(
unsigned char *data,
110 int unload(
Pdu &pdu,
115 long int *security_model,
122 {
return unload(pdu, community, version, 0, 0, 0, 0, 0); };
131 {
return load(pdu,
"", version, &engine_id, &sec_name, sec_model); }
133 int unloadv3(
Pdu &pdu,
137 long int &security_model,
147 bool valid()
const {
return valid_flag;};
151 unsigned char *
data() {
return databuff; };
155 unsigned long len()
const {
return bufflen; };
164 #ifdef SNMP_PP_NAMESPACE 168 #endif // _SNMP_SNMPMSG_H_ #define MAX_SNMP_PACKET
The maximum size of a message that can be sent or received.
DLLOPT int convertVbToSmival(const Vb &, SmiVALUE *)
The Vb class is the encapsulation of the SNMP variable binding.
int unload(Pdu &pdu, OctetStr &community, snmp_version &version)
DLLOPT void freeSmivalDescriptor(SmiVALUE *)
int loadv3(const Pdu &pdu, const OctetStr &engine_id, const OctetStr &sec_name, const int sec_model, const snmp_version version)
snmp_version
The SNMP version to use is passed with this enum.
int load(const Pdu &pdu, const OctetStr &community, const snmp_version version)
unsigned long len() const
static bool is_v3_msg(unsigned char *buffer, int length)
Tests if the given buffer contains a SNMPv3-Message.