summaryrefslogtreecommitdiff
path: root/lib9p/internal.h
diff options
context:
space:
mode:
authorLuke T. Shumaker <lukeshu@lukeshu.com>2025-02-12 20:54:28 -0700
committerLuke T. Shumaker <lukeshu@lukeshu.com>2025-02-12 20:54:28 -0700
commitd148555bd86e323a51734b7881f92d09e2f08425 (patch)
tree0fa494fa06ca00e72926a6bde8158adb0ddc5a06 /lib9p/internal.h
parent6cd125e1ffd44fdf62c44d22c519561a8c9d7268 (diff)
parentbd0f2f3e0fe721c7fbce63aeacffaec8344e166c (diff)
Merge branch 'lukeshu/misc'
Diffstat (limited to 'lib9p/internal.h')
-rw-r--r--lib9p/internal.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib9p/internal.h b/lib9p/internal.h
index d939d46..a648532 100644
--- a/lib9p/internal.h
+++ b/lib9p/internal.h
@@ -39,10 +39,12 @@ static_assert(CONFIG_9P_MAX_HOSTMSG_SIZE <= SSIZE_MAX);
/* specialized contexts *******************************************************/
struct _validate_ctx {
+ /* input */
struct lib9p_ctx *ctx;
uint32_t net_size;
uint8_t *net_bytes;
+ /* output */
uint32_t net_offset;
/* Increment `host_extra` to pre-allocate space that is
* "extra" beyond sizeof(). */
@@ -51,9 +53,11 @@ struct _validate_ctx {
typedef bool (*_validate_fn_t)(struct _validate_ctx *ctx);
struct _unmarshal_ctx {
+ /* input */
struct lib9p_ctx *ctx;
uint8_t *net_bytes;
+ /* output */
uint32_t net_offset;
/* `extra` points to the beginning of unallocated space. */
void *extra;
@@ -61,8 +65,10 @@ struct _unmarshal_ctx {
typedef void (*_unmarshal_fn_t)(struct _unmarshal_ctx *ctx, void *out);
struct _marshal_ctx {
+ /* input */
struct lib9p_ctx *ctx;
+ /* output */
uint8_t *net_bytes;
uint32_t net_offset;
};