AgentX++  2.0.5
Public Member Functions | Static Protected Attributes | List of all members
AgentXOctets Class Reference

#include <agentx_pdu.h>

Inheritance diagram for AgentXOctets:

Public Member Functions

 AgentXOctets ()
 constructor using no arguments
 
 AgentXOctets (const char *string)
 constructor using a string
 
 AgentXOctets (const unsigned char *string, unsigned long int size)
 constructor using an unsigned char *
 
 AgentXOctets (const AgentXOctets &octet)
 constructor using another octet object
 
virtual AgentXOctetsoperator+= (const OctetStr &)
 appends a string
 
virtual AgentXOctetsoperator+= (const unsigned char)
 appends a unsigned character
 
virtual void append (const unsigned char *, unsigned int)
 Encode a string with specified length.
 
virtual void add_null_octets (const unsigned int)
 Encode a sequence of null octets.
 
virtual void encode_int (u_int, bool)
 Encode an integer.
 
virtual unsigned int decode_int (u_int &, bool)
 Decode an integer.
 
virtual void encode_short (u_short, bool)
 Decode an integer.
 
virtual unsigned short decode_short (u_int &, bool)
 Decode a short.
 
virtual void encode_oid (const Oidx &, bool, bool=FALSE)
 Encode an oid.
 
virtual Oidx decode_oid (u_int &, bool)
 Decode an oid.
 
virtual Oidx decode_oid (u_int &, bool, bool &)
 Decode an oid.
 
virtual void encode_data (SnmpSyntax *, bool)
 Encode a SNMP value.
 
virtual SnmpSyntax * decode_data (u_int &, u_short, bool)
 Decode a SNMP value.
 
virtual void encode_string (const OctetStr &, bool)
 Encode a string.
 
virtual OctetStr decode_string (u_int &, bool)
 Decode a string.
 

Static Protected Attributes

static const Oidx * internet
 

Constructor & Destructor Documentation

AgentXOctets::AgentXOctets ( )
inline

constructor using no arguments

AgentXOctets::AgentXOctets ( const char *  string)
inline

constructor using a string

AgentXOctets::AgentXOctets ( const unsigned char *  string,
unsigned long int  size 
)
inline

constructor using an unsigned char *

AgentXOctets::AgentXOctets ( const AgentXOctets octet)
inline

constructor using another octet object

Member Function Documentation

virtual void AgentXOctets::add_null_octets ( const unsigned  int)
virtual

Encode a sequence of null octets.

Parameters
nthe number of null octets to encode
virtual void AgentXOctets::append ( const unsigned char *  ,
unsigned  int 
)
virtual

Encode a string with specified length.

Parameters
stringa octet string
lengththe length of the string
virtual SnmpSyntax* AgentXOctets::decode_data ( u_int &  ,
u_short  ,
bool   
)
virtual

Decode a SNMP value.

Parameters
posthe start position of the encoded SNMP value. After successful decoding, pos will be incremented by the length of the SNMP value enconding.
syntaxthe syntax of the SNMP value to be decoded.
byteOrderif TRUE the value will be decoded in network byte order, otherwise it will be decoded in host byte order
Returns
a pointer to the decoded SNMP value, or 0 if the syntax is SnmpNull or an exception.
virtual unsigned int AgentXOctets::decode_int ( u_int &  ,
bool   
)
virtual

Decode an integer.

Parameters
posthe start position of the encoded integer within the receiver. After successful decoding, pos will be incremented by 4
byteOrderif TRUE the integer will be decoded in network byte order, otherwise it will be decoded in host byte order
Returns
the decoded unsigned integer
virtual Oidx AgentXOctets::decode_oid ( u_int &  ,
bool   
)
virtual

Decode an oid.

Parameters
posthe start position of the encoded oid within the receiver. After successful decoding, pos will be incremented by the length of the oid encoding.
networkOrderif TRUE the oid will be encoded in network byte order, otherwise it will be encoded in host byte order
Returns
the decoded oid
virtual Oidx AgentXOctets::decode_oid ( u_int &  ,
bool  ,
bool &   
)
virtual

Decode an oid.

Parameters
posthe start position of the encoded oid within the receiver. After successful decoding, pos will be incremented by the length of the oid encoding.
networkOrderif TRUE the oid will be encoded in network byte order, otherwise it will be encoded in host byte order
includeonly used when decoding a search range, if TRUE is returned the oid is included in the search range, otherwise it is excluded from the range
Returns
the decoded oid
virtual unsigned short AgentXOctets::decode_short ( u_int &  ,
bool   
)
virtual

Decode a short.

Parameters
posthe start position of the encoded short within the receiver. After successful decoding, pos will be incremented by 2
byteOrderif TRUE the short will be decoded in network byte order, otherwise it will be decoded in host byte order
Returns
the decoded unsigned short
virtual OctetStr AgentXOctets::decode_string ( u_int &  ,
bool   
)
virtual

Decode a string.

Parameters
posthe start position of the encoded string within the receiver. After successful decoding, pos will be incremented by the length of the string enconding.
byteOrderif TRUE the integer will be decoded in network byte order, otherwise it will be decoded in host byte order
Returns
a pointer to the decoded SNMP value
virtual void AgentXOctets::encode_data ( SnmpSyntax *  ,
bool   
)
virtual

Encode a SNMP value.

Parameters
valuea SNMP value
byteOrderif TRUE the integer will be encoded in network byte order, otherwise it will be encoded in host byte order
virtual void AgentXOctets::encode_int ( u_int  ,
bool   
)
virtual

Encode an integer.

Parameters
ian integer value
byteOrderif TRUE the integer will be encoded in network byte order, otherwise it will be encoded in host byte order Encode an unsigned integer
ian unsigned integer value
byteOrderif TRUE the integer will be encoded in network byte order, otherwise it will be encoded in host byte order
virtual void AgentXOctets::encode_oid ( const Oidx &  ,
bool  ,
bool  = FALSE 
)
virtual

Encode an oid.

Parameters
oidan object identifier
networkOrderif TRUE the integer will be encoded in network byte order, otherwise it will be encoded in host byte order
includeonly used when encoding a search range, include determines if the oid is included (TRUE) or excluded from the search range
virtual void AgentXOctets::encode_short ( u_short  ,
bool   
)
virtual

Decode an integer.

Parameters
posthe start position of the encoded integer within the receiver. After successful decoding, pos will be incremented by 4
byteOrderif TRUE the integer will be decoded in network byte order, otherwise it will be decoded in host byte order
Returns
the decoded unsigned integer Encode an unsigned integer of a given size
Parameters
uian unsigned short value
byteOrderif TRUE the integer will be encoded in network byte order, otherwise it will be encoded in host byte order
virtual void AgentXOctets::encode_string ( const OctetStr &  ,
bool   
)
virtual

Encode a string.

Parameters
stringa octet string
byteOrderif TRUE the integer will be encoded in network byte order, otherwise it will be encoded in host byte order
virtual AgentXOctets& AgentXOctets::operator+= ( const OctetStr &  )
virtual

appends a string

virtual AgentXOctets& AgentXOctets::operator+= ( const unsigned  char)
virtual

appends a unsigned character

Member Data Documentation

const Oidx* AgentXOctets::internet
staticprotected

The documentation for this class was generated from the following file: