summaryrefslogtreecommitdiffstats
path: root/cpukit/librpc/include/rpc/clnt.h
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2010-05-27 07:36:24 +0000
committerRalf Corsepius <ralf.corsepius@rtems.org>2010-05-27 07:36:24 +0000
commit1f5986bf651597e82ddc6941484606855b45be92 (patch)
tree8e81c748647120ae4280754b830a4aef7d37e489 /cpukit/librpc/include/rpc/clnt.h
parent2010-05-27 Ralf Corsépius <ralf.corsepius@rtems.org> (diff)
downloadrtems-1f5986bf651597e82ddc6941484606855b45be92.tar.bz2
2010-05-27 Ralf Corsépius <ralf.corsepius@rtems.org>
* librpc/include/rpc/clnt.h, librpc/include/rpc/rpc_msg.h, librpc/src/rpc/clnt_generic.c, librpc/src/rpc/clnt_raw.c, librpc/src/rpc/clnt_tcp.c, librpc/src/rpc/clnt_udp.c, librpc/src/rpc/pmap_clnt.c, librpc/src/rpc/pmap_getmaps.c librpc/src/rpc/pmap_getport.c: Partial merger from freebsd (portability fixes).
Diffstat (limited to '')
-rw-r--r--cpukit/librpc/include/rpc/clnt.h36
1 files changed, 15 insertions, 21 deletions
diff --git a/cpukit/librpc/include/rpc/clnt.h b/cpukit/librpc/include/rpc/clnt.h
index 53ff2a18da..b92abe367a 100644
--- a/cpukit/librpc/include/rpc/clnt.h
+++ b/cpukit/librpc/include/rpc/clnt.h
@@ -101,8 +101,8 @@ typedef struct __rpc_client {
struct clnt_ops {
/* call remote procedure */
enum clnt_stat (*cl_call)(struct __rpc_client *,
- u_long, xdrproc_t, caddr_t, xdrproc_t,
- caddr_t, struct timeval);
+ rpcproc_t, xdrproc_t, void *, xdrproc_t,
+ void *, struct timeval);
/* abort a call */
void (*cl_abort)(void);
/* get specific error code */
@@ -110,7 +110,7 @@ typedef struct __rpc_client {
struct rpc_err *);
/* frees results */
bool_t (*cl_freeres)(struct __rpc_client *,
- xdrproc_t, caddr_t);
+ xdrproc_t, void *);
/* destroy this structure */
void (*cl_destroy)(struct __rpc_client *);
/* the ioctl() of rpc */
@@ -133,19 +133,19 @@ typedef struct __rpc_client {
* enum clnt_stat
* CLNT_CALL(rh, proc, xargs, argsp, xres, resp, timeout)
* CLIENT *rh;
- * u_long proc;
+ * rpcproc_t proc;
* xdrproc_t xargs;
- * caddr_t argsp;
+ * void *argsp;
* xdrproc_t xres;
- * caddr_t resp;
+ * void *resp;
* struct timeval timeout;
*/
#define CLNT_CALL(rh, proc, xargs, argsp, xres, resp, secs) \
- ((*(rh)->cl_ops->cl_call)(rh, proc, (xdrproc_t)xargs, (caddr_t)argsp, \
- (xdrproc_t) xres, (caddr_t)resp, secs))
+ ((*(rh)->cl_ops->cl_call)(rh, proc, xargs, \
+ argsp, xres, resp, secs))
#define clnt_call(rh, proc, xargs, argsp, xres, resp, secs) \
- ((*(rh)->cl_ops->cl_call)(rh, proc, (xdrproc_t) xargs, (caddr_t)argsp, \
- (xdrproc_t) xres, (caddr_t)resp, secs))
+ ((*(rh)->cl_ops->cl_call)(rh, proc, xargs, \
+ argsp, xres, resp, secs))
/*
* void
@@ -169,10 +169,10 @@ typedef struct __rpc_client {
* CLNT_FREERES(rh, xres, resp);
* CLIENT *rh;
* xdrproc_t xres;
- * caddr_t resp;
+ * void *resp;
*/
-#define CLNT_FREERES(rh,xres,resp) ((*(rh)->cl_ops->cl_freeres)(rh,(xdrproc_t)xres,resp))
-#define clnt_freeres(rh,xres,resp) ((*(rh)->cl_ops->cl_freeres)(rh,(xdrproc_t)xres,resp))
+#define CLNT_FREERES(rh,xres,resp) ((*(rh)->cl_ops->cl_freeres)(rh,xres,resp))
+#define clnt_freeres(rh,xres,resp) ((*(rh)->cl_ops->cl_freeres)(rh,xres,resp))
/*
* bool_t
@@ -256,18 +256,12 @@ typedef struct __rpc_client {
/*
* Generic client creation routine. Supported protocols are "udp", "tcp"
* and "unix".
- * CLIENT *
- * clnt_create(host, prog, vers, prot);
- * char *host; -- hostname
- * u_long prog; -- program number
- * u_long vers; -- version number
- * char *prot; -- protocol
*/
__BEGIN_DECLS
-extern CLIENT *clnt_create(char *, u_long, u_long, char *);
+extern CLIENT *clnt_create(const char *, const rpcprog_t, const rpcvers_t,
+ const char *);
__END_DECLS
-
/*
* Added for compatibility to old rpc 4.0. Obsoleted by clnt_vc_create().
*/