AgentXOctets Class Reference

#include <agentx_pdu.h>

List of all members.

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, boolean)
 Encode an integer.
virtual unsigned int decode_int (u_int &, boolean)
 Decode an integer.
virtual void encode_short (u_short, boolean)
 Decode an integer.
virtual unsigned short decode_short (u_int &, boolean)
 Decode a short.
virtual void encode_oid (const Oidx &, boolean, boolean=FALSE)
 Encode an oid.
virtual Oidx decode_oid (u_int &, boolean)
 Decode an oid.
virtual Oidx decode_oid (u_int &, boolean, boolean &)
 Decode an oid.
virtual void encode_data (SnmpSyntax *, boolean)
 Encode a SNMP value.
virtual SnmpSyntax * decode_data (u_int &, u_short, boolean)
 Decode a SNMP value.
virtual void encode_string (const OctetStr &, boolean)
 Encode a string.
virtual OctetStr decode_string (u_int &, boolean)
 Decode a string.

Static Protected Attributes

static 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 AgentXOctets& AgentXOctets::operator+= ( const OctetStr &   )  [virtual]

appends a string

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

appends a unsigned character

virtual void AgentXOctets::append ( const unsigned char *  ,
unsigned  int 
) [virtual]

Encode a string with specified length.

Parameters:
string a octet string
length the length of the string

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

Encode a sequence of null octets.

Parameters:
n the number of null octets to encode

virtual void AgentXOctets::encode_int ( u_int  ,
boolean   
) [virtual]

Encode an integer.

Parameters:
i an integer value
byteOrder if TRUE the integer will be encoded in network byte order, otherwise it will be encoded in host byte order Encode an unsigned integer
i an unsigned integer value
byteOrder if TRUE the integer will be encoded in network byte order, otherwise it will be encoded in host byte order

virtual unsigned int AgentXOctets::decode_int ( u_int &  ,
boolean   
) [virtual]

Decode an integer.

Parameters:
pos the start position of the encoded integer within the receiver. After successful decoding, pos will be incremented by 4
byteOrder if 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 void AgentXOctets::encode_short ( u_short  ,
boolean   
) [virtual]

Decode an integer.

Parameters:
pos the start position of the encoded integer within the receiver. After successful decoding, pos will be incremented by 4
byteOrder if 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:
ui an unsigned short value
byteOrder if TRUE the integer will be encoded in network byte order, otherwise it will be encoded in host byte order

virtual unsigned short AgentXOctets::decode_short ( u_int &  ,
boolean   
) [virtual]

Decode a short.

Parameters:
pos the start position of the encoded short within the receiver. After successful decoding, pos will be incremented by 2
byteOrder if 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 void AgentXOctets::encode_oid ( const Oidx &  ,
boolean  ,
boolean  = FALSE 
) [virtual]

Encode an oid.

Parameters:
oid an object identifier
networkOrder if TRUE the integer will be encoded in network byte order, otherwise it will be encoded in host byte order
include only used when encoding a search range, include determines if the oid is included (TRUE) or excluded from the search range

virtual Oidx AgentXOctets::decode_oid ( u_int &  ,
boolean   
) [virtual]

Decode an oid.

Parameters:
pos the start position of the encoded oid within the receiver. After successful decoding, pos will be incremented by the length of the oid encoding.
networkOrder if 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 &  ,
boolean  ,
boolean &   
) [virtual]

Decode an oid.

Parameters:
pos the start position of the encoded oid within the receiver. After successful decoding, pos will be incremented by the length of the oid encoding.
networkOrder if TRUE the oid will be encoded in network byte order, otherwise it will be encoded in host byte order
include only 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 void AgentXOctets::encode_data ( SnmpSyntax *  ,
boolean   
) [virtual]

Encode a SNMP value.

Parameters:
value a SNMP value
byteOrder if TRUE the integer will be encoded in network byte order, otherwise it will be encoded in host byte order

virtual SnmpSyntax* AgentXOctets::decode_data ( u_int &  ,
u_short  ,
boolean   
) [virtual]

Decode a SNMP value.

Parameters:
pos the start position of the encoded SNMP value. After successful decoding, pos will be incremented by the length of the SNMP value enconding.
syntax the syntax of the SNMP value to be decoded.
byteOrder if 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 void AgentXOctets::encode_string ( const OctetStr &  ,
boolean   
) [virtual]

Encode a string.

Parameters:
string a octet string
byteOrder if TRUE the integer will be encoded in network byte order, otherwise it will be encoded in host byte order

virtual OctetStr AgentXOctets::decode_string ( u_int &  ,
boolean   
) [virtual]

Decode a string.

Parameters:
pos the start position of the encoded string within the receiver. After successful decoding, pos will be incremented by the length of the string enconding.
byteOrder if 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


Member Data Documentation

Oidx* AgentXOctets::internet [static, protected]


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

Generated on Tue May 26 23:32:15 2009 for AgentX++ by  doxygen 1.5.6