9p: marshalling changes for in-kernel server
Subsystems (3)
Latchesar Ionkov
maintainerPATCH 5/10 9p: marshalling changes for in-kernel server
This patch implements serialization/deserialization for the server-side 9P messages.
Signed-off-by Latchesar Ionkov <[email protected]>
--- include/net/9p/9p.h | 16 ++ net/9p/conv.c | 457 +++++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 462 insertions(+), 11 deletions(-)
include/net/9p/9p.h +16 -0
@@ -379,6 +379,7 @@ struct p9_fcall {struct p9_idpool ;extern struct kset p9_subsys; +int p9_serialize_stat (struct p9_wstat *wstat,u8 *buf,int buflen,int dotu);int p9_deserialize_stat (void *buf,u32 buflen,struct p9_stat *stat,int dotu);int p9_deserialize_fcall (struct p9_fcall *fc,int dotu);
@@ -407,6 +408,21 @@ struct p9_fcall *p9_create_tremove(u32 fid);struct p9_fcall *p9_create_tstat (u32 fid);struct p9_fcall *p9_create_twstat (u32 fid,struct p9_wstat *wstat,int dotu); +int p9_create_rversion (struct p9_fcall *,u32 msize,char *version); +int p9_create_rattach (struct p9_fcall *,struct p9_qid *qid); +int p9_create_rerror (struct p9_fcall *,char *ename,u32 ecode,int dotu); +int p9_create_rauth (struct p9_fcall *,struct p9_qid *qid); +int p9_create_rflush (struct p9_fcall *); +int p9_create_rwalk (struct p9_fcall *,int nwqid,struct p9_qid *wqids); +int p9_create_ropen (struct p9_fcall *,struct p9_qid *qid,u32 iounit); +int p9_create_rcreate (struct p9_fcall *,struct p9_qid *qid,u32 iounit); +int p9_init_rread (struct p9_fcall *fc); +void p9_set_rread_count (struct p9_fcall *fc,u32 count); +int p9_create_rwrite (struct p9_fcall *,u32 count); +int p9_create_rclunk (struct p9_fcall *); +int p9_create_rremove (struct p9_fcall *); +int p9_create_rstat (struct p9_fcall *,struct p9_wstat *st,int dotu); +int p9_create_rwstat (struct p9_fcall *);int p9_printfcall (char *buf,int buflen,struct p9_fcall *fc,int dotu);int p9_errstr2errno (char *errstr,int len);
net/9p/conv.c +446 -11
552 lines not on this page · raw message