1
2
3
4
5
6
7
8
9 #ifndef _LINUX_RPCSOCK_H
10 #define _LINUX_RPCSOCK_H
11
12
13
14
15
16 #define NRREQS 16
17
18
19 struct rpc_timeout {
20 unsigned long init_timeout,
21 max_timeout,
22 increment;
23 int retries;
24 char exponential;
25 };
26
27
28 struct rpc_wait {
29 struct rpc_wait *prev, *next;
30 struct wait_queue *wait;
31 int *buf;
32 int len;
33 char gotit;
34 __u32 xid;
35 };
36
37 struct rpc_sock {
38 struct file *file;
39 struct socket *sock;
40 struct rpc_wait waiting[NRREQS];
41 struct rpc_wait *head, *tail, *free;
42 struct wait_queue *backlog;
43 struct wait_queue *shutwait;
44 int shutdown;
45 };
46
47 #ifdef __KERNEL__
48
49 int rpc_call(struct rpc_sock *, struct sockaddr *, int,
50 const int *, int, int *, int,
51 struct rpc_timeout *, int);
52 struct rpc_sock * rpc_makesock(struct file *);
53 int rpc_closesock(struct rpc_sock *);
54
55 #endif
56
57 #endif