[TCP]: Do not purge sk_forward_alloc entirely in tcp_delack_timer().
[cascardo/linux.git] / include / net / 9p / transport.h
index 462d422..9dd4a05 100644 (file)
 #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 */