Dangerous SNMP
|
A MessaqeProcessor is responsible for creating an envelope around a particular payload and also removing such an envelope. More...
#include <messageprocessor.hpp>
Public Types | |
enum | Version { SNMPv1 = 0, SNMPv2 = 1, SNMPv3 = 3 } |
Public Member Functions | |
Version | version () const |
This returns the SNMP version of the Message Processor. More... | |
virtual std::vector< char > | encode (const SecurityModel *securityModel, ConfirmedClass::Type confirmedClass, const std::vector< char > &pduBytes)=0 throw ( Exception ) |
This encodes a new message. More... | |
virtual std::unique_ptr < ByteStream > | decode (const SecurityModel *securityModel, ByteStream &byteStream, std::unique_ptr< SecurityModel > &incomingSecurityModel)=0 throw ( Exception ) |
This decodes a message. More... | |
Protected Attributes | |
Version | _version |
A MessaqeProcessor is responsible for creating an envelope around a particular payload and also removing such an envelope.
The payload is "version"-agnostic; that is, all the MessageProcessor has to do is encode the payload in some fashion; it will not modify that payload.
A MessageProcessor subclass corresponds to a particular SNMP version. SNMPv1 -> MessageProcessorV1 SNMPv2 -> MessageProcessorV2 SNMPv3 -> MessageProcessorV3
|
pure virtual |
This decodes a message.
securityModel | The security model to use. |
byteStream | The ByteStream to use to read the message. |
incomingSecurityModel | The security model to populate with the message's information. |
Exception |
|
pure virtual |
This encodes a new message.
securityModel | The security model to use. |
confirmedClass | The appropriate ConfirmedClass type. |
pduBytes | The PDU data to encode. |
Exception |
|
inline |
This returns the SNMP version of the Message Processor.