Commit Graph

9 Commits (d67289b60e32436a6c351394096120fee0f9839f)

Author SHA1 Message Date
Victor Julien c07f5397f4 Introduce BytesToString utility
Introduce a utility function to convert an array of bytes into a
null-terminated string:

 char *BytesToString(const uint8_t *bytes, size_t nbytes);

All non-printables are copied over, except for '\0', which is
turned into literal '\' '0' in the string. So the resulting string
may be bigger than the input.
12 years ago
Victor Julien 55da9787a4 Win32 compile fixes. 14 years ago
Eric Leblond 4e9231266a Compilation fix for OpenBSD and win32.
This patch fixes compilation on OpenBSD platform. It is running
fine on a pcap file. The patch should also fix compilation on
WIN32 platform but this is not tested.
15 years ago
William Metcalf ce01927515 Import of GPLv2 Header 050410 16 years ago
Pablo Rincon b1d1ea87ff Moving inline functions to the .h files, so gcc can inline them correctly 16 years ago
Jan Jezek fe6a72befc Code is now compilable on the Win32 platform 16 years ago
root ddf5995049 endianness handling update 16 years ago
Brian Rectanus 11d068740a Byte utils return num bytes extracted on success instead of zero. 16 years ago
Brian Rectanus af06e6a288 Added byte extraction util. 16 years ago