SNMP++
3.3.11
|
The OpaqueStr class represents the Opaque SNMP type. More...
#include <octet.h>
Public Member Functions | |
OpaqueStr () | |
Constructor creating a valid zero length OpaqueStr. More... | |
OpaqueStr (const char *str) | |
Constructs a OpaqueStr with the given value. More... | |
OpaqueStr (const unsigned char *str, unsigned long len) | |
Constructs a OpaqueStr with the given value. More... | |
OpaqueStr (const OctetStr &octet) | |
Construct a OpaqueStr from an OctetStr. More... | |
OpaqueStr (const OpaqueStr &opaque) | |
Construct a OpaqueStr from another OpaqueStr. More... | |
virtual SnmpSyntax * | clone () const |
Clone this object. More... | |
virtual SmiUINT32 | get_syntax () const |
Return the syntax. More... | |
SnmpSyntax & | operator= (const SnmpSyntax &val) |
Map other SnmpSyntax objects to OpaqueStr. More... | |
Public Member Functions inherited from OctetStr | |
OctetStr () | |
Constructs a valid OctetStr with zero length. More... | |
OctetStr (const char *str) | |
Constructs a OctetStr with the given value. More... | |
OctetStr (const unsigned char *str, unsigned long len) | |
Constructs a OctetStr with the given value. More... | |
OctetStr (const OctetStr &octet) | |
Construct a OctetStr from another OctetStr. More... | |
~OctetStr () | |
Destructor, frees allocated space. More... | |
OctetStr & | operator= (const char *str) |
Assign a char string to a OctetStr. More... | |
OctetStr & | operator= (const OctetStr &octet) |
Assign a OctetStr to a OctetStr. More... | |
OctetStr & | operator+= (const char *a) |
Append a char string to this OctetStr. More... | |
OctetStr & | operator+= (const unsigned char c) |
Append a single char to this OctetStr. More... | |
OctetStr & | operator+= (const OctetStr &octet) |
Append another OctetStr to this OctetStr. More... | |
unsigned char & | operator[] (int i) |
Allow access as if it was an array. More... | |
unsigned char | operator[] (int i) const |
Allow access as if it was an array for const OctetStr objects. More... | |
int | get_asn1_length () const |
Return the space needed for serialization. More... | |
bool | valid () const |
Return validity of the object. More... | |
const char * | get_printable () const |
Get a printable ASCII value of the string. More... | |
const char * | get_printable_hex (const enum OutputType output_type=hex_output_type) const |
Get an ASCII formatted hex dump of the contents. More... | |
const char * | get_printable_clear () const |
Get the contents with all non printable characters replaced. More... | |
void | set_data (const unsigned char *str, unsigned long len) |
Set the data on an already constructed OctetStr. More... | |
unsigned long | len () const |
Get the length of the string. More... | |
unsigned char * | data () const |
Get a pointer to internal data. More... | |
int | nCompare (const unsigned long n, const OctetStr &o) const |
void | clear () |
Null out the contents of the string. More... | |
bool | set_len (const unsigned long new_len) |
Append or shorten the internal data buffer. More... | |
Public Member Functions inherited from SnmpSyntax | |
virtual | ~SnmpSyntax () |
Virtual destructor to ensure deletion of derived classes... More... | |
Additional Inherited Members | |
Public Types inherited from OctetStr | |
enum | OutputType { OutputHexAndClear, OutputHex, OutputClear } |
Enum for setting the hex output format. More... | |
Static Public Member Functions inherited from OctetStr | |
static void | set_hex_output_type (const enum OutputType ot) |
Set the output format for get_pritable_hex(). More... | |
static void | set_np_char (const char np) |
Set the char get_printable_hex() and get_printable_clear() will use for non printable characters. More... | |
static OctetStr | from_hex_string (const OctetStr &hex_string) |
Build an OctetStr from a hex string. More... | |
static bool | set_linefeed_chars (const char *lf_chars) |
Set the character for linefeeds in get_printable() functions. More... | |
Protected Types inherited from OctetStr | |
enum | OutputFunction { OutputFunctionDefault, OutputFunctionHex, OutputFunctionClear } |
Protected Member Functions inherited from SnmpSyntax | |
SnmpSyntax () | |
Protected Attributes inherited from OctetStr | |
SNMP_PP_MUTABLE char * | output_buffer |
SNMP_PP_MUTABLE unsigned int | output_buffer_len |
SNMP_PP_MUTABLE bool | m_changed |
SNMP_PP_MUTABLE enum OutputType | output_last_type |
SNMP_PP_MUTABLE char | output_last_np_char |
SNMP_PP_MUTABLE enum OutputFunction | output_last_function |
bool | validity |
Protected Attributes inherited from SnmpSyntax | |
SmiVALUE | smival |
Static Protected Attributes inherited from OctetStr | |
static enum OutputType | hex_output_type |
static char | nonprintable_char |
static char | linefeed_chars [3] |
The OpaqueStr class represents the Opaque SNMP type.
It is derived from the SNMP++ class OctetStr and has the same interfaces and behavior, except that its syntax is sNMP_SYNTAX_OPAQUE.
|
inline |
Constructor creating a valid zero length OpaqueStr.
Definition at line 394 of file octet.h.
References sNMP_SYNTAX_OPAQUE.
|
inline |
Constructs a OpaqueStr with the given value.
The OpaqueStr will be valid unless a call to new fails.
str | - Null terminated string |
Definition at line 403 of file octet.h.
References sNMP_SYNTAX_OPAQUE.
|
inline |
Constructs a OpaqueStr with the given value.
The OpaqueStr will be valid unless a call to new fails.
str | - string that may contain null bytes |
len | - length of the string |
Definition at line 413 of file octet.h.
References sNMP_SYNTAX_OPAQUE.
|
inline |
|
inline |
|
inlinevirtual |
|
inlinevirtual |
Return the syntax.
Reimplemented from OctetStr.
Definition at line 446 of file octet.h.
References sNMP_SYNTAX_OPAQUE.
|
inlinevirtual |
Map other SnmpSyntax objects to OpaqueStr.
Reimplemented from OctetStr.
Definition at line 451 of file octet.h.
References OctetStr::operator=().