aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPeter Crosthwaite <peter.crosthwaite@xilinx.com>2013-03-15 16:41:58 +0000
committerPeter Maydell <peter.maydell@linaro.org>2013-03-15 16:41:58 +0000
commit6ff66f50f0999c3455c39de68fc2d2949963c796 (patch)
tree5cb3336e13bfed55ac266933c4879aea2fffe4db /include
parent9c7d489379c2a2923b4805d337dfd54f2f432449 (diff)
iov: Factor out hexdumper
Factor out the hexdumper functionality from iov for all to use. Useful for creating verbose debug printfery that dumps packet data. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Message-id: faaac219c55ea586d3f748befaf5a2788fd271b8.1361853677.git.peter.crosthwaite@xilinx.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include')
-rw-r--r--include/qemu-common.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/qemu-common.h b/include/qemu-common.h
index 5e137084b5..7754ee2fcc 100644
--- a/include/qemu-common.h
+++ b/include/qemu-common.h
@@ -442,4 +442,10 @@ int64_t pow2floor(int64_t value);
int uleb128_encode_small(uint8_t *out, uint32_t n);
int uleb128_decode_small(const uint8_t *in, uint32_t *n);
+/*
+ * Hexdump a buffer to a file. An optional string prefix is added to every line
+ */
+
+void hexdump(const char *buf, FILE *fp, const char *prefix, size_t size);
+
#endif