aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/9p/transport.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/9p/transport.h')
-rw-r--r--include/net/9p/transport.h25
1 files changed, 15 insertions, 10 deletions
diff --git a/include/net/9p/transport.h b/include/net/9p/transport.h
index 462d42279fb0..7c68b3e8e78c 100644
--- a/include/net/9p/transport.h
+++ b/include/net/9p/transport.h
@@ -26,24 +26,29 @@
26#ifndef NET_9P_TRANSPORT_H 26#ifndef NET_9P_TRANSPORT_H
27#define NET_9P_TRANSPORT_H 27#define NET_9P_TRANSPORT_H
28 28
29enum p9_transport_status { 29enum p9_trans_status {
30 Connected, 30 Connected,
31 Disconnected, 31 Disconnected,
32 Hung, 32 Hung,
33}; 33};
34 34
35struct p9_transport { 35struct p9_trans {
36 enum p9_transport_status status; 36 enum p9_trans_status status;
37 void *priv; 37 void *priv;
38 int (*write) (struct p9_trans *, void *, int);
39 int (*read) (struct p9_trans *, void *, int);
40 void (*close) (struct p9_trans *);
41 unsigned int (*poll)(struct p9_trans *, struct poll_table_struct *);
42};
38 43
39 int (*write) (struct p9_transport *, void *, int); 44struct p9_trans_module {
40 int (*read) (struct p9_transport *, void *, int); 45 struct list_head list;
41 void (*close) (struct p9_transport *); 46 char *name; /* name of transport */
42 unsigned int (*poll)(struct p9_transport *, struct poll_table_struct *); 47 int maxsize; /* max message size of transport */
48 int def; /* this transport should be default */
49 struct p9_trans * (*create)(const char *devname, char *options);
43}; 50};
44 51
45struct p9_transport *p9_trans_create_tcp(const char *addr, int port); 52void v9fs_register_trans(struct p9_trans_module *m);
46struct p9_transport *p9_trans_create_unix(const char *addr);
47struct p9_transport *p9_trans_create_fd(int rfd, int wfd);
48 53
49#endif /* NET_9P_TRANSPORT_H */ 54#endif /* NET_9P_TRANSPORT_H */