diff options
author | Günther Deschner <gd@samba.org> | 2007-11-02 11:33:53 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2007-12-21 05:44:04 +0100 |
commit | c4b9283bbb69e7754555ce7dc21c769ca205dd08 (patch) | |
tree | 6bb36e337c9d95284e90e1b644cd23606fffab6e /source4/lib/util/util.h | |
parent | 602461bfa60db593f7a2f6876ebbef5c880b1f04 (diff) | |
download | samba-c4b9283bbb69e7754555ce7dc21c769ca205dd08.tar.gz samba-c4b9283bbb69e7754555ce7dc21c769ca205dd08.tar.bz2 samba-c4b9283bbb69e7754555ce7dc21c769ca205dd08.zip |
r25799: Add dump_data_skip_zeros() which omits 16 zero bytes in a row (if not at the
beginning or the end of a blob). Usefull when inspecting protocols that
exchange huge mostly empty blobs.
Guenther
(This used to be commit c96047d022555678dabe08c0de94f0913bb4d047)
Diffstat (limited to 'source4/lib/util/util.h')
-rw-r--r-- | source4/lib/util/util.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source4/lib/util/util.h b/source4/lib/util/util.h index fc9cb1e57a..f3adbb3333 100644 --- a/source4/lib/util/util.h +++ b/source4/lib/util/util.h @@ -656,6 +656,14 @@ _PUBLIC_ bool fcntl_lock(int fd, int op, off_t offset, off_t count, int type); _PUBLIC_ void dump_data(int level, const uint8_t *buf,int len); /** + * Write dump of binary data to the log file. + * + * The data is only written if the log level is at least level. + * 16 zero bytes in a row are ommited + */ +_PUBLIC_ void dump_data_skip_zeros(int level, const uint8_t *buf, int len); + +/** malloc that aborts with smb_panic on fail or zero size. **/ _PUBLIC_ void *smb_xmalloc(size_t size); |