Subversion Repositories shark

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
423 giacomo 1
#ifndef _LINUX_SUNRPC_RPC_PIPE_FS_H
2
#define _LINUX_SUNRPC_RPC_PIPE_FS_H
3
 
4
#ifdef __KERNEL__
5
 
6
struct rpc_pipe_msg {
7
        struct list_head list;
8
        void *data;
9
        size_t len;
10
        size_t copied;
11
        int errno;
12
};
13
 
14
struct rpc_pipe_ops {
15
        ssize_t (*upcall)(struct file *, struct rpc_pipe_msg *, char __user *, size_t);
16
        ssize_t (*downcall)(struct file *, const char __user *, size_t);
17
        void (*destroy_msg)(struct rpc_pipe_msg *);
18
};
19
 
20
struct rpc_inode {
21
        struct inode vfs_inode;
22
        void *private;
23
        struct list_head pipe;
24
        int pipelen;
25
        int nreaders;
26
        wait_queue_head_t waitq;
27
#define RPC_PIPE_WAIT_FOR_OPEN  1
28
        int flags;
29
        struct rpc_pipe_ops *ops;
30
};
31
 
32
static inline struct rpc_inode *
33
RPC_I(struct inode *inode)
34
{
35
        return container_of(inode, struct rpc_inode, vfs_inode);
36
}
37
 
38
extern void rpc_inode_setowner(struct inode *, void *);
39
extern int rpc_queue_upcall(struct inode *, struct rpc_pipe_msg *);
40
 
41
extern struct dentry *rpc_mkdir(char *, struct rpc_clnt *);
42
extern int rpc_rmdir(char *);
43
extern struct dentry *rpc_mkpipe(char *, void *, struct rpc_pipe_ops *, int flags);
44
extern int rpc_unlink(char *);
45
 
46
#endif
47
#endif