diff options
Diffstat (limited to 'lib9p/include/lib9p/9p.h')
-rw-r--r-- | lib9p/include/lib9p/9p.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib9p/include/lib9p/9p.h b/lib9p/include/lib9p/9p.h index ffac453..5919260 100644 --- a/lib9p/include/lib9p/9p.h +++ b/lib9p/include/lib9p/9p.h @@ -18,6 +18,7 @@ #ifndef CONFIG_9P_MAX_ERR_SIZE #error config.h must define CONFIG_9P_MAX_ERR_SIZE #endif +static_assert(CONFIG_9P_MAX_ERR_SIZE <= UINT16_MAX); /* constants ******************************************************************/ @@ -60,6 +61,12 @@ int lib9p_error(struct lib9p_ctx *ctx, lib9p_errno_t linux_errno, char const *ms /** Write a printf-style error into ctx, return -1. */ int lib9p_errorf(struct lib9p_ctx *ctx, lib9p_errno_t linux_errno, char const *fmt, ...) [[gnu::format(printf, 3, 4)]]; +/* misc utilities *************************************************************/ + +uint32_t lib9p_version_min_msg_size(enum lib9p_version); + +lo_interface fmt_formatter lo_box_lib9p_msg_as_fmt_formatter(struct lib9p_ctx *ctx, enum lib9p_msg_type typ, void *body); + /* main T-message functions ***************************************************/ /** |