diff options
Diffstat (limited to 'lib9p/include')
-rw-r--r-- | lib9p/include/lib9p/9p.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib9p/include/lib9p/9p.h b/lib9p/include/lib9p/9p.h index 954498e..b33ae96 100644 --- a/lib9p/include/lib9p/9p.h +++ b/lib9p/include/lib9p/9p.h @@ -38,6 +38,9 @@ int lib9p_errorf(struct lib9p_ctx *ctx, uint32_t linux_errno, char const *fmt, . * @param net_bytes : the complete request, starting with the "size[4]" * * @return required size, or -1 on error + * + * @errno LINUX_EBADMSG: message is too short for content + * @errno LINUX_EBADMSG: message contains invalid UTF-8 */ ssize_t lib9p_unmarshal_size(struct lib9p_ctx *ctx, uint8_t *net_bytes); @@ -67,6 +70,8 @@ void lib9p_unmarshal(struct lib9p_ctx *ctx, uint8_t *net_bytes, * * @return ret_bytes : the buffer to encode to, must be at be at least lib9p_ctx_max_msg_size(ctx) bytes * @return whether there was an error (false=success, true=error) + * + * @errno LINUX_ERANGE: reply does not fit in ctx->max_msg_size */ bool lib9p_marshal(struct lib9p_ctx *ctx, enum lib9p_msg_type typ, uint16_t tag, void *body, uint8_t *ret_bytes); |