summaryrefslogtreecommitdiff
path: root/lib9p/internal.h
diff options
context:
space:
mode:
authorLuke T. Shumaker <lukeshu@lukeshu.com>2025-01-13 23:20:13 -0700
committerLuke T. Shumaker <lukeshu@lukeshu.com>2025-02-12 20:55:19 -0700
commita24a60232204702fe245c312edb0c2c8041b17a8 (patch)
tree01cc4a46cad37087aa419b2b13c9aa27c568eea2 /lib9p/internal.h
parent1793bda7f3e445c5ad81cf108589f8b1edcda4eb (diff)
lib9p: Rewrite the marshalers to support zero-copy for data
Diffstat (limited to 'lib9p/internal.h')
-rw-r--r--lib9p/internal.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib9p/internal.h b/lib9p/internal.h
index a648532..d27348e 100644
--- a/lib9p/internal.h
+++ b/lib9p/internal.h
@@ -69,8 +69,10 @@ struct _marshal_ctx {
struct lib9p_ctx *ctx;
/* output */
- uint8_t *net_bytes;
- uint32_t net_offset;
+ size_t net_iov_cnt;
+ struct iovec *net_iov;
+ size_t net_copied_size;
+ uint8_t *net_copied;
};
typedef bool (*_marshal_fn_t)(struct _marshal_ctx *ctx, void *host_val);
@@ -88,6 +90,7 @@ struct _lib9p_send_tentry {
extern const char * _lib9p_table_ver_name[LIB9P_VER_NUM];
extern const char * _lib9p_table_msg_name[LIB9P_VER_NUM][0x100];
+extern const uint32_t _lib9p_table_msg_min_size[LIB9P_VER_NUM];
extern const struct _lib9p_recv_tentry _lib9p_table_Tmsg_recv[LIB9P_VER_NUM][0x80];
extern const struct _lib9p_recv_tentry _lib9p_table_Rmsg_recv[LIB9P_VER_NUM][0x80];
extern const struct _lib9p_send_tentry _lib9p_table_Tmsg_send[LIB9P_VER_NUM][0x80];