Whamcloud - gitweb
couple of missing files added
[fs/lustre-release.git] / lustre / include / linux / obd_rpc.h
1 #ifndef __OBD_RPC_H
2 #define __OBD_RPC_H
3
4 #include <linux/sunrpc/svc.h>
5 #define OBD_TGT_VERSION  001
6
7 #define OBD_TGT_TCP  0x1
8 #define OBD_TGT_INTR 0x2
9 #define OBD_TGT_SOFT 0x4
10
11
12
13
14 /* error codes */
15
16 enum obd_stat {
17  OBD_OK = 0,
18  OBDERR_PERM = 1, 
19  OBDERR_NOENT = 2,
20  OBDERR_IO = 5,
21  OBDERR_NXIO = 6,
22  OBDERR_ACCESS = 13,
23  OBDERR_EXIST = 17,
24  OBDERR_XDEV = 18, 
25  OBDERR_NODEV = 19,
26  OBDERR_INVAL = 22,
27  OBDERR_FBIG = 27,
28  OBDERR_NOSPC = 28,
29  OBDERR_ROFS = 30,
30  OBDERR_OPNOTSUPP = 45,
31  OBDERR_DQUOT = 69
32 };
33
34
35 extern struct rpc_program obd_program;
36
37
38 struct obd_target {
39         struct sockaddr_in tgt_addr;
40         int tgt_flags;
41         int tgt_timeo;
42         int tgt_retrans;
43         int tgt_hostnamelen;
44         char tgt_hostname[0];
45         
46 };
47
48
49 struct rpc_obd {
50         struct rpc_clnt *       handle;         /* RPC client handle */
51         struct sockaddr_in      addr;
52         int                     flags;          /* various flags */
53         int                     timeo;
54         int                     retrans;
55         int                     rsize;          /* read size */
56         int                     wsize;          /* write size */
57         unsigned int            bsize;          /* server block size */
58         char *                  hostname;       /* remote hostname */
59 };
60
61
62 #define OBD_PROGRAM             300001
63 #define OBD_VERSION             1
64 #define OBDPROC_NULL            0
65 #define OBDPROC_ECHOINT         1
66
67 #ifdef  OBD_NEED_XDR_TYPES
68
69 struct obd_echoint_in {
70         __u32                   in;
71 };
72
73 struct obd_echoint_out {
74         __u32                   out;
75 };
76
77
78 #endif /* OBD_NEED_XDR_TYPES */
79
80
81 int obd_proc_echoint(struct rpc_obd *target, __u32 in, __u32 *out);
82
83
84 #endif