9p: in-kernel server basic support
Subsystems (3)
Latchesar Ionkov
maintainerPATCH 6/10 9p: in-kernel server basic support
This patch implements the basic functionality required for implementing in-kernel 9P file servers.
Signed-off-by Latchesar Ionkov <[email protected]>
--- include/net/9p/9p.h | 2 + include/net/9p/srv.h | 169 +++++++ net/9p/Kconfig | 5 + net/9p/Makefile | 4 + net/9p/fcprint.c | 2 + net/9p/srv.c | 1283 ++++++++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 1465 insertions(+), 0 deletions(-)
include/net/9p/9p.h +2 -0
@@ -65,6 +65,7 @@ do { \/* Message Types */ enum { +P9_FIRST =100 ,P9_TVERSION =100 ,P9_RVERSION ,P9_TAUTH =102 ,
@@ -93,6 +94,7 @@ enum {P9_RSTAT ,P9_TWSTAT =126 ,P9_RWSTAT , + P9_LAST, };/* open modes */
include/net/9p/srv.h new file +169 -0
169 lines not on this page · raw message
net/9p/Kconfig +5 -0
@@ -23,6 +23,11 @@ config NET_9P_FD file descriptors. TCP/IP is the default transport for 9p, so if you are going to use 9p, you'll likely want this. +config NET_9P_SRV + tristate "9P server support" + depends on NET_9P + help + Say Y if you want the 9P server support config NET_9P_VIRTIO depends on NET_9P && EXPERIMENTAL && VIRTIO tristate "9P Virtio Transport (Experimental)"
net/9p/Makefile +4 -0
@@ -1,5 +1,6 @@ obj-$(CONFIG_NET_9P) := 9pnet.o obj-$(CONFIG_NET_9P_FD) += 9pnet_fd.o +obj-$(CONFIG_NET_9P_SRV) += 9psrv.o obj-$(CONFIG_NET_9P_VIRTIO) += 9pnet_virtio.o 9pnet-objs := \
@@ -10,6 +11,9 @@ obj-$(CONFIG_NET_9P_VIRTIO) += 9pnet_virtio.o fcprint.o \ util.o \ +9psrv-objs := \ + srv.o \ + 9pnet_fd-objs := \ mux.o \
net/9p/fcprint.c +2 -0
@@ -347,8 +347,10 @@ p9_printfcall(char *buf, int buflen, struct p9_fcall *fc, int extended) return ret; } +EXPORT_SYMBOL (p9_printfcall);#else +int p9_printfcall (char *buf,int buflen,struct p9_fcall *fc,int extended) {
net/9p/srv.c new file +1283 -0
1,283 lines not on this page · raw message