aboutsummaryrefslogtreecommitdiff
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.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 */