summaryrefslogtreecommitdiff
path: root/lib9p/include
diff options
context:
space:
mode:
authorLuke T. Shumaker <lukeshu@lukeshu.com>2025-01-25 22:46:25 -0700
committerLuke T. Shumaker <lukeshu@lukeshu.com>2025-01-27 21:34:09 -0700
commit90254ad6e0477ff67e488958f0f297c5f85a4c56 (patch)
tree31f6968ae18ead2760abf3536ef25e0398cc3c8f /lib9p/include
parentc5c170bac070c1bbc0e008e05783109c2e49afab (diff)
lib9p: idl: Refactor how I handle data-lengths being signed
Diffstat (limited to 'lib9p/include')
-rw-r--r--lib9p/include/lib9p/9p.generated.h75
1 files changed, 36 insertions, 39 deletions
diff --git a/lib9p/include/lib9p/9p.generated.h b/lib9p/include/lib9p/9p.generated.h
index c33ab26..105cafc 100644
--- a/lib9p/include/lib9p/9p.generated.h
+++ b/lib9p/include/lib9p/9p.generated.h
@@ -144,12 +144,18 @@ typedef uint16_t lib9p_tag_t;
typedef uint32_t lib9p_fid_t;
#define LIB9P_FID_NOFID ((lib9p_fid_t)UINT32_C(~0))
-/* min_size = 4 ; max_size = 2,147,483,651 */
+/* min_size = 4 ; max_size = 4,294,967,299 (warning: >UINT32_MAX) */
struct lib9p_d {
uint32_t len;
[[gnu::nonstring]] char *dat;
};
+/* min_size = 4 ; max_size = 2,147,483,651 */
+struct lib9p_d_signed {
+ uint32_t len;
+ [[gnu::nonstring]] char *dat;
+};
+
/* min_size = 2 ; max_size = 65,537 */
struct lib9p_s {
uint16_t len;
@@ -406,14 +412,6 @@ typedef uint8_t lib9p_lock_status_t;
#define LIB9P_LOCK_STATUS_GRACE ((lib9p_lock_status_t)UINT8_C(3))
#endif /* CONFIG_9P_ENABLE_9P2000_L */
-#if CONFIG_9P_ENABLE_9P2000_e
-/* min_size = 4 ; max_size = 4,294,967,299 (warning: >UINT32_MAX) */
-struct lib9p_d_e {
- uint32_t len;
- uint8_t *dat;
-};
-
-#endif /* CONFIG_9P_ENABLE_9P2000_e */
#if CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_L || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_u
/* size = 9 */
struct lib9p_msg_Tflush {
@@ -492,13 +490,6 @@ struct lib9p_msg_Rxattrcreate {
lib9p_tag_t tag;
};
-/* min_size = 11 ; max_size = 4,294,967,306 (warning: >UINT32_MAX) */
-struct lib9p_msg_Rreaddir {
- lib9p_tag_t tag;
- uint32_t count;
- uint8_t *data;
-};
-
/* size = 7 */
struct lib9p_msg_Rfsync {
lib9p_tag_t tag;
@@ -604,20 +595,34 @@ struct lib9p_msg_Tfsync {
uint32_t datasync;
};
+/* min_size = 11 ; max_size = 4,294,967,306 (warning: >UINT32_MAX) */
+struct lib9p_msg_Rreaddir {
+ lib9p_tag_t tag;
+ struct lib9p_d data;
+};
+
#endif /* CONFIG_9P_ENABLE_9P2000_L */
+#if CONFIG_9P_ENABLE_9P2000_e
+/* min_size = 11 ; max_size = 4,294,967,306 (warning: >UINT32_MAX) */
+struct lib9p_msg_Rsread {
+ lib9p_tag_t tag;
+ struct lib9p_d data;
+};
+
+#endif /* CONFIG_9P_ENABLE_9P2000_e */
#if CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_L || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_u
/* min_size = 11 ; max_size = 2,147,483,658 */
struct lib9p_msg_Rread {
- lib9p_tag_t tag;
- struct lib9p_d data;
+ lib9p_tag_t tag;
+ struct lib9p_d_signed data;
};
/* min_size = 23 ; max_size = 2,147,483,670 */
struct lib9p_msg_Twrite {
- lib9p_tag_t tag;
- lib9p_fid_t fid;
- uint64_t offset;
- struct lib9p_d data;
+ lib9p_tag_t tag;
+ lib9p_fid_t fid;
+ uint64_t offset;
+ struct lib9p_d_signed data;
};
/* min_size = 13 ; max_size = 65,548 */
@@ -744,6 +749,15 @@ struct lib9p_msg_Tsread {
struct lib9p_s *wname;
};
+/* min_size = 17 ; max_size = 8,589,934,607 (warning: >UINT32_MAX) */
+struct lib9p_msg_Tswrite {
+ lib9p_tag_t tag;
+ uint32_t fid;
+ uint16_t nwname;
+ struct lib9p_s *wname;
+ struct lib9p_d data;
+};
+
#endif /* CONFIG_9P_ENABLE_9P2000_e */
#if CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_L || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_u
/* size = 13 */
@@ -875,23 +889,6 @@ struct lib9p_msg_Rlock {
};
#endif /* CONFIG_9P_ENABLE_9P2000_L */
-#if CONFIG_9P_ENABLE_9P2000_e
-/* min_size = 11 ; max_size = 4,294,967,306 (warning: >UINT32_MAX) */
-struct lib9p_msg_Rsread {
- lib9p_tag_t tag;
- struct lib9p_d_e data;
-};
-
-/* min_size = 17 ; max_size = 8,589,934,607 (warning: >UINT32_MAX) */
-struct lib9p_msg_Tswrite {
- lib9p_tag_t tag;
- uint32_t fid;
- uint16_t nwname;
- struct lib9p_s *wname;
- struct lib9p_d_e data;
-};
-
-#endif /* CONFIG_9P_ENABLE_9P2000_e */
#if CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_u
/* LIB9P_VER_9P2000 : min_size = 49 ; max_size = 262,189 */
/* LIB9P_VER_9P2000_e: min_size = 49 ; max_size = 262,189 */