summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2017-10-10 16:53:21 +0200
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-10-22 20:09:26 +0000
commitc5b47cc03200c983981ac4b8de20fb0e26d4f873 (patch)
tree9072d96478518ce0e5e16be537a746ab9b429620 /include
parentfcf81b5deb8d02ba45907e90bb6668c67986a028 (diff)
add function msgb_printf() to print formatted text into msg buf
In ASCII string based protocols it a printf() version that prints directly to the message buffer may be useful. Add function msgb_printf(), make sure that msg buffer bounderies are not exceeded. If the end of the tail buffer is hit, return with an error code. Change-Id: I15e1af68616309555d0ed9ac5da027c9833d42e3
Diffstat (limited to 'include')
-rw-r--r--include/osmocom/core/msgb.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/osmocom/core/msgb.h b/include/osmocom/core/msgb.h
index 91b7ec7e..9c3ccf0d 100644
--- a/include/osmocom/core/msgb.h
+++ b/include/osmocom/core/msgb.h
@@ -498,5 +498,6 @@ uint8_t *msgb_data(const struct msgb *msg);
void *msgb_talloc_ctx_init(void *root_ctx, unsigned int pool_size);
void msgb_set_talloc_ctx(void *ctx) OSMO_DEPRECATED("Use msgb_talloc_ctx_init() instead");
+int msgb_printf(struct msgb *msgb, const char *format, ...);
/*! @} */