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