diff options
author | Luke T. Shumaker <lukeshu@lukeshu.com> | 2024-12-26 18:01:31 -0700 |
---|---|---|
committer | Luke T. Shumaker <lukeshu@lukeshu.com> | 2025-01-11 23:34:14 -0700 |
commit | cd64085694c7c4aa96312e88905015eea4d8b63d (patch) | |
tree | 2cabaaafe3a0f5a24b8145b87031ff3d8dd3ed9c /lib9p/internal.h | |
parent | 7eda822ef31a15d22de03fc1eec7d995f661b26d (diff) |
lib9p: Split the generated tables up
Diffstat (limited to 'lib9p/internal.h')
-rw-r--r-- | lib9p/internal.h | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/lib9p/internal.h b/lib9p/internal.h index b1a367d..5f49131 100644 --- a/lib9p/internal.h +++ b/lib9p/internal.h @@ -1,6 +1,6 @@ /* lib9p/internal.h - TODO * - * Copyright (C) 2024 Luke T. Shumaker <lukeshu@lukeshu.com> + * Copyright (C) 2024-2025 Luke T. Shumaker <lukeshu@lukeshu.com> * SPDX-License-Identifier: AGPL-3.0-or-later */ @@ -73,21 +73,23 @@ struct _marshal_ctx { }; typedef bool (*_marshal_fn_t)(struct _marshal_ctx *ctx, void *host_val); -/* tables *********************************************************************/ +/* tables / exports ***********************************************************/ -struct _table_msg { - char *name; +struct _lib9p_recv_tentry { size_t basesize; _validate_fn_t validate; _unmarshal_fn_t unmarshal; - _marshal_fn_t marshal; }; -struct _table_version { - struct _table_msg msgs[0x100]; +struct _lib9p_send_tentry { + _marshal_fn_t marshal; }; -extern struct _table_version _lib9p_versions[LIB9P_VER_NUM]; +extern const char * _lib9p_table_msg_name[LIB9P_VER_NUM][0x100]; +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]; +extern const struct _lib9p_send_tentry _lib9p_table_Rmsg_send[LIB9P_VER_NUM][0x80]; bool _lib9p_validate_stat(struct _validate_ctx *ctx); void _lib9p_unmarshal_stat(struct _unmarshal_ctx *ctx, struct lib9p_stat *out); |