summaryrefslogtreecommitdiff
path: root/src/common/utils.h
diff options
context:
space:
mode:
authorai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-03-07 09:51:33 +0000
committerai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-03-07 09:51:33 +0000
commit281445fc155a78e1e40124989678d99639094e8f (patch)
tree4eaa91e849f451ca5dff6db19575808161767d61 /src/common/utils.h
parent11c9fddde1192be90bd83118af9fc95f93fd5064 (diff)
downloadhercules-281445fc155a78e1e40124989678d99639094e8f.tar.gz
hercules-281445fc155a78e1e40124989678d99639094e8f.tar.bz2
hercules-281445fc155a78e1e40124989678d99639094e8f.tar.xz
hercules-281445fc155a78e1e40124989678d99639094e8f.zip
* Cleaned up packet dumping code.
- Replaced utils function 'dump' with 'WriteDump' (files) and 'ShowDump' (console), and used those to replace inlined code in clif (related r10947). - Fixed clif_parse_debug not printing anything, when it is used with a variable length packet. - Added ability to dump invalid packets through define DUMP_INVALID_PACKET (clif.c). - Removed code to dump all incoming packets, as that can be achieved with the DUMP_UNKNOWN_PACKET code as well when needed (from r1009, related r10947). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14734 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/common/utils.h')
-rw-r--r--src/common/utils.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/common/utils.h b/src/common/utils.h
index 5cf3ff3cf..2fe078615 100644
--- a/src/common/utils.h
+++ b/src/common/utils.h
@@ -11,7 +11,8 @@
#include <stdio.h> // FILE*
// generate a hex dump of the first 'length' bytes of 'buffer'
-void dump(FILE* fp, const unsigned char* buffer, int length);
+void WriteDump(FILE* fp, const void* buffer, size_t length);
+void ShowDump(const void* buffer, size_t length);
void findfile(const char *p, const char *pat, void (func)(const char*));
bool exists(const char* filename);