0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef NET_9P_TRANSPORT_H
0010 #define NET_9P_TRANSPORT_H
0011
0012 #include <linux/module.h>
0013
0014 #define P9_DEF_MIN_RESVPORT (665U)
0015 #define P9_DEF_MAX_RESVPORT (1023U)
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037 struct p9_trans_module {
0038 struct list_head list;
0039 char *name;
0040 int maxsize;
0041 int def;
0042 struct module *owner;
0043 int (*create)(struct p9_client *client,
0044 const char *devname, char *args);
0045 void (*close)(struct p9_client *client);
0046 int (*request)(struct p9_client *client, struct p9_req_t *req);
0047 int (*cancel)(struct p9_client *client, struct p9_req_t *req);
0048 int (*cancelled)(struct p9_client *client, struct p9_req_t *req);
0049 int (*zc_request)(struct p9_client *client, struct p9_req_t *req,
0050 struct iov_iter *uidata, struct iov_iter *uodata,
0051 int inlen, int outlen, int in_hdr_len);
0052 int (*show_options)(struct seq_file *m, struct p9_client *client);
0053 };
0054
0055 void v9fs_register_trans(struct p9_trans_module *m);
0056 void v9fs_unregister_trans(struct p9_trans_module *m);
0057 struct p9_trans_module *v9fs_get_trans_by_name(const char *s);
0058 struct p9_trans_module *v9fs_get_default_trans(void);
0059 void v9fs_put_trans(struct p9_trans_module *m);
0060
0061 #define MODULE_ALIAS_9P(transport) \
0062 MODULE_ALIAS("9p-" transport)
0063
0064 #endif