#ifndef __OBD_RPC_H
#define __OBD_RPC_H
-
+/*
+ * Copyright (C) 2001 Cluster File Systems, Inc.
+ *
+ * This code is issued under the GNU General Public License.
+ * See the file COPYING in this distribution
+ */
+
+#include <linux/sunrpc/svc.h>
#define OBD_TGT_VERSION 001
#define OBD_TGT_TCP 0x1
#define OBD_TGT_SOFT 0x4
+/* generic wrappable next */
+
+#define NEXT_INDEX(index, max) \
+ (((index + 1) >= max) ? 0 : (index + 1))
/* error codes */
struct obd_target {
- struct sockaddr_in tgt_addr;
- int tgt_flags;
- int tgt_timeo;
- int tgt_retrans;
- int tgt_hostnamelen;
- char tgt_hostname[0];
-
+ struct sockaddr_in tgt_addr;
+ int tgt_flags;
+ int tgt_timeo;
+ int tgt_retrans;
+ int tgt_hostnamelen;
+ char tgt_hostname[0];
+
};
struct rpc_obd {
- struct rpc_clnt * handle; /* RPC client handle */
- struct sockaddr_in addr;
- int flags; /* various flags */
- int timeo;
- int retrans;
- int rsize; /* read size */
- int wsize; /* write size */
- unsigned int bsize; /* server block size */
- char * hostname; /* remote hostname */
+ struct rpc_clnt * handle; /* RPC client handle */
+ struct sockaddr_in addr;
+ int flags; /* various flags */
+ int timeo;
+ int retrans;
+ int rsize; /* read size */
+ int wsize; /* write size */
+ unsigned int bsize; /* server block size */
+ char * hostname; /* remote hostname */
};
-#define OBD_PROGRAM 300001
-#define OBD_VERSION 1
-#define OBDPROC_NULL 0
-#define OBDPROC_ECHOINT 1
+#define OBD_PROGRAM 300001
+#define OBD_VERSION 1
+#define OBDPROC_NULL 0
+#define OBDPROC_ECHOINT 1
#ifdef OBD_NEED_XDR_TYPES
struct obd_echoint_in {
- __u32 in;
+ __u32 in;
};
struct obd_echoint_out {
- __u32 out;
+ __u32 out;
};