From baa225ed867fa7357ad05b35b90c9ecb7192f189 Mon Sep 17 00:00:00 2001 From: Jacob Erlbeck Date: Fri, 28 Feb 2014 15:14:40 +0100 Subject: msgb: Add msgb_hexdump() function This function works like osmo_hexdump() and returns a static buffer containing hex bytes along with markers for the layers. Note that it uses osmo_hexdump() internally, thus a call to msgb_hexdump() invalidates the buffer that has been returned by an earlier call to osmo_hexdump(). In short: don't mix them in a single call printf(). Sponsored-by: On-Waves ehf --- include/osmocom/core/msgb.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/osmocom/core/msgb.h') diff --git a/include/osmocom/core/msgb.h b/include/osmocom/core/msgb.h index fe2733b7..5d4bd84b 100644 --- a/include/osmocom/core/msgb.h +++ b/include/osmocom/core/msgb.h @@ -73,6 +73,7 @@ extern void msgb_enqueue(struct llist_head *queue, struct msgb *msg); extern struct msgb *msgb_dequeue(struct llist_head *queue); extern void msgb_reset(struct msgb *m); uint16_t msgb_length(const struct msgb *msg); +extern const char *msgb_hexdump(const struct msgb *msg); #ifdef MSGB_DEBUG #include -- cgit v1.2.3