Skip to content

Commit

Permalink
9p: add new protocol support code
Browse files Browse the repository at this point in the history
This adds a new protocol processing support code based on Anthony Liguori's
9p library code.  This code performs protocol marshalling/unmarshalling using
printf like strings to represent protocol elements.  It is my intent to use
them to replace the current functions in conv.c as well as the 
p9_create_* functions.

This should make the client implementation much more clear, and also make it
much easier to add new protocol extensions by limiting the number of places
in which changes need to be made.

Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
  • Loading branch information
Eric Van Hensbergen committed Oct 17, 2008
1 parent 6936bf6 commit ace51c4
Show file tree
Hide file tree
Showing 4 changed files with 496 additions and 1 deletion.
8 changes: 7 additions & 1 deletion include/net/9p/9p.h
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,8 @@ struct p9_rwstat {
* @size: prefixed length of the structure
* @id: protocol operating identifier of type &p9_msg_t
* @tag: transaction id of the request
* @offset: used by marshalling routines to track currentposition in buffer
* @capacity: used by marshalling routines to track total capacity
* @sdata: payload
* @params: per-operation parameters
*
Expand All @@ -523,7 +525,11 @@ struct p9_fcall {
u32 size;
u8 id;
u16 tag;
void *sdata;

size_t offset;
size_t capacity;

uint8_t *sdata;

union {
struct p9_tversion tversion;
Expand Down
1 change: 1 addition & 0 deletions net/9p/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ obj-$(CONFIG_NET_9P_VIRTIO) += 9pnet_virtio.o
error.o \
fcprint.o \
util.o \
protocol.o \
trans_fd.o \

9pnet_virtio-objs := \
Expand Down
Loading

0 comments on commit ace51c4

Please sign in to comment.