#include <agentx_pdu.h>
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 AgentXOctets & | operator+= (const OctetStr &) |
appends a string | |
virtual AgentXOctets & | operator+= (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 |
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
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.
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.
n | the number of null octets to encode |
virtual void AgentXOctets::encode_int | ( | u_int | , | |
boolean | ||||
) | [virtual] |
Encode an integer.
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.
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 |
virtual void AgentXOctets::encode_short | ( | u_short | , | |
boolean | ||||
) | [virtual] |
Decode an integer.
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 |
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.
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 |
virtual void AgentXOctets::encode_oid | ( | const Oidx & | , | |
boolean | , | |||
boolean | = FALSE | |||
) | [virtual] |
Encode an oid.
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.
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 |
virtual Oidx AgentXOctets::decode_oid | ( | u_int & | , | |
boolean | , | |||
boolean & | ||||
) | [virtual] |
Decode an oid.
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 |
virtual void AgentXOctets::encode_data | ( | SnmpSyntax * | , | |
boolean | ||||
) | [virtual] |
Encode a SNMP value.
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.
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 |
virtual void AgentXOctets::encode_string | ( | const OctetStr & | , | |
boolean | ||||
) | [virtual] |
Encode a string.
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.
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 |
Oidx* AgentXOctets::internet [static, protected] |