summaryrefslogtreecommitdiff
path: root/lib9p/types.c
diff options
context:
space:
mode:
authorLuke T. Shumaker <lukeshu@lukeshu.com>2024-09-27 22:27:01 -0600
committerLuke T. Shumaker <lukeshu@lukeshu.com>2024-09-27 22:27:01 -0600
commit7ec97df3ee8edfd102fe573eaa61cf4e5c6284cb (patch)
treee696f30da5645cdd3cb09971d9544622e9943bcf /lib9p/types.c
parentfa357459f88bb8f0170d1a68df66e7d068d59996 (diff)
wip fixes
Diffstat (limited to 'lib9p/types.c')
-rw-r--r--lib9p/types.c811
1 files changed, 407 insertions, 404 deletions
diff --git a/lib9p/types.c b/lib9p/types.c
index deceb4e..5b6d0a0 100644
--- a/lib9p/types.c
+++ b/lib9p/types.c
@@ -1,6 +1,9 @@
/* Generated by `./lib9p/types.gen lib9p/9P2000.txt lib9p/9P2000.u.txt lib9p/9P2000.e.txt`. DO NOT EDIT! */
#include <stdbool.h>
+#include <stddef.h> /* for size_t */
+#include <inttypes.h> /* for PRI* macros */
+#include <string.h> /* for memset() */
#include <lib9p/9p.h>
@@ -43,18 +46,18 @@ static inline bool _checksize_list(struct _checksize_ctx *ctx,
static inline bool checksize_d(struct _checksize_ctx *ctx) {
uint32_t base_offset = ctx->net_offset;
- if (_checksize_4(ctx))
+ if (checksize_4(ctx))
return true;
uint32_t len = decode_u32le(&ctx->net_bytes[base_offset]);
- return checksize_net(ctx, len) || checksize_host(ctx, len);
+ return _checksize_net(ctx, len) || _checksize_host(ctx, len);
}
static inline bool checksize_s(struct _checksize_ctx *ctx) {
uint32_t base_offset = ctx->net_offset;
- if (_checksize_2(ctx))
+ if (checksize_2(ctx))
return true;
uint16_t len = decode_u16le(&ctx->net_bytes[base_offset]);
- if (checksize_net(ctx, len) || checksize_host(ctx, ((size_t)len)+1))
+ if (_checksize_net(ctx, len) || _checksize_host(ctx, ((size_t)len)+1))
return true;
if (!is_valid_utf8_without_nul(&ctx->net_bytes[base_offset+2], len))
return lib9p_error(ctx->ctx, LINUX_EBADMSG, "message contains invalid UTF-8");
@@ -249,22 +252,22 @@ static bool checksize_Rswrite(struct _checksize_ctx *ctx) {
/* unmarshal_* ****************************************************************/
-static inline vold unmarshal_1(struct _unmarshal_ctx *ctx, uint8_t *out) {
+static inline void unmarshal_1(struct _unmarshal_ctx *ctx, uint8_t *out) {
*out = decode_u8le(&ctx->net_bytes[ctx->net_offset]);
ctx->net_offset += 1;
}
-static inline vold unmarshal_2(struct _unmarshal_ctx *ctx, uint16_t *out) {
+static inline void unmarshal_2(struct _unmarshal_ctx *ctx, uint16_t *out) {
*out = decode_u16le(&ctx->net_bytes[ctx->net_offset]);
ctx->net_offset += 2;
}
-static inline vold unmarshal_4(struct _unmarshal_ctx *ctx, uint32_t *out) {
+static inline void unmarshal_4(struct _unmarshal_ctx *ctx, uint32_t *out) {
*out = decode_u32le(&ctx->net_bytes[ctx->net_offset]);
ctx->net_offset += 4;
}
-static inline vold unmarshal_8(struct _unmarshal_ctx *ctx, uint64_t *out) {
+static inline void unmarshal_8(struct _unmarshal_ctx *ctx, uint64_t *out) {
*out = decode_u64le(&ctx->net_bytes[ctx->net_offset]);
ctx->net_offset += 8;
}
@@ -272,8 +275,8 @@ static inline vold unmarshal_8(struct _unmarshal_ctx *ctx, uint64_t *out) {
static inline void unmarshal_d(struct _unmarshal_ctx *ctx, struct lib9p_d *out) {
memset(out, 0, sizeof(*out));
unmarshal_4(ctx, &out->len);
- out->dat = ctx->host_extra;
- ctx->host_extra += sizeof(out->dat[0]) * out->len;
+ out->dat = ctx->extra;
+ ctx->extra += sizeof(out->dat[0]) * out->len;
for (typeof(out->len) i = 0; i < out->len; i++)
unmarshal_1(ctx, &out->dat[i]);
}
@@ -281,8 +284,8 @@ static inline void unmarshal_d(struct _unmarshal_ctx *ctx, struct lib9p_d *out)
static inline void unmarshal_s(struct _unmarshal_ctx *ctx, struct lib9p_s *out) {
memset(out, 0, sizeof(*out));
unmarshal_2(ctx, &out->len);
- out->utf8 = ctx->host_extra;
- ctx->host_extra += sizeof(out->utf8[0]) * out->len;
+ out->utf8 = ctx->extra;
+ ctx->extra += sizeof(out->utf8[0]) * out->len;
for (typeof(out->len) i = 0; i < out->len; i++)
unmarshal_1(ctx, &out->utf8[i]);
}
@@ -363,7 +366,7 @@ static void unmarshal_Tflush(struct _unmarshal_ctx *ctx, struct lib9p_msg_Tflush
unmarshal_2(ctx, &out->oldtag);
}
-static void unmarshal_Rflush(struct _unmarshal_ctx *UNUSED(ctx), struct lib9p_msg_Rflush *UNUSED(out)) {
+static void unmarshal_Rflush(struct _unmarshal_ctx *UNUSED(ctx), struct lib9p_msg_Rflush *out) {
memset(out, 0, sizeof(*out));
}
@@ -372,8 +375,8 @@ static void unmarshal_Twalk(struct _unmarshal_ctx *ctx, struct lib9p_msg_Twalk *
unmarshal_4(ctx, &out->fid);
unmarshal_4(ctx, &out->newfid);
unmarshal_2(ctx, &out->nwname);
- out->wname = ctx->host_extra;
- ctx->host_extra += sizeof(out->wname[0]) * out->nwname;
+ out->wname = ctx->extra;
+ ctx->extra += sizeof(out->wname[0]) * out->nwname;
for (typeof(out->nwname) i = 0; i < out->nwname; i++)
unmarshal_s(ctx, &out->wname[i]);
}
@@ -381,8 +384,8 @@ static void unmarshal_Twalk(struct _unmarshal_ctx *ctx, struct lib9p_msg_Twalk *
static void unmarshal_Rwalk(struct _unmarshal_ctx *ctx, struct lib9p_msg_Rwalk *out) {
memset(out, 0, sizeof(*out));
unmarshal_2(ctx, &out->nwqid);
- out->wqid = ctx->host_extra;
- ctx->host_extra += sizeof(out->wqid[0]) * out->nwqid;
+ out->wqid = ctx->extra;
+ ctx->extra += sizeof(out->wqid[0]) * out->nwqid;
for (typeof(out->nwqid) i = 0; i < out->nwqid; i++)
unmarshal_qid(ctx, &out->wqid[i]);
}
@@ -442,7 +445,7 @@ static void unmarshal_Tclunk(struct _unmarshal_ctx *ctx, struct lib9p_msg_Tclunk
unmarshal_4(ctx, &out->fid);
}
-static void unmarshal_Rclunk(struct _unmarshal_ctx *UNUSED(ctx), struct lib9p_msg_Rclunk *UNUSED(out)) {
+static void unmarshal_Rclunk(struct _unmarshal_ctx *UNUSED(ctx), struct lib9p_msg_Rclunk *out) {
memset(out, 0, sizeof(*out));
}
@@ -451,7 +454,7 @@ static void unmarshal_Tremove(struct _unmarshal_ctx *ctx, struct lib9p_msg_Tremo
unmarshal_4(ctx, &out->fid);
}
-static void unmarshal_Rremove(struct _unmarshal_ctx *UNUSED(ctx), struct lib9p_msg_Rremove *UNUSED(out)) {
+static void unmarshal_Rremove(struct _unmarshal_ctx *UNUSED(ctx), struct lib9p_msg_Rremove *out) {
memset(out, 0, sizeof(*out));
}
@@ -471,7 +474,7 @@ static void unmarshal_Twstat(struct _unmarshal_ctx *ctx, struct lib9p_msg_Twstat
unmarshal_stat(ctx, &out->stat);
}
-static void unmarshal_Rwstat(struct _unmarshal_ctx *UNUSED(ctx), struct lib9p_msg_Rwstat *UNUSED(out)) {
+static void unmarshal_Rwstat(struct _unmarshal_ctx *UNUSED(ctx), struct lib9p_msg_Rwstat *out) {
memset(out, 0, sizeof(*out));
}
@@ -480,7 +483,7 @@ static void unmarshal_Tsession(struct _unmarshal_ctx *ctx, struct lib9p_msg_Tses
unmarshal_8(ctx, &out->key);
}
-static void unmarshal_Rsession(struct _unmarshal_ctx *UNUSED(ctx), struct lib9p_msg_Rsession *UNUSED(out)) {
+static void unmarshal_Rsession(struct _unmarshal_ctx *UNUSED(ctx), struct lib9p_msg_Rsession *out) {
memset(out, 0, sizeof(*out));
}
@@ -488,8 +491,8 @@ static void unmarshal_Tsread(struct _unmarshal_ctx *ctx, struct lib9p_msg_Tsread
memset(out, 0, sizeof(*out));
unmarshal_4(ctx, &out->fid);
unmarshal_2(ctx, &out->nwname);
- out->wname = ctx->host_extra;
- ctx->host_extra += sizeof(out->wname[0]) * out->nwname;
+ out->wname = ctx->extra;
+ ctx->extra += sizeof(out->wname[0]) * out->nwname;
for (typeof(out->nwname) i = 0; i < out->nwname; i++)
unmarshal_s(ctx, &out->wname[i]);
}
@@ -503,8 +506,8 @@ static void unmarshal_Tswrite(struct _unmarshal_ctx *ctx, struct lib9p_msg_Tswri
memset(out, 0, sizeof(*out));
unmarshal_4(ctx, &out->fid);
unmarshal_2(ctx, &out->nwname);
- out->wname = ctx->host_extra;
- ctx->host_extra += sizeof(out->wname[0]) * out->nwname;
+ out->wname = ctx->extra;
+ ctx->extra += sizeof(out->wname[0]) * out->nwname;
for (typeof(out->nwname) i = 0; i < out->nwname; i++)
unmarshal_s(ctx, &out->wname[i]);
unmarshal_d(ctx, &out->data);
@@ -518,43 +521,43 @@ static void unmarshal_Rswrite(struct _unmarshal_ctx *ctx, struct lib9p_msg_Rswri
/* marshal_* ******************************************************************/
static inline bool _marshal_too_large(struct _marshal_ctx *ctx) {
- lib9p_errorf(ctx->ctx, "%s too large to marshal into %s limit (limit=%"PRIu32")",
+ lib9p_errorf(ctx->ctx, LINUX_EMSGSIZE, "%s too large to marshal into %s limit (limit=%"PRIu32")",
(ctx->net_bytes[4] % 2 == 0) ? "T-message" : "R-message",
ctx->ctx->version ? "negotiated" : ((ctx->net_bytes[4] % 2 == 0) ? "client" : "server"),
- ctx->ctx->max_msg_size));
- return true;
+ ctx->ctx->max_msg_size);
+ return true;
}
static inline bool marshal_1(struct _marshal_ctx *ctx, uint8_t *val) {
- if (ctx->net_offset + 1 > ctx->max_msg_size)
- return _marshal_too_large(ctx);
- out_net_bytes[ctx->net_offset] = *val;
+ if (ctx->net_offset + 1 > ctx->ctx->max_msg_size)
+ return _marshal_too_large(ctx);
+ ctx->net_bytes[ctx->net_offset] = *val;
ctx->net_offset += 1;
- return false;
+ return false;
}
static inline bool marshal_2(struct _marshal_ctx *ctx, uint16_t *val) {
- if (ctx->net_offset + 2 > ctx->max_msg_size)
- return _marshal_too_large(ctx);
- encode_u16le(*val, &out_net_bytes[ctx->net_offset]);
+ if (ctx->net_offset + 2 > ctx->ctx->max_msg_size)
+ return _marshal_too_large(ctx);
+ encode_u16le(*val, &ctx->net_bytes[ctx->net_offset]);
ctx->net_offset += 2;
- return false;
+ return false;
}
static inline bool marshal_4(struct _marshal_ctx *ctx, uint32_t *val) {
- if (ctx->net_offset + 4 > ctx->max_msg_size)
+ if (ctx->net_offset + 4 > ctx->ctx->max_msg_size)
return true;
- encode_u32le(*val, &out_net_bytes[ctx->net_offset]);
+ encode_u32le(*val, &ctx->net_bytes[ctx->net_offset]);
ctx->net_offset += 4;
- return false;
+ return false;
}
static inline bool marshal_8(struct _marshal_ctx *ctx, uint64_t *val) {
- if (ctx->net_offset + 8 > ctx->max_msg_size)
+ if (ctx->net_offset + 8 > ctx->ctx->max_msg_size)
return true;
- encode_u64le(*val, &out_net_bytes[ctx->net_offset]);
+ encode_u64le(*val, &ctx->net_bytes[ctx->net_offset]);
ctx->net_offset += 8;
- return false;
+ return false;
}
static inline bool marshal_d(struct _marshal_ctx *ctx, struct lib9p_d *val) {
@@ -562,7 +565,7 @@ static inline bool marshal_d(struct _marshal_ctx *ctx, struct lib9p_d *val) {
|| ({
bool err = false;
for (typeof(val->len) i = 0; i < val->len && !err; i++)
- err = marshal_1(ctx, &val->dat[i]));
+ err = marshal_1(ctx, &val->dat[i]);
err;
});
}
@@ -572,7 +575,7 @@ static inline bool marshal_s(struct _marshal_ctx *ctx, struct lib9p_s *val) {
|| ({
bool err = false;
for (typeof(val->len) i = 0; i < val->len && !err; i++)
- err = marshal_1(ctx, &val->utf8[i]));
+ err = marshal_1(ctx, &val->utf8[i]);
err;
});
}
@@ -654,7 +657,7 @@ static bool marshal_Twalk(struct _marshal_ctx *ctx, struct lib9p_msg_Twalk *val)
|| ({
bool err = false;
for (typeof(val->nwname) i = 0; i < val->nwname && !err; i++)
- err = marshal_s(ctx, &val->wname[i]));
+ err = marshal_s(ctx, &val->wname[i]);
err;
});
}
@@ -664,7 +667,7 @@ static bool marshal_Rwalk(struct _marshal_ctx *ctx, struct lib9p_msg_Rwalk *val)
|| ({
bool err = false;
for (typeof(val->nwqid) i = 0; i < val->nwqid && !err; i++)
- err = marshal_qid(ctx, &val->wqid[i]));
+ err = marshal_qid(ctx, &val->wqid[i]);
err;
});
}
@@ -758,7 +761,7 @@ static bool marshal_Tsread(struct _marshal_ctx *ctx, struct lib9p_msg_Tsread *va
|| ({
bool err = false;
for (typeof(val->nwname) i = 0; i < val->nwname && !err; i++)
- err = marshal_s(ctx, &val->wname[i]));
+ err = marshal_s(ctx, &val->wname[i]);
err;
});
}
@@ -773,7 +776,7 @@ static bool marshal_Tswrite(struct _marshal_ctx *ctx, struct lib9p_msg_Tswrite *
|| ({
bool err = false;
for (typeof(val->nwname) i = 0; i < val->nwname && !err; i++)
- err = marshal_s(ctx, &val->wname[i]));
+ err = marshal_s(ctx, &val->wname[i]);
err;
})
|| marshal_d(ctx, &val->data);
@@ -788,544 +791,544 @@ static bool marshal_Rswrite(struct _marshal_ctx *ctx, struct lib9p_msg_Rswrite *
struct _vtable_version _lib9p_vtables[LIB9P_VER_NUM] = {
[LIB9P_VER_UNINITIALIZED] = { .msgs = {
[LIB9P_TYP_Tversion] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Tversion),
- r.unmarshal_extrasize = checksize_Tversion,
- r.unmarshal = unmarshal_Tversion,
- r.marshal = (_marshal_fn_t)marshal_Tversion,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Tversion),
+ .unmarshal_extrasize = checksize_Tversion,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Tversion,
+ .marshal = (_marshal_fn_t)marshal_Tversion,
},
[LIB9P_TYP_Rversion] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Rversion),
- r.unmarshal_extrasize = checksize_Rversion,
- r.unmarshal = unmarshal_Rversion,
- r.marshal = (_marshal_fn_t)marshal_Rversion,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Rversion),
+ .unmarshal_extrasize = checksize_Rversion,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Rversion,
+ .marshal = (_marshal_fn_t)marshal_Rversion,
},
}},
[LIB9P_VER_9P2000] = { .msgs = {
[LIB9P_TYP_Tversion] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Tversion),
- r.unmarshal_extrasize = checksize_Tversion,
- r.unmarshal = unmarshal_Tversion,
- r.marshal = (_marshal_fn_t)marshal_Tversion,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Tversion),
+ .unmarshal_extrasize = checksize_Tversion,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Tversion,
+ .marshal = (_marshal_fn_t)marshal_Tversion,
},
[LIB9P_TYP_Rversion] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Rversion),
- r.unmarshal_extrasize = checksize_Rversion,
- r.unmarshal = unmarshal_Rversion,
- r.marshal = (_marshal_fn_t)marshal_Rversion,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Rversion),
+ .unmarshal_extrasize = checksize_Rversion,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Rversion,
+ .marshal = (_marshal_fn_t)marshal_Rversion,
},
[LIB9P_TYP_Tauth] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Tauth),
- r.unmarshal_extrasize = checksize_Tauth,
- r.unmarshal = unmarshal_Tauth,
- r.marshal = (_marshal_fn_t)marshal_Tauth,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Tauth),
+ .unmarshal_extrasize = checksize_Tauth,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Tauth,
+ .marshal = (_marshal_fn_t)marshal_Tauth,
},
[LIB9P_TYP_Rauth] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Rauth),
- r.unmarshal_extrasize = checksize_Rauth,
- r.unmarshal = unmarshal_Rauth,
- r.marshal = (_marshal_fn_t)marshal_Rauth,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Rauth),
+ .unmarshal_extrasize = checksize_Rauth,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Rauth,
+ .marshal = (_marshal_fn_t)marshal_Rauth,
},
[LIB9P_TYP_Tattach] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Tattach),
- r.unmarshal_extrasize = checksize_Tattach,
- r.unmarshal = unmarshal_Tattach,
- r.marshal = (_marshal_fn_t)marshal_Tattach,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Tattach),
+ .unmarshal_extrasize = checksize_Tattach,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Tattach,
+ .marshal = (_marshal_fn_t)marshal_Tattach,
},
[LIB9P_TYP_Rattach] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Rattach),
- r.unmarshal_extrasize = checksize_Rattach,
- r.unmarshal = unmarshal_Rattach,
- r.marshal = (_marshal_fn_t)marshal_Rattach,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Rattach),
+ .unmarshal_extrasize = checksize_Rattach,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Rattach,
+ .marshal = (_marshal_fn_t)marshal_Rattach,
},
[LIB9P_TYP_Rerror] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Rerror),
- r.unmarshal_extrasize = checksize_Rerror,
- r.unmarshal = unmarshal_Rerror,
- r.marshal = (_marshal_fn_t)marshal_Rerror,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Rerror),
+ .unmarshal_extrasize = checksize_Rerror,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Rerror,
+ .marshal = (_marshal_fn_t)marshal_Rerror,
},
[LIB9P_TYP_Tflush] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Tflush),
- r.unmarshal_extrasize = checksize_Tflush,
- r.unmarshal = unmarshal_Tflush,
- r.marshal = (_marshal_fn_t)marshal_Tflush,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Tflush),
+ .unmarshal_extrasize = checksize_Tflush,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Tflush,
+ .marshal = (_marshal_fn_t)marshal_Tflush,
},
[LIB9P_TYP_Rflush] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Rflush),
- r.unmarshal_extrasize = checksize_Rflush,
- r.unmarshal = unmarshal_Rflush,
- r.marshal = (_marshal_fn_t)marshal_Rflush,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Rflush),
+ .unmarshal_extrasize = checksize_Rflush,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Rflush,
+ .marshal = (_marshal_fn_t)marshal_Rflush,
},
[LIB9P_TYP_Twalk] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Twalk),
- r.unmarshal_extrasize = checksize_Twalk,
- r.unmarshal = unmarshal_Twalk,
- r.marshal = (_marshal_fn_t)marshal_Twalk,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Twalk),
+ .unmarshal_extrasize = checksize_Twalk,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Twalk,
+ .marshal = (_marshal_fn_t)marshal_Twalk,
},
[LIB9P_TYP_Rwalk] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Rwalk),
- r.unmarshal_extrasize = checksize_Rwalk,
- r.unmarshal = unmarshal_Rwalk,
- r.marshal = (_marshal_fn_t)marshal_Rwalk,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Rwalk),
+ .unmarshal_extrasize = checksize_Rwalk,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Rwalk,
+ .marshal = (_marshal_fn_t)marshal_Rwalk,
},
[LIB9P_TYP_Topen] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Topen),
- r.unmarshal_extrasize = checksize_Topen,
- r.unmarshal = unmarshal_Topen,
- r.marshal = (_marshal_fn_t)marshal_Topen,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Topen),
+ .unmarshal_extrasize = checksize_Topen,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Topen,
+ .marshal = (_marshal_fn_t)marshal_Topen,
},
[LIB9P_TYP_Ropen] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Ropen),
- r.unmarshal_extrasize = checksize_Ropen,
- r.unmarshal = unmarshal_Ropen,
- r.marshal = (_marshal_fn_t)marshal_Ropen,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Ropen),
+ .unmarshal_extrasize = checksize_Ropen,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Ropen,
+ .marshal = (_marshal_fn_t)marshal_Ropen,
},
[LIB9P_TYP_Tcreate] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Tcreate),
- r.unmarshal_extrasize = checksize_Tcreate,
- r.unmarshal = unmarshal_Tcreate,
- r.marshal = (_marshal_fn_t)marshal_Tcreate,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Tcreate),
+ .unmarshal_extrasize = checksize_Tcreate,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Tcreate,
+ .marshal = (_marshal_fn_t)marshal_Tcreate,
},
[LIB9P_TYP_Rcreate] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Rcreate),
- r.unmarshal_extrasize = checksize_Rcreate,
- r.unmarshal = unmarshal_Rcreate,
- r.marshal = (_marshal_fn_t)marshal_Rcreate,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Rcreate),
+ .unmarshal_extrasize = checksize_Rcreate,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Rcreate,
+ .marshal = (_marshal_fn_t)marshal_Rcreate,
},
[LIB9P_TYP_Tread] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Tread),
- r.unmarshal_extrasize = checksize_Tread,
- r.unmarshal = unmarshal_Tread,
- r.marshal = (_marshal_fn_t)marshal_Tread,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Tread),
+ .unmarshal_extrasize = checksize_Tread,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Tread,
+ .marshal = (_marshal_fn_t)marshal_Tread,
},
[LIB9P_TYP_Rread] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Rread),
- r.unmarshal_extrasize = checksize_Rread,
- r.unmarshal = unmarshal_Rread,
- r.marshal = (_marshal_fn_t)marshal_Rread,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Rread),
+ .unmarshal_extrasize = checksize_Rread,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Rread,
+ .marshal = (_marshal_fn_t)marshal_Rread,
},
[LIB9P_TYP_Twrite] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Twrite),
- r.unmarshal_extrasize = checksize_Twrite,
- r.unmarshal = unmarshal_Twrite,
- r.marshal = (_marshal_fn_t)marshal_Twrite,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Twrite),
+ .unmarshal_extrasize = checksize_Twrite,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Twrite,
+ .marshal = (_marshal_fn_t)marshal_Twrite,
},
[LIB9P_TYP_Rwrite] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Rwrite),
- r.unmarshal_extrasize = checksize_Rwrite,
- r.unmarshal = unmarshal_Rwrite,
- r.marshal = (_marshal_fn_t)marshal_Rwrite,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Rwrite),
+ .unmarshal_extrasize = checksize_Rwrite,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Rwrite,
+ .marshal = (_marshal_fn_t)marshal_Rwrite,
},
[LIB9P_TYP_Tclunk] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Tclunk),
- r.unmarshal_extrasize = checksize_Tclunk,
- r.unmarshal = unmarshal_Tclunk,
- r.marshal = (_marshal_fn_t)marshal_Tclunk,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Tclunk),
+ .unmarshal_extrasize = checksize_Tclunk,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Tclunk,
+ .marshal = (_marshal_fn_t)marshal_Tclunk,
},
[LIB9P_TYP_Rclunk] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Rclunk),
- r.unmarshal_extrasize = checksize_Rclunk,
- r.unmarshal = unmarshal_Rclunk,
- r.marshal = (_marshal_fn_t)marshal_Rclunk,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Rclunk),
+ .unmarshal_extrasize = checksize_Rclunk,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Rclunk,
+ .marshal = (_marshal_fn_t)marshal_Rclunk,
},
[LIB9P_TYP_Tremove] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Tremove),
- r.unmarshal_extrasize = checksize_Tremove,
- r.unmarshal = unmarshal_Tremove,
- r.marshal = (_marshal_fn_t)marshal_Tremove,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Tremove),
+ .unmarshal_extrasize = checksize_Tremove,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Tremove,
+ .marshal = (_marshal_fn_t)marshal_Tremove,
},
[LIB9P_TYP_Rremove] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Rremove),
- r.unmarshal_extrasize = checksize_Rremove,
- r.unmarshal = unmarshal_Rremove,
- r.marshal = (_marshal_fn_t)marshal_Rremove,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Rremove),
+ .unmarshal_extrasize = checksize_Rremove,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Rremove,
+ .marshal = (_marshal_fn_t)marshal_Rremove,
},
[LIB9P_TYP_Tstat] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Tstat),
- r.unmarshal_extrasize = checksize_Tstat,
- r.unmarshal = unmarshal_Tstat,
- r.marshal = (_marshal_fn_t)marshal_Tstat,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Tstat),
+ .unmarshal_extrasize = checksize_Tstat,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Tstat,
+ .marshal = (_marshal_fn_t)marshal_Tstat,
},
[LIB9P_TYP_Rstat] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Rstat),
- r.unmarshal_extrasize = checksize_Rstat,
- r.unmarshal = unmarshal_Rstat,
- r.marshal = (_marshal_fn_t)marshal_Rstat,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Rstat),
+ .unmarshal_extrasize = checksize_Rstat,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Rstat,
+ .marshal = (_marshal_fn_t)marshal_Rstat,
},
[LIB9P_TYP_Twstat] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Twstat),
- r.unmarshal_extrasize = checksize_Twstat,
- r.unmarshal = unmarshal_Twstat,
- r.marshal = (_marshal_fn_t)marshal_Twstat,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Twstat),
+ .unmarshal_extrasize = checksize_Twstat,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Twstat,
+ .marshal = (_marshal_fn_t)marshal_Twstat,
},
[LIB9P_TYP_Rwstat] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Rwstat),
- r.unmarshal_extrasize = checksize_Rwstat,
- r.unmarshal = unmarshal_Rwstat,
- r.marshal = (_marshal_fn_t)marshal_Rwstat,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Rwstat),
+ .unmarshal_extrasize = checksize_Rwstat,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Rwstat,
+ .marshal = (_marshal_fn_t)marshal_Rwstat,
},
}},
[LIB9P_VER_9P2000_e] = { .msgs = {
[LIB9P_TYP_Tversion] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Tversion),
- r.unmarshal_extrasize = checksize_Tversion,
- r.unmarshal = unmarshal_Tversion,
- r.marshal = (_marshal_fn_t)marshal_Tversion,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Tversion),
+ .unmarshal_extrasize = checksize_Tversion,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Tversion,
+ .marshal = (_marshal_fn_t)marshal_Tversion,
},
[LIB9P_TYP_Rversion] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Rversion),
- r.unmarshal_extrasize = checksize_Rversion,
- r.unmarshal = unmarshal_Rversion,
- r.marshal = (_marshal_fn_t)marshal_Rversion,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Rversion),
+ .unmarshal_extrasize = checksize_Rversion,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Rversion,
+ .marshal = (_marshal_fn_t)marshal_Rversion,
},
[LIB9P_TYP_Tauth] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Tauth),
- r.unmarshal_extrasize = checksize_Tauth,
- r.unmarshal = unmarshal_Tauth,
- r.marshal = (_marshal_fn_t)marshal_Tauth,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Tauth),
+ .unmarshal_extrasize = checksize_Tauth,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Tauth,
+ .marshal = (_marshal_fn_t)marshal_Tauth,
},
[LIB9P_TYP_Rauth] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Rauth),
- r.unmarshal_extrasize = checksize_Rauth,
- r.unmarshal = unmarshal_Rauth,
- r.marshal = (_marshal_fn_t)marshal_Rauth,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Rauth),
+ .unmarshal_extrasize = checksize_Rauth,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Rauth,
+ .marshal = (_marshal_fn_t)marshal_Rauth,
},
[LIB9P_TYP_Tattach] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Tattach),
- r.unmarshal_extrasize = checksize_Tattach,
- r.unmarshal = unmarshal_Tattach,
- r.marshal = (_marshal_fn_t)marshal_Tattach,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Tattach),
+ .unmarshal_extrasize = checksize_Tattach,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Tattach,
+ .marshal = (_marshal_fn_t)marshal_Tattach,
},
[LIB9P_TYP_Rattach] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Rattach),
- r.unmarshal_extrasize = checksize_Rattach,
- r.unmarshal = unmarshal_Rattach,
- r.marshal = (_marshal_fn_t)marshal_Rattach,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Rattach),
+ .unmarshal_extrasize = checksize_Rattach,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Rattach,
+ .marshal = (_marshal_fn_t)marshal_Rattach,
},
[LIB9P_TYP_Rerror] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Rerror),
- r.unmarshal_extrasize = checksize_Rerror,
- r.unmarshal = unmarshal_Rerror,
- r.marshal = (_marshal_fn_t)marshal_Rerror,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Rerror),
+ .unmarshal_extrasize = checksize_Rerror,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Rerror,
+ .marshal = (_marshal_fn_t)marshal_Rerror,
},
[LIB9P_TYP_Tflush] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Tflush),
- r.unmarshal_extrasize = checksize_Tflush,
- r.unmarshal = unmarshal_Tflush,
- r.marshal = (_marshal_fn_t)marshal_Tflush,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Tflush),
+ .unmarshal_extrasize = checksize_Tflush,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Tflush,
+ .marshal = (_marshal_fn_t)marshal_Tflush,
},
[LIB9P_TYP_Rflush] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Rflush),
- r.unmarshal_extrasize = checksize_Rflush,
- r.unmarshal = unmarshal_Rflush,
- r.marshal = (_marshal_fn_t)marshal_Rflush,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Rflush),
+ .unmarshal_extrasize = checksize_Rflush,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Rflush,
+ .marshal = (_marshal_fn_t)marshal_Rflush,
},
[LIB9P_TYP_Twalk] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Twalk),
- r.unmarshal_extrasize = checksize_Twalk,
- r.unmarshal = unmarshal_Twalk,
- r.marshal = (_marshal_fn_t)marshal_Twalk,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Twalk),
+ .unmarshal_extrasize = checksize_Twalk,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Twalk,
+ .marshal = (_marshal_fn_t)marshal_Twalk,
},
[LIB9P_TYP_Rwalk] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Rwalk),
- r.unmarshal_extrasize = checksize_Rwalk,
- r.unmarshal = unmarshal_Rwalk,
- r.marshal = (_marshal_fn_t)marshal_Rwalk,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Rwalk),
+ .unmarshal_extrasize = checksize_Rwalk,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Rwalk,
+ .marshal = (_marshal_fn_t)marshal_Rwalk,
},
[LIB9P_TYP_Topen] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Topen),
- r.unmarshal_extrasize = checksize_Topen,
- r.unmarshal = unmarshal_Topen,
- r.marshal = (_marshal_fn_t)marshal_Topen,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Topen),
+ .unmarshal_extrasize = checksize_Topen,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Topen,
+ .marshal = (_marshal_fn_t)marshal_Topen,
},
[LIB9P_TYP_Ropen] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Ropen),
- r.unmarshal_extrasize = checksize_Ropen,
- r.unmarshal = unmarshal_Ropen,
- r.marshal = (_marshal_fn_t)marshal_Ropen,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Ropen),
+ .unmarshal_extrasize = checksize_Ropen,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Ropen,
+ .marshal = (_marshal_fn_t)marshal_Ropen,
},
[LIB9P_TYP_Tcreate] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Tcreate),
- r.unmarshal_extrasize = checksize_Tcreate,
- r.unmarshal = unmarshal_Tcreate,
- r.marshal = (_marshal_fn_t)marshal_Tcreate,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Tcreate),
+ .unmarshal_extrasize = checksize_Tcreate,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Tcreate,
+ .marshal = (_marshal_fn_t)marshal_Tcreate,
},
[LIB9P_TYP_Rcreate] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Rcreate),
- r.unmarshal_extrasize = checksize_Rcreate,
- r.unmarshal = unmarshal_Rcreate,
- r.marshal = (_marshal_fn_t)marshal_Rcreate,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Rcreate),
+ .unmarshal_extrasize = checksize_Rcreate,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Rcreate,
+ .marshal = (_marshal_fn_t)marshal_Rcreate,
},
[LIB9P_TYP_Tread] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Tread),
- r.unmarshal_extrasize = checksize_Tread,
- r.unmarshal = unmarshal_Tread,
- r.marshal = (_marshal_fn_t)marshal_Tread,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Tread),
+ .unmarshal_extrasize = checksize_Tread,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Tread,
+ .marshal = (_marshal_fn_t)marshal_Tread,
},
[LIB9P_TYP_Rread] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Rread),
- r.unmarshal_extrasize = checksize_Rread,
- r.unmarshal = unmarshal_Rread,
- r.marshal = (_marshal_fn_t)marshal_Rread,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Rread),
+ .unmarshal_extrasize = checksize_Rread,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Rread,
+ .marshal = (_marshal_fn_t)marshal_Rread,
},
[LIB9P_TYP_Twrite] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Twrite),
- r.unmarshal_extrasize = checksize_Twrite,
- r.unmarshal = unmarshal_Twrite,
- r.marshal = (_marshal_fn_t)marshal_Twrite,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Twrite),
+ .unmarshal_extrasize = checksize_Twrite,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Twrite,
+ .marshal = (_marshal_fn_t)marshal_Twrite,
},
[LIB9P_TYP_Rwrite] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Rwrite),
- r.unmarshal_extrasize = checksize_Rwrite,
- r.unmarshal = unmarshal_Rwrite,
- r.marshal = (_marshal_fn_t)marshal_Rwrite,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Rwrite),
+ .unmarshal_extrasize = checksize_Rwrite,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Rwrite,
+ .marshal = (_marshal_fn_t)marshal_Rwrite,
},
[LIB9P_TYP_Tclunk] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Tclunk),
- r.unmarshal_extrasize = checksize_Tclunk,
- r.unmarshal = unmarshal_Tclunk,
- r.marshal = (_marshal_fn_t)marshal_Tclunk,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Tclunk),
+ .unmarshal_extrasize = checksize_Tclunk,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Tclunk,
+ .marshal = (_marshal_fn_t)marshal_Tclunk,
},
[LIB9P_TYP_Rclunk] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Rclunk),
- r.unmarshal_extrasize = checksize_Rclunk,
- r.unmarshal = unmarshal_Rclunk,
- r.marshal = (_marshal_fn_t)marshal_Rclunk,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Rclunk),
+ .unmarshal_extrasize = checksize_Rclunk,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Rclunk,
+ .marshal = (_marshal_fn_t)marshal_Rclunk,
},
[LIB9P_TYP_Tremove] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Tremove),
- r.unmarshal_extrasize = checksize_Tremove,
- r.unmarshal = unmarshal_Tremove,
- r.marshal = (_marshal_fn_t)marshal_Tremove,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Tremove),
+ .unmarshal_extrasize = checksize_Tremove,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Tremove,
+ .marshal = (_marshal_fn_t)marshal_Tremove,
},
[LIB9P_TYP_Rremove] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Rremove),
- r.unmarshal_extrasize = checksize_Rremove,
- r.unmarshal = unmarshal_Rremove,
- r.marshal = (_marshal_fn_t)marshal_Rremove,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Rremove),
+ .unmarshal_extrasize = checksize_Rremove,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Rremove,
+ .marshal = (_marshal_fn_t)marshal_Rremove,
},
[LIB9P_TYP_Tstat] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Tstat),
- r.unmarshal_extrasize = checksize_Tstat,
- r.unmarshal = unmarshal_Tstat,
- r.marshal = (_marshal_fn_t)marshal_Tstat,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Tstat),
+ .unmarshal_extrasize = checksize_Tstat,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Tstat,
+ .marshal = (_marshal_fn_t)marshal_Tstat,
},
[LIB9P_TYP_Rstat] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Rstat),
- r.unmarshal_extrasize = checksize_Rstat,
- r.unmarshal = unmarshal_Rstat,
- r.marshal = (_marshal_fn_t)marshal_Rstat,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Rstat),
+ .unmarshal_extrasize = checksize_Rstat,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Rstat,
+ .marshal = (_marshal_fn_t)marshal_Rstat,
},
[LIB9P_TYP_Twstat] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Twstat),
- r.unmarshal_extrasize = checksize_Twstat,
- r.unmarshal = unmarshal_Twstat,
- r.marshal = (_marshal_fn_t)marshal_Twstat,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Twstat),
+ .unmarshal_extrasize = checksize_Twstat,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Twstat,
+ .marshal = (_marshal_fn_t)marshal_Twstat,
},
[LIB9P_TYP_Rwstat] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Rwstat),
- r.unmarshal_extrasize = checksize_Rwstat,
- r.unmarshal = unmarshal_Rwstat,
- r.marshal = (_marshal_fn_t)marshal_Rwstat,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Rwstat),
+ .unmarshal_extrasize = checksize_Rwstat,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Rwstat,
+ .marshal = (_marshal_fn_t)marshal_Rwstat,
},
[LIB9P_TYP_Tsession] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Tsession),
- r.unmarshal_extrasize = checksize_Tsession,
- r.unmarshal = unmarshal_Tsession,
- r.marshal = (_marshal_fn_t)marshal_Tsession,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Tsession),
+ .unmarshal_extrasize = checksize_Tsession,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Tsession,
+ .marshal = (_marshal_fn_t)marshal_Tsession,
},
[LIB9P_TYP_Rsession] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Rsession),
- r.unmarshal_extrasize = checksize_Rsession,
- r.unmarshal = unmarshal_Rsession,
- r.marshal = (_marshal_fn_t)marshal_Rsession,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Rsession),
+ .unmarshal_extrasize = checksize_Rsession,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Rsession,
+ .marshal = (_marshal_fn_t)marshal_Rsession,
},
[LIB9P_TYP_Tsread] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Tsread),
- r.unmarshal_extrasize = checksize_Tsread,
- r.unmarshal = unmarshal_Tsread,
- r.marshal = (_marshal_fn_t)marshal_Tsread,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Tsread),
+ .unmarshal_extrasize = checksize_Tsread,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Tsread,
+ .marshal = (_marshal_fn_t)marshal_Tsread,
},
[LIB9P_TYP_Rsread] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Rsread),
- r.unmarshal_extrasize = checksize_Rsread,
- r.unmarshal = unmarshal_Rsread,
- r.marshal = (_marshal_fn_t)marshal_Rsread,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Rsread),
+ .unmarshal_extrasize = checksize_Rsread,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Rsread,
+ .marshal = (_marshal_fn_t)marshal_Rsread,
},
[LIB9P_TYP_Tswrite] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Tswrite),
- r.unmarshal_extrasize = checksize_Tswrite,
- r.unmarshal = unmarshal_Tswrite,
- r.marshal = (_marshal_fn_t)marshal_Tswrite,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Tswrite),
+ .unmarshal_extrasize = checksize_Tswrite,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Tswrite,
+ .marshal = (_marshal_fn_t)marshal_Tswrite,
},
[LIB9P_TYP_Rswrite] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Rswrite),
- r.unmarshal_extrasize = checksize_Rswrite,
- r.unmarshal = unmarshal_Rswrite,
- r.marshal = (_marshal_fn_t)marshal_Rswrite,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Rswrite),
+ .unmarshal_extrasize = checksize_Rswrite,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Rswrite,
+ .marshal = (_marshal_fn_t)marshal_Rswrite,
},
}},
[LIB9P_VER_9P2000_u] = { .msgs = {
[LIB9P_TYP_Tversion] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Tversion),
- r.unmarshal_extrasize = checksize_Tversion,
- r.unmarshal = unmarshal_Tversion,
- r.marshal = (_marshal_fn_t)marshal_Tversion,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Tversion),
+ .unmarshal_extrasize = checksize_Tversion,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Tversion,
+ .marshal = (_marshal_fn_t)marshal_Tversion,
},
[LIB9P_TYP_Rversion] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Rversion),
- r.unmarshal_extrasize = checksize_Rversion,
- r.unmarshal = unmarshal_Rversion,
- r.marshal = (_marshal_fn_t)marshal_Rversion,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Rversion),
+ .unmarshal_extrasize = checksize_Rversion,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Rversion,
+ .marshal = (_marshal_fn_t)marshal_Rversion,
},
[LIB9P_TYP_Tauth] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Tauth),
- r.unmarshal_extrasize = checksize_Tauth,
- r.unmarshal = unmarshal_Tauth,
- r.marshal = (_marshal_fn_t)marshal_Tauth,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Tauth),
+ .unmarshal_extrasize = checksize_Tauth,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Tauth,
+ .marshal = (_marshal_fn_t)marshal_Tauth,
},
[LIB9P_TYP_Rauth] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Rauth),
- r.unmarshal_extrasize = checksize_Rauth,
- r.unmarshal = unmarshal_Rauth,
- r.marshal = (_marshal_fn_t)marshal_Rauth,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Rauth),
+ .unmarshal_extrasize = checksize_Rauth,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Rauth,
+ .marshal = (_marshal_fn_t)marshal_Rauth,
},
[LIB9P_TYP_Tattach] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Tattach),
- r.unmarshal_extrasize = checksize_Tattach,
- r.unmarshal = unmarshal_Tattach,
- r.marshal = (_marshal_fn_t)marshal_Tattach,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Tattach),
+ .unmarshal_extrasize = checksize_Tattach,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Tattach,
+ .marshal = (_marshal_fn_t)marshal_Tattach,
},
[LIB9P_TYP_Rattach] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Rattach),
- r.unmarshal_extrasize = checksize_Rattach,
- r.unmarshal = unmarshal_Rattach,
- r.marshal = (_marshal_fn_t)marshal_Rattach,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Rattach),
+ .unmarshal_extrasize = checksize_Rattach,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Rattach,
+ .marshal = (_marshal_fn_t)marshal_Rattach,
},
[LIB9P_TYP_Rerror] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Rerror),
- r.unmarshal_extrasize = checksize_Rerror,
- r.unmarshal = unmarshal_Rerror,
- r.marshal = (_marshal_fn_t)marshal_Rerror,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Rerror),
+ .unmarshal_extrasize = checksize_Rerror,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Rerror,
+ .marshal = (_marshal_fn_t)marshal_Rerror,
},
[LIB9P_TYP_Tflush] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Tflush),
- r.unmarshal_extrasize = checksize_Tflush,
- r.unmarshal = unmarshal_Tflush,
- r.marshal = (_marshal_fn_t)marshal_Tflush,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Tflush),
+ .unmarshal_extrasize = checksize_Tflush,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Tflush,
+ .marshal = (_marshal_fn_t)marshal_Tflush,
},
[LIB9P_TYP_Rflush] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Rflush),
- r.unmarshal_extrasize = checksize_Rflush,
- r.unmarshal = unmarshal_Rflush,
- r.marshal = (_marshal_fn_t)marshal_Rflush,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Rflush),
+ .unmarshal_extrasize = checksize_Rflush,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Rflush,
+ .marshal = (_marshal_fn_t)marshal_Rflush,
},
[LIB9P_TYP_Twalk] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Twalk),
- r.unmarshal_extrasize = checksize_Twalk,
- r.unmarshal = unmarshal_Twalk,
- r.marshal = (_marshal_fn_t)marshal_Twalk,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Twalk),
+ .unmarshal_extrasize = checksize_Twalk,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Twalk,
+ .marshal = (_marshal_fn_t)marshal_Twalk,
},
[LIB9P_TYP_Rwalk] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Rwalk),
- r.unmarshal_extrasize = checksize_Rwalk,
- r.unmarshal = unmarshal_Rwalk,
- r.marshal = (_marshal_fn_t)marshal_Rwalk,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Rwalk),
+ .unmarshal_extrasize = checksize_Rwalk,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Rwalk,
+ .marshal = (_marshal_fn_t)marshal_Rwalk,
},
[LIB9P_TYP_Topen] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Topen),
- r.unmarshal_extrasize = checksize_Topen,
- r.unmarshal = unmarshal_Topen,
- r.marshal = (_marshal_fn_t)marshal_Topen,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Topen),
+ .unmarshal_extrasize = checksize_Topen,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Topen,
+ .marshal = (_marshal_fn_t)marshal_Topen,
},
[LIB9P_TYP_Ropen] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Ropen),
- r.unmarshal_extrasize = checksize_Ropen,
- r.unmarshal = unmarshal_Ropen,
- r.marshal = (_marshal_fn_t)marshal_Ropen,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Ropen),
+ .unmarshal_extrasize = checksize_Ropen,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Ropen,
+ .marshal = (_marshal_fn_t)marshal_Ropen,
},
[LIB9P_TYP_Tcreate] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Tcreate),
- r.unmarshal_extrasize = checksize_Tcreate,
- r.unmarshal = unmarshal_Tcreate,
- r.marshal = (_marshal_fn_t)marshal_Tcreate,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Tcreate),
+ .unmarshal_extrasize = checksize_Tcreate,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Tcreate,
+ .marshal = (_marshal_fn_t)marshal_Tcreate,
},
[LIB9P_TYP_Rcreate] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Rcreate),
- r.unmarshal_extrasize = checksize_Rcreate,
- r.unmarshal = unmarshal_Rcreate,
- r.marshal = (_marshal_fn_t)marshal_Rcreate,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Rcreate),
+ .unmarshal_extrasize = checksize_Rcreate,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Rcreate,
+ .marshal = (_marshal_fn_t)marshal_Rcreate,
},
[LIB9P_TYP_Tread] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Tread),
- r.unmarshal_extrasize = checksize_Tread,
- r.unmarshal = unmarshal_Tread,
- r.marshal = (_marshal_fn_t)marshal_Tread,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Tread),
+ .unmarshal_extrasize = checksize_Tread,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Tread,
+ .marshal = (_marshal_fn_t)marshal_Tread,
},
[LIB9P_TYP_Rread] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Rread),
- r.unmarshal_extrasize = checksize_Rread,
- r.unmarshal = unmarshal_Rread,
- r.marshal = (_marshal_fn_t)marshal_Rread,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Rread),
+ .unmarshal_extrasize = checksize_Rread,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Rread,
+ .marshal = (_marshal_fn_t)marshal_Rread,
},
[LIB9P_TYP_Twrite] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Twrite),
- r.unmarshal_extrasize = checksize_Twrite,
- r.unmarshal = unmarshal_Twrite,
- r.marshal = (_marshal_fn_t)marshal_Twrite,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Twrite),
+ .unmarshal_extrasize = checksize_Twrite,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Twrite,
+ .marshal = (_marshal_fn_t)marshal_Twrite,
},
[LIB9P_TYP_Rwrite] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Rwrite),
- r.unmarshal_extrasize = checksize_Rwrite,
- r.unmarshal = unmarshal_Rwrite,
- r.marshal = (_marshal_fn_t)marshal_Rwrite,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Rwrite),
+ .unmarshal_extrasize = checksize_Rwrite,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Rwrite,
+ .marshal = (_marshal_fn_t)marshal_Rwrite,
},
[LIB9P_TYP_Tclunk] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Tclunk),
- r.unmarshal_extrasize = checksize_Tclunk,
- r.unmarshal = unmarshal_Tclunk,
- r.marshal = (_marshal_fn_t)marshal_Tclunk,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Tclunk),
+ .unmarshal_extrasize = checksize_Tclunk,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Tclunk,
+ .marshal = (_marshal_fn_t)marshal_Tclunk,
},
[LIB9P_TYP_Rclunk] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Rclunk),
- r.unmarshal_extrasize = checksize_Rclunk,
- r.unmarshal = unmarshal_Rclunk,
- r.marshal = (_marshal_fn_t)marshal_Rclunk,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Rclunk),
+ .unmarshal_extrasize = checksize_Rclunk,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Rclunk,
+ .marshal = (_marshal_fn_t)marshal_Rclunk,
},
[LIB9P_TYP_Tremove] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Tremove),
- r.unmarshal_extrasize = checksize_Tremove,
- r.unmarshal = unmarshal_Tremove,
- r.marshal = (_marshal_fn_t)marshal_Tremove,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Tremove),
+ .unmarshal_extrasize = checksize_Tremove,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Tremove,
+ .marshal = (_marshal_fn_t)marshal_Tremove,
},
[LIB9P_TYP_Rremove] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Rremove),
- r.unmarshal_extrasize = checksize_Rremove,
- r.unmarshal = unmarshal_Rremove,
- r.marshal = (_marshal_fn_t)marshal_Rremove,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Rremove),
+ .unmarshal_extrasize = checksize_Rremove,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Rremove,
+ .marshal = (_marshal_fn_t)marshal_Rremove,
},
[LIB9P_TYP_Tstat] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Tstat),
- r.unmarshal_extrasize = checksize_Tstat,
- r.unmarshal = unmarshal_Tstat,
- r.marshal = (_marshal_fn_t)marshal_Tstat,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Tstat),
+ .unmarshal_extrasize = checksize_Tstat,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Tstat,
+ .marshal = (_marshal_fn_t)marshal_Tstat,
},
[LIB9P_TYP_Rstat] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Rstat),
- r.unmarshal_extrasize = checksize_Rstat,
- r.unmarshal = unmarshal_Rstat,
- r.marshal = (_marshal_fn_t)marshal_Rstat,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Rstat),
+ .unmarshal_extrasize = checksize_Rstat,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Rstat,
+ .marshal = (_marshal_fn_t)marshal_Rstat,
},
[LIB9P_TYP_Twstat] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Twstat),
- r.unmarshal_extrasize = checksize_Twstat,
- r.unmarshal = unmarshal_Twstat,
- r.marshal = (_marshal_fn_t)marshal_Twstat,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Twstat),
+ .unmarshal_extrasize = checksize_Twstat,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Twstat,
+ .marshal = (_marshal_fn_t)marshal_Twstat,
},
[LIB9P_TYP_Rwstat] = {
- r.unmarshal_basesize = sizeof(struct lib9p_msg_Rwstat),
- r.unmarshal_extrasize = checksize_Rwstat,
- r.unmarshal = unmarshal_Rwstat,
- r.marshal = (_marshal_fn_t)marshal_Rwstat,
+ .unmarshal_basesize = sizeof(struct lib9p_msg_Rwstat),
+ .unmarshal_extrasize = checksize_Rwstat,
+ .unmarshal = (_unmarshal_fn_t)unmarshal_Rwstat,
+ .marshal = (_marshal_fn_t)marshal_Rwstat,
},
}},
};