Classes | |
| class | AbstractVariable |
| Base class for SNMP variables. More... | |
| class | AddAgentCapsPDU |
| Represents an AddAgentCaps-PDU. More... | |
| class | binary |
| A type representing a contigous byte stream. More... | |
| class | CleanupSetPDU |
| Represents an CleanupSet-PDU. More... | |
| class | ClosePDU |
| This class represents a Close-PDU. More... | |
| class | CommitSetPDU |
| Represents an CommitSet-PDU. More... | |
| class | Counter32Variable |
| Represents an Counter32 as described in RFC 2741. More... | |
| class | Counter64Variable |
| Represents an Counter64 as described in RFC 2741. More... | |
| class | disconnected |
| Exception to indicate a disconnected state. More... | |
| class | DisplayStringVariable |
| A DisplayString variable. More... | |
| class | duplicate_registration |
| Exception to indicate that a MIB region was registered twice with the same priority. More... | |
| class | Gauge32Variable |
| Represents a Gauge32 as described in RFC 2741. More... | |
| class | generic_error |
| Exception to indicate that obtaining the value of an SNMP variable failed. More... | |
| class | GetBulkPDU |
| Represents an GetBulk-PDU. More... | |
| class | GetNextPDU |
| Represents an GetNext-PDU. More... | |
| class | GetPDU |
| Represents an Get-PDU. More... | |
| class | IndexAllocatePDU |
| Represents a IndexAllocate-PDU. More... | |
| class | IndexDeallocatePDU |
| Represents a IndexDeallocate-PDU. More... | |
| class | IntegerVariable |
| This class represents an Integer variable as described in RFC 2741. More... | |
| class | internal_error |
| Exception to indicate an internal error. More... | |
| class | inval_param |
| Exception for invalid parameter. More... | |
| class | IpAddressVariable |
| Represents an IP address as described in RFC 2741, section 5.4. More... | |
| class | master_is_unable |
| Exception to indicate that the master agent was unable to process a request. More... | |
| class | master_is_unwilling |
| Exception to indicate that the master agent was not willing to process a request. More... | |
| class | MasterProxy |
| This class represents the master agent in a subagent program. More... | |
| class | network_error |
| Exception to indicate a network error. More... | |
| class | NotifyPDU |
| Represents an Notify-PDU. More... | |
| class | OctetStringVariable |
| Represents an OctetSting as described in RFC 2741. More... | |
| class | Oid |
| Represents an SNMP object identifier (OID). More... | |
| class | OidVariable |
| Represents an SNMP OBJECT-IDENTENTIFIER variable. More... | |
| class | OpaqueVariable |
| Represents an Opaque object as described in RFC 2741, section 5.4. More... | |
| class | OpenPDU |
| Represents an Open-PDU. More... | |
| class | parse_error |
| Exception for parse errors. More... | |
| class | PDU |
| The base class of all PDU's. More... | |
| class | PDUwithContext |
| class | PingPDU |
| Represents a Ping-PDU. More... | |
| class | RegisterPDU |
| This class represents a Register-PDU. More... | |
| class | RemoveAgentCapsPDU |
| Represents an RemoveAgentCaps-PDU. More... | |
| class | ResponsePDU |
| Represents an Response-PDU. More... | |
| class | Table |
| Manage an SNMP table. More... | |
| class | TableEntry |
| Base class for table entries. More... | |
| class | TestSetPDU |
| Represents an TestSet-PDU. More... | |
| class | timeout_error |
| Exception to indicate a timeout. More... | |
| class | TimeTicksVariable |
| Represents a TimeTicks as described in RFC 2741. More... | |
| class | UndoSetPDU |
| Represents an UndoSet-PDU. More... | |
| class | UnixDomainConnector |
| Connect to a unix domain socket. More... | |
| class | unknown_registration |
| Exception to indicate that a MIB region registration was not found. More... | |
| class | UnregisterPDU |
| This class represents an Unregister-PDU. More... | |
| class | unsupported_context |
| Exception to indicate that the master agent does not support the context. More... | |
| class | Varbind |
| Represents a VarBind according to RFC 2741, section 5.4. More... | |
| class | version_error |
| Exception for reception of PDU with invalid version number. More... | |
Enumerations | |
| enum | generic_trap_t { coldStart =0, warmStart =1, linkDown =2, linkUp =3, authenticationFailure =4, egpNeighborLoss =5, enterpriseSpecific =6 } |
| The allowed values for specific-trap (SNMPv1 trap). More... | |
Functions | |
| std::ostream & | operator<< (std::ostream &out, const binary &data) |
| Output operator for binary. More... | |
| TimeTicksVariable | processUpTime () |
| Calculate the uptime of the current process. More... | |
| Oid | generate_v1_snmpTrapOID (generic_trap_t generic_trap, quint32 specific_trap=0) |
| Create snmpTrapOID.0 value from SNMPv1 trap data. More... | |
| std::ostream & | operator<< (std::ostream &out, const agentxcpp::Oid &o) |
| The output operator for the Oid class. More... | |
| quint64 | read64 (binary::const_iterator &pos, bool big_endian) |
| void | write64 (binary &serialized, quint64 value) |
| Write a 64-bit value into a string. More... | |
| quint32 | read32 (binary::const_iterator &pos, bool big_endian) |
| void | write32 (binary &serialized, quint32 value) |
| Write a 32-bit value into a string. More... | |
| quint16 | read16 (binary::const_iterator &pos, bool big_endian) |
| void | write16 (binary &serialized, quint16 value) |
| Write a 16-bit value into a string. More... | |
The allowed values for specific-trap (SNMPv1 trap).
According to RFC 1157, these values can be used for the generic-trap field in SNMPv1 Traps.
| Enumerator | |
|---|---|
| coldStart | |
| warmStart | |
| linkDown | |
| linkUp | |
| authenticationFailure | |
| egpNeighborLoss | |
| enterpriseSpecific | |
Definition at line 51 of file helpers.hpp.
| Oid agentxcpp::generate_v1_snmpTrapOID | ( | generic_trap_t | generic_trap, |
| quint32 | specific_trap = 0 |
||
| ) |
Create snmpTrapOID.0 value from SNMPv1 trap data.
Each notification must have an snmpTrapOID.0 object. In SNMPv1 no notifications were available; traps were used instead. This function takes parameters which would be present in an SNMPv1 trap and converts them to the corresponding an snmpTrapOID.0 value, which can be included in a notification. The master agent extracts the SNMPv1 trap information while generating a trap (only if sending an SNMPv1 trap, of course).
The conversion is done according to RFC 1908, 3.1.2 "SNMPv1 -> SNMPv2".
| generic_trap | The type of trap. If it is enterpriseSpecific, then the parameter specific_trap must also be given. |
| specific_trap | Only used if generic_trap is enterpriseSpecific. It can be any value specific to the subagent. |
| inval_param | If the generic_trap parameter has an invalid value. |
Definition at line 51 of file helpers.cpp.
References authenticationFailure, coldStart, egpNeighborLoss, enterpriseSpecific, linkDown, linkUp, and warmStart.
|
inline |
Output operator for binary.
Definition at line 42 of file binary.hpp.
| std::ostream & agentxcpp::operator<< | ( | std::ostream & | out, |
| const agentxcpp::Oid & | o | ||
| ) |
The output operator for the Oid class.
Object identifiers (Oid objects) can be output as follows:
The last line will output "LED state OID: .1.3.6.1.4.1.3.3.1".
| out | The stream to which to write the output. |
| o | The OID to output. |
| TimeTicksVariable agentxcpp::processUpTime | ( | ) |
Calculate the uptime of the current process.
This function calculates the uptime of the current process, in hundreths of a second. The result may be given as sysUpTime.0. parameter to agentxcpp::MasterProxy::send_notification( const OidVariable&, TimeTicksVariable*, const vector<varbind>&).
The time is measured using a global variable which is initialized to the current time just be before main() starts.
Definition at line 39 of file helpers.cpp.
|
inline |
Definition at line 118 of file util.hpp.
Referenced by agentxcpp::GetBulkPDU::GetBulkPDU(), agentxcpp::ResponsePDU::ResponsePDU(), and agentxcpp::Varbind::Varbind().
|
inline |
Definition at line 81 of file util.hpp.
Referenced by agentxcpp::Counter32Variable::Counter32Variable(), agentxcpp::UnixDomainConnector::do_receive(), agentxcpp::Gauge32Variable::Gauge32Variable(), agentxcpp::IntegerVariable::IntegerVariable(), agentxcpp::IpAddressVariable::IpAddressVariable(), agentxcpp::OctetStringVariable::OctetStringVariable(), agentxcpp::PDU::parse_pdu(), agentxcpp::PDU::PDU(), agentxcpp::RegisterPDU::RegisterPDU(), agentxcpp::ResponsePDU::ResponsePDU(), agentxcpp::TimeTicksVariable::TimeTicksVariable(), and agentxcpp::UnregisterPDU::UnregisterPDU().
|
inline |
Definition at line 31 of file util.hpp.
Referenced by agentxcpp::Counter64Variable::Counter64Variable().
|
inline |
Write a 16-bit value into a string.
| serialized | The string to which the value is appended. |
| value | The value which is appended to the string. |
Definition at line 143 of file util.hpp.
Referenced by agentxcpp::GetBulkPDU::serialize(), and agentxcpp::ResponsePDU::serialize().
|
inline |
Write a 32-bit value into a string.
| serialized | The string to which the value is appended. |
| value | The value which is appended to the string. |
Definition at line 109 of file util.hpp.
Referenced by agentxcpp::PDU::add_header(), agentxcpp::OctetStringVariable::serialize(), agentxcpp::Counter32Variable::serialize(), agentxcpp::TimeTicksVariable::serialize(), agentxcpp::Gauge32Variable::serialize(), agentxcpp::IntegerVariable::serialize(), agentxcpp::UnregisterPDU::serialize(), agentxcpp::RegisterPDU::serialize(), and agentxcpp::ResponsePDU::serialize().
|
inline |
Write a 64-bit value into a string.
| serialized | The string to which the value is appended. |
| value | The value which is appended to the string. |
Definition at line 67 of file util.hpp.
Referenced by agentxcpp::Counter64Variable::serialize().