XBinder
Version 2.9.x
|
Function for printing binary data in hexadecimal text format and for doing binary to hexadecimal text conversion. More...
Functions | |
EXTERNRT int | rtxByteToHexChar (OSOCTET byte, char *buf, OSSIZE bufsize) |
This function converts a byte value into its hex string equivalent. More... | |
EXTERNRT int | rtxByteToHexCharWithPrefix (OSOCTET byte, char *buf, OSSIZE bufsize, const char *prefix) |
This function converts a byte value into its hex string equivalent. More... | |
EXTERNRT int | rtxHexDumpToNamedFile (const char *filename, const OSOCTET *data, OSSIZE numocts) |
This function outputs a hexadecimal dump of the current buffer contents to the file with the given name. More... | |
EXTERNRT void | rtxHexDumpToFile (FILE *fp, const OSOCTET *data, OSSIZE numocts) |
This function outputs a hexadecimal dump of the current buffer contents to a file. More... | |
EXTERNRT void | rtxHexDumpToFileEx (FILE *fp, const OSOCTET *data, OSSIZE numocts, OSSIZE bytesPerUnit) |
This function outputs a hexadecimal dump of the current buffer to a file, but it may output the dump as an array of bytes, words, or double words. More... | |
EXTERNRT void | rtxHexDumpToFileExNoAscii (FILE *fp, const OSOCTET *data, OSSIZE numocts, OSSIZE bytesPerUnit) |
This function outputs a hexadecimal dump of the current buffer to a file, but it may output the dump as an array of bytes, words, or double words. More... | |
EXTERNRT int | rtxHexDumpToNamedFileNoAscii (const char *filename, const OSOCTET *data, OSSIZE numocts) |
This function outputs a hexadecimal dump of the current buffer contents to the file with the given name. More... | |
EXTERNRT void | rtxHexDump (const OSOCTET *data, OSSIZE numocts) |
This function outputs a hexadecimal dump of the current buffer contents to stdout. More... | |
EXTERNRT void | rtxHexDumpEx (const OSOCTET *data, OSSIZE numocts, OSSIZE bytesPerUnit) |
This function outputs a hexadecimal dump of the current buffer contents to stdout, but it may display the dump as an array or bytes, words, or double words. More... | |
EXTERNRT int | rtxHexDumpToString (const OSOCTET *data, OSSIZE numocts, char *buffer, OSSIZE bufferIndex, OSSIZE bufferSize) |
This function formats a hexadecimal dump of the current buffer contents to a string. More... | |
EXTERNRT int | rtxHexDumpToStringEx (const OSOCTET *data, OSSIZE numocts, char *buffer, OSSIZE bufferIndex, OSSIZE bufferSize, OSSIZE bytesPerUnit) |
This function formats a hexadecimal dump of the current buffer contents to a string, but it may output the dump as an array of bytes, words, or double words. More... | |
EXTERNRT int | rtxHexDumpFileContents (const char *inFilePath) |
This function outputs a hexadecimal dump of the contents of the named file to stdout. More... | |
EXTERNRT int | rtxHexDumpFileContentsToFile (const char *inFilePath, const char *outFilePath) |
This function outputs a hexadecimal dump of the contents of the named file to a text file. More... | |
EXTERNRT char * | rtxHexDiffToDynString (OSCTXT *pctxt, const OSOCTET *pdata1, const OSOCTET *pdata2, OSSIZE numocts) |
This function generates a differences report between two binary data buffers. More... | |
Function for printing binary data in hexadecimal text format and for doing binary to hexadecimal text conversion.
EXTERNRT int rtxByteToHexChar | ( | OSOCTET | byte, |
char * | buf, | ||
OSSIZE | bufsize | ||
) |
This function converts a byte value into its hex string equivalent.
byte | Byte to format. |
buf | Output buffer. |
bufsize | Output buffer size. |
EXTERNRT int rtxByteToHexCharWithPrefix | ( | OSOCTET | byte, |
char * | buf, | ||
OSSIZE | bufsize, | ||
const char * | prefix | ||
) |
This function converts a byte value into its hex string equivalent.
The hex string for this function is prefixed with the given parameter.
byte | Byte to format. |
buf | Output buffer. |
bufsize | Output buffer size. |
prefix | The string prefix. |
EXTERNRT char* rtxHexDiffToDynString | ( | OSCTXT * | pctxt, |
const OSOCTET * | pdata1, | ||
const OSOCTET * | pdata2, | ||
OSSIZE | numocts | ||
) |
This function generates a differences report between two binary data buffers.
The buffers are assumed to each contain the same number of bytes. The result of the comparison operation is returned in a dynamic allocated using the rtxMemAlloc function. The buffer may be freed using the rtxMemFreePtr function.
pctxt | Pointer to context structure. |
pdata1 | Pointer to first binary buffer to compare. |
pdata2 | Pointer to second binary buffer to compare. |
numocts | Number of bytes to compare. |
EXTERNRT void rtxHexDump | ( | const OSOCTET * | data, |
OSSIZE | numocts | ||
) |
This function outputs a hexadecimal dump of the current buffer contents to stdout.
data | The pointer to a buffer to be displayed. |
numocts | The number of octets to be displayed. |
EXTERNRT void rtxHexDumpEx | ( | const OSOCTET * | data, |
OSSIZE | numocts, | ||
OSSIZE | bytesPerUnit | ||
) |
This function outputs a hexadecimal dump of the current buffer contents to stdout, but it may display the dump as an array or bytes, words, or double words.
data | The pointer to a buffer to be displayed. |
numocts | The number of octets to be displayed. |
bytesPerUnit | The number of bytes in one unit. May be 1 (byte), 2 (word), or 4 (double word). |
EXTERNRT int rtxHexDumpFileContents | ( | const char * | inFilePath | ) |
This function outputs a hexadecimal dump of the contents of the named file to stdout.
inFilePath | Name of file to be dumped. |
EXTERNRT int rtxHexDumpFileContentsToFile | ( | const char * | inFilePath, |
const char * | outFilePath | ||
) |
This function outputs a hexadecimal dump of the contents of the named file to a text file.
inFilePath | Name of file to be dumped. |
outFilePath | Name of file to which dump contents will be written. |
EXTERNRT void rtxHexDumpToFile | ( | FILE * | fp, |
const OSOCTET * | data, | ||
OSSIZE | numocts | ||
) |
This function outputs a hexadecimal dump of the current buffer contents to a file.
fp | A pointer to FILE structure. The file should be opened for writing. |
data | The pointer to a buffer to be displayed. |
numocts | The number of octets to be displayed |
EXTERNRT void rtxHexDumpToFileEx | ( | FILE * | fp, |
const OSOCTET * | data, | ||
OSSIZE | numocts, | ||
OSSIZE | bytesPerUnit | ||
) |
This function outputs a hexadecimal dump of the current buffer to a file, but it may output the dump as an array of bytes, words, or double words.
fp | A pointer to FILE structure. The file should be opened for writing. |
data | The pointer to a buffer to be displayed. |
numocts | The number of octets to be displayed. |
bytesPerUnit | The number of bytes in one unit. May be 1 (byte), 2 (word), or 4 (double word). |
EXTERNRT void rtxHexDumpToFileExNoAscii | ( | FILE * | fp, |
const OSOCTET * | data, | ||
OSSIZE | numocts, | ||
OSSIZE | bytesPerUnit | ||
) |
This function outputs a hexadecimal dump of the current buffer to a file, but it may output the dump as an array of bytes, words, or double words.
This function never contains an ASCII dump.
fp | A pointer to FILE structure. The file should be opened for writing. |
data | The pointer to a buffer to be displayed. |
numocts | The number of octets to be displayed. |
bytesPerUnit | The number of bytes in one unit. May be 1 (byte), 2 (word), or 4 (double word). |
EXTERNRT int rtxHexDumpToNamedFile | ( | const char * | filename, |
const OSOCTET * | data, | ||
OSSIZE | numocts | ||
) |
This function outputs a hexadecimal dump of the current buffer contents to the file with the given name.
The file is opened or created and then closed after the writer operation is complete.
filename | Full path to file to which data should be output. |
data | The pointer to a buffer to be displayed. |
numocts | The number of octets to be displayed |
EXTERNRT int rtxHexDumpToNamedFileNoAscii | ( | const char * | filename, |
const OSOCTET * | data, | ||
OSSIZE | numocts | ||
) |
This function outputs a hexadecimal dump of the current buffer contents to the file with the given name.
The file is opened or created and then closed after the writer operation is complete. The dump in this case has no ASCII part which makes it easier to import into hex editor tools.
filename | Full path to file to which data should be output. |
data | The pointer to a buffer to be displayed. |
numocts | The number of octets to be displayed. |
EXTERNRT int rtxHexDumpToString | ( | const OSOCTET * | data, |
OSSIZE | numocts, | ||
char * | buffer, | ||
OSSIZE | bufferIndex, | ||
OSSIZE | bufferSize | ||
) |
This function formats a hexadecimal dump of the current buffer contents to a string.
data | The pointer to a buffer to be displayed. |
numocts | The number of octets to be displayed. |
buffer | The destination string buffer. |
bufferIndex | The starting position in the destination buffer. The formatting of the dump will begin at this position. |
bufferSize | The total size of the destination buffer. |
EXTERNRT int rtxHexDumpToStringEx | ( | const OSOCTET * | data, |
OSSIZE | numocts, | ||
char * | buffer, | ||
OSSIZE | bufferIndex, | ||
OSSIZE | bufferSize, | ||
OSSIZE | bytesPerUnit | ||
) |
This function formats a hexadecimal dump of the current buffer contents to a string, but it may output the dump as an array of bytes, words, or double words.
data | The pointer to a buffer to be displayed. |
numocts | The number of octets to be displayed. |
buffer | The destination string buffer. |
bufferIndex | The starting position in the destination buffer. The formatting of the dump will begin at this position. |
bufferSize | The total size of the destination buffer. |
bytesPerUnit | The number of bytes in one unit. May be 1 (byte), 2 (word), or 4 (double word). |