diff options
author | Ralf Corsepius <ralf.corsepius@rtems.org> | 2010-05-27 07:36:24 +0000 |
---|---|---|
committer | Ralf Corsepius <ralf.corsepius@rtems.org> | 2010-05-27 07:36:24 +0000 |
commit | 1f5986bf651597e82ddc6941484606855b45be92 (patch) | |
tree | 8e81c748647120ae4280754b830a4aef7d37e489 /cpukit/librpc/include | |
parent | 2010-05-27 Ralf Corsépius <ralf.corsepius@rtems.org> (diff) | |
download | rtems-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 'cpukit/librpc/include')
-rw-r--r-- | cpukit/librpc/include/rpc/clnt.h | 36 | ||||
-rw-r--r-- | cpukit/librpc/include/rpc/rpc_msg.h | 16 |
2 files changed, 23 insertions, 29 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(). */ diff --git a/cpukit/librpc/include/rpc/rpc_msg.h b/cpukit/librpc/include/rpc/rpc_msg.h index 311d4f6863..21fcb841a1 100644 --- a/cpukit/librpc/include/rpc/rpc_msg.h +++ b/cpukit/librpc/include/rpc/rpc_msg.h @@ -92,8 +92,8 @@ struct accepted_reply { enum accept_stat ar_stat; union { struct { - u_int32_t low; - u_int32_t high; + rpcvers_t low; + rpcvers_t high; } AR_versions; struct { caddr_t where; @@ -112,8 +112,8 @@ struct rejected_reply { enum reject_stat rj_stat; union { struct { - u_int32_t low; - u_int32_t high; + rpcvers_t low; + rpcvers_t high; } RJ_versions; enum auth_stat RJ_why; /* why authentication did not work */ } ru; @@ -138,10 +138,10 @@ struct reply_body { * Body of an rpc request call. */ struct call_body { - u_int32_t cb_rpcvers; /* must be equal to two */ - u_int32_t cb_prog; - u_int32_t cb_vers; - u_int32_t cb_proc; + rpcvers_t cb_rpcvers; /* must be equal to two */ + rpcprog_t cb_prog; + rpcvers_t cb_vers; + rpcproc_t cb_proc; struct opaque_auth cb_cred; struct opaque_auth cb_verf; /* protocol specific - provided by client */ }; |