aboutsummaryrefslogtreecommitdiff
path: root/include/net/9p/transport.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-17 15:05:58 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-17 15:05:58 -0700
commit9d8190f87b5458160ba75d05e8ad6abefbe48a26 (patch)
tree7abeb91aa2a40b91004f53520b7bf1f2c80aab7e /include/net/9p/transport.h
parentc2f73fd07d2ce4605b404f34395eb734a7ba9967 (diff)
parent982c37cfb6e61c0e64634abc2e305d757c1405b2 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs: 9p: remove sysctl 9p: fix bad kconfig cross-dependency 9p: soften invalidation in loose_mode 9p: attach-per-user 9p: rename uid and gid parameters 9p: define session flags 9p: Make transports dynamic
Diffstat (limited to 'include/net/9p/transport.h')
-rw-r--r--include/net/9p/transport.h27
1 files changed, 17 insertions, 10 deletions
diff --git a/include/net/9p/transport.h b/include/net/9p/transport.h
index 462d42279fb..9dd4a05619a 100644
--- a/include/net/9p/transport.h
+++ b/include/net/9p/transport.h
@@ -26,24 +26,31 @@
#ifndef NET_9P_TRANSPORT_H
#define NET_9P_TRANSPORT_H
-enum p9_transport_status {
+enum p9_trans_status {
Connected,
Disconnected,
Hung,
};
-struct p9_transport {
- enum p9_transport_status status;
+struct p9_trans {
+ enum p9_trans_status status;
void *priv;
+ int (*write) (struct p9_trans *, void *, int);
+ int (*read) (struct p9_trans *, void *, int);
+ void (*close) (struct p9_trans *);
+ unsigned int (*poll)(struct p9_trans *, struct poll_table_struct *);
+};
- int (*write) (struct p9_transport *, void *, int);
- int (*read) (struct p9_transport *, void *, int);
- void (*close) (struct p9_transport *);
- unsigned int (*poll)(struct p9_transport *, struct poll_table_struct *);
+struct p9_trans_module {
+ struct list_head list;
+ char *name; /* name of transport */
+ int maxsize; /* max message size of transport */
+ int def; /* this transport should be default */
+ struct p9_trans * (*create)(const char *devname, char *options);
};
-struct p9_transport *p9_trans_create_tcp(const char *addr, int port);
-struct p9_transport *p9_trans_create_unix(const char *addr);
-struct p9_transport *p9_trans_create_fd(int rfd, int wfd);
+void v9fs_register_trans(struct p9_trans_module *m);
+struct p9_trans_module *v9fs_match_trans(const substring_t *name);
+struct p9_trans_module *v9fs_default_trans(void);
#endif /* NET_9P_TRANSPORT_H */