libassa 3.5.1
|
#include <MemDump.h>
Public Member Functions | |
MemDump (const char *msg_, int len_) | |
Constructor converts original binary image to hex and ascii representation, and stores resultant image in internal buffer for later retrieval. | |
~MemDump () | |
Destructor releases image memory. | |
const char * | getMemDump () const |
Obtain a pointer to the dump image (null-terminated char string). | |
Static Public Member Functions | |
static void | dump_to_log (unsigned long mask_, const char *info_, const char *msg_, int len_) |
Write hex/ascii dump of a memory region to log file. | |
Private Attributes | |
char * | m_dump |
pointer to converted image | |
Static Private Attributes | |
static const char | m_empty_str [] = "Null" |
static Null string | |
Constructor converts original binary image to hex and ascii representation, and stores resultant image in internal buffer for later retrieval.
MemDump owns the image and will free the memory once it is out of scope
msg_ | char pointer to original binary image. |
len_ | lenght of the binary image. |
Definition at line 26 of file MemDump.cpp.
References ASSA::ASSAERR, DL, and m_dump.
|
inline |
Destructor releases image memory.
Definition at line 83 of file MemDump.h.
References m_dump, and m_empty_str.
|
static |
Write hex/ascii dump of a memory region to log file.
mask_ | Debug mask as defined in debug.h |
info_ | Information string to annotate the hex memory dump |
msg_ | Pointer to the memory area |
len_ | Number of bytes |
Definition at line 110 of file MemDump.cpp.
Referenced by ASSA::CharInBuffer::dump(), ASSA::IPv4Socket::read(), ASSA::Socketbuf::underflow(), and ASSA::IPv4Socket::write().
Obtain a pointer to the dump image (null-terminated char string).
Definition at line 93 of file MemDump.h.
References m_dump, and m_empty_str.
|
private |
pointer to converted image
Definition at line 44 of file MemDump.h.
Referenced by getMemDump(), MemDump(), and ~MemDump().
static Null string
Definition at line 47 of file MemDump.h.
Referenced by getMemDump(), and ~MemDump().