Sat Jan 23 02:34:09 2016 UTC ()
unsigned -> unsigned int in previous change to accomodate C++ boneheadedness.


(dholland)
diff -r1.18 -r1.19 src/include/rpc/auth.h
diff -r1.9 -r1.10 src/include/rpc/auth_unix.h
diff -r1.23 -r1.24 src/include/rpc/clnt.h
diff -r1.4 -r1.5 src/include/rpc/clnt_soc.h
diff -r1.12 -r1.13 src/include/rpc/pmap_clnt.h
diff -r1.5 -r1.6 src/include/rpc/rpcb_prot.x
diff -r1.30 -r1.31 src/include/rpc/svc.h
diff -r1.3 -r1.4 src/include/rpc/svc_soc.h
diff -r1.28 -r1.29 src/include/rpc/xdr.h

cvs diff -r1.18 -r1.19 src/include/rpc/auth.h (expand / switch to unified diff)

--- src/include/rpc/auth.h 2016/01/23 01:05:30 1.18
+++ src/include/rpc/auth.h 2016/01/23 02:34:09 1.19
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: auth.h,v 1.18 2016/01/23 01:05:30 dholland Exp $ */ 1/* $NetBSD: auth.h,v 1.19 2016/01/23 02:34:09 dholland Exp $ */
2 2
3/* 3/*
4 * Sun RPC is a product of Sun Microsystems, Inc. and is provided for 4 * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
5 * unrestricted use provided that this legend is included on all tape 5 * unrestricted use provided that this legend is included on all tape
6 * media and as a part of the software program in whole or part. Users 6 * media and as a part of the software program in whole or part. Users
7 * may copy or modify Sun RPC without charge, but are not authorized 7 * may copy or modify Sun RPC without charge, but are not authorized
8 * to license or distribute it to anyone else except as part of a product or 8 * to license or distribute it to anyone else except as part of a product or
9 * program developed by the user. 9 * program developed by the user.
10 *  10 *
11 * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE 11 * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
12 * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR 12 * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
13 * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. 13 * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
14 *  14 *
@@ -77,27 +77,27 @@ union des_block { @@ -77,27 +77,27 @@ union des_block {
77 char c[8]; 77 char c[8];
78}; 78};
79typedef union des_block des_block; 79typedef union des_block des_block;
80__BEGIN_DECLS 80__BEGIN_DECLS
81extern bool_t xdr_des_block(XDR *, des_block *); 81extern bool_t xdr_des_block(XDR *, des_block *);
82__END_DECLS 82__END_DECLS
83 83
84/* 84/*
85 * Authentication info. Opaque to client. 85 * Authentication info. Opaque to client.
86 */ 86 */
87struct opaque_auth { 87struct opaque_auth {
88 enum_t oa_flavor; /* flavor of auth */ 88 enum_t oa_flavor; /* flavor of auth */
89 caddr_t oa_base; /* address of more auth stuff */ 89 caddr_t oa_base; /* address of more auth stuff */
90 unsigned oa_length; /* not to exceed MAX_AUTH_BYTES */ 90 unsigned int oa_length; /* not to exceed MAX_AUTH_BYTES */
91}; 91};
92 92
93 93
94/* 94/*
95 * Auth handle, interface to client side authenticators. 95 * Auth handle, interface to client side authenticators.
96 */ 96 */
97typedef struct __rpc_auth { 97typedef struct __rpc_auth {
98 struct opaque_auth ah_cred; 98 struct opaque_auth ah_cred;
99 struct opaque_auth ah_verf; 99 struct opaque_auth ah_verf;
100 union des_block ah_key; 100 union des_block ah_key;
101 const struct auth_ops { 101 const struct auth_ops {
102 void (*ah_nextverf)(struct __rpc_auth *); 102 void (*ah_nextverf)(struct __rpc_auth *);
103 /* nextverf & serialize */ 103 /* nextverf & serialize */
@@ -159,27 +159,27 @@ extern struct opaque_auth _null_auth; @@ -159,27 +159,27 @@ extern struct opaque_auth _null_auth;
159 * Unix style authentication 159 * Unix style authentication
160 * AUTH *authunix_create(machname, uid, gid, len, aup_gids) 160 * AUTH *authunix_create(machname, uid, gid, len, aup_gids)
161 * char *machname; 161 * char *machname;
162 * int uid; 162 * int uid;
163 * int gid; 163 * int gid;
164 * int len; 164 * int len;
165 * int *aup_gids; 165 * int *aup_gids;
166 */ 166 */
167__BEGIN_DECLS 167__BEGIN_DECLS
168struct sockaddr_in; 168struct sockaddr_in;
169extern AUTH *authunix_create (char *, int, int, int, int *); 169extern AUTH *authunix_create (char *, int, int, int, int *);
170extern AUTH *authunix_create_default (void); 170extern AUTH *authunix_create_default (void);
171extern AUTH *authnone_create (void); 171extern AUTH *authnone_create (void);
172extern AUTH *authdes_create (char *, unsigned, 172extern AUTH *authdes_create (char *, unsigned int,
173 struct sockaddr_in *, des_block *); 173 struct sockaddr_in *, des_block *);
174extern bool_t xdr_opaque_auth (XDR *, struct opaque_auth *); 174extern bool_t xdr_opaque_auth (XDR *, struct opaque_auth *);
175 175
176#define authsys_create(c,i1,i2,i3,ip) authunix_create((c),(i1),(i2),(i3),(ip)) 176#define authsys_create(c,i1,i2,i3,ip) authunix_create((c),(i1),(i2),(i3),(ip))
177#define authsys_create_default() authunix_create_default() 177#define authsys_create_default() authunix_create_default()
178 178
179struct svc_req; 179struct svc_req;
180struct rpc_msg; 180struct rpc_msg;
181enum auth_stat _svcauth_null(struct svc_req *, struct rpc_msg *); 181enum auth_stat _svcauth_null(struct svc_req *, struct rpc_msg *);
182enum auth_stat _svcauth_short(struct svc_req *, struct rpc_msg *); 182enum auth_stat _svcauth_short(struct svc_req *, struct rpc_msg *);
183enum auth_stat _svcauth_unix(struct svc_req *, struct rpc_msg *); 183enum auth_stat _svcauth_unix(struct svc_req *, struct rpc_msg *);
184__END_DECLS 184__END_DECLS
185 185

cvs diff -r1.9 -r1.10 src/include/rpc/auth_unix.h (expand / switch to unified diff)

--- src/include/rpc/auth_unix.h 2016/01/23 01:05:30 1.9
+++ src/include/rpc/auth_unix.h 2016/01/23 02:34:09 1.10
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: auth_unix.h,v 1.9 2016/01/23 01:05:30 dholland Exp $ */ 1/* $NetBSD: auth_unix.h,v 1.10 2016/01/23 02:34:09 dholland Exp $ */
2 2
3/* 3/*
4 * Sun RPC is a product of Sun Microsystems, Inc. and is provided for 4 * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
5 * unrestricted use provided that this legend is included on all tape 5 * unrestricted use provided that this legend is included on all tape
6 * media and as a part of the software program in whole or part. Users 6 * media and as a part of the software program in whole or part. Users
7 * may copy or modify Sun RPC without charge, but are not authorized 7 * may copy or modify Sun RPC without charge, but are not authorized
8 * to license or distribute it to anyone else except as part of a product or 8 * to license or distribute it to anyone else except as part of a product or
9 * program developed by the user. 9 * program developed by the user.
10 *  10 *
11 * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE 11 * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
12 * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR 12 * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
13 * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. 13 * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
14 *  14 *
@@ -53,27 +53,27 @@ @@ -53,27 +53,27 @@
53#define MAX_MACHINE_NAME 255 53#define MAX_MACHINE_NAME 255
54 54
55/* gids compose part of a credential; there may not be more than 16 of them */ 55/* gids compose part of a credential; there may not be more than 16 of them */
56#define NGRPS 16 56#define NGRPS 16
57 57
58/* 58/*
59 * Unix style credentials. 59 * Unix style credentials.
60 */ 60 */
61struct authunix_parms { 61struct authunix_parms {
62 unsigned long aup_time; 62 unsigned long aup_time;
63 char *aup_machname; 63 char *aup_machname;
64 int aup_uid; 64 int aup_uid;
65 int aup_gid; 65 int aup_gid;
66 unsigned aup_len; 66 unsigned int aup_len;
67 int *aup_gids; 67 int *aup_gids;
68}; 68};
69 69
70__BEGIN_DECLS 70__BEGIN_DECLS
71extern bool_t xdr_authunix_parms(XDR *, struct authunix_parms *); 71extern bool_t xdr_authunix_parms(XDR *, struct authunix_parms *);
72__END_DECLS 72__END_DECLS
73 73
74/*  74/*
75 * If a response verifier has flavor AUTH_SHORT,  75 * If a response verifier has flavor AUTH_SHORT,
76 * then the body of the response verifier encapsulates the following structure; 76 * then the body of the response verifier encapsulates the following structure;
77 * again it is serialized in the obvious fashion. 77 * again it is serialized in the obvious fashion.
78 */ 78 */
79struct short_hand_verf { 79struct short_hand_verf {

cvs diff -r1.23 -r1.24 src/include/rpc/clnt.h (expand / switch to unified diff)

--- src/include/rpc/clnt.h 2016/01/23 01:05:30 1.23
+++ src/include/rpc/clnt.h 2016/01/23 02:34:09 1.24
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: clnt.h,v 1.23 2016/01/23 01:05:30 dholland Exp $ */ 1/* $NetBSD: clnt.h,v 1.24 2016/01/23 02:34:09 dholland Exp $ */
2 2
3/* 3/*
4 * Sun RPC is a product of Sun Microsystems, Inc. and is provided for 4 * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
5 * unrestricted use provided that this legend is included on all tape 5 * unrestricted use provided that this legend is included on all tape
6 * media and as a part of the software program in whole or part. Users 6 * media and as a part of the software program in whole or part. Users
7 * may copy or modify Sun RPC without charge, but are not authorized 7 * may copy or modify Sun RPC without charge, but are not authorized
8 * to license or distribute it to anyone else except as part of a product or 8 * to license or distribute it to anyone else except as part of a product or
9 * program developed by the user. 9 * program developed by the user.
10 *  10 *
11 * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE 11 * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
12 * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR 12 * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
13 * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. 13 * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
14 *  14 *
@@ -146,28 +146,28 @@ typedef struct __rpc_client { @@ -146,28 +146,28 @@ typedef struct __rpc_client {
146 rpcproc_t, xdrproc_t, const char *, 146 rpcproc_t, xdrproc_t, const char *,
147 xdrproc_t, caddr_t, struct timeval); 147 xdrproc_t, caddr_t, struct timeval);
148 /* abort a call */ 148 /* abort a call */
149 void (*cl_abort)(struct __rpc_client *); 149 void (*cl_abort)(struct __rpc_client *);
150 /* get specific error code */ 150 /* get specific error code */
151 void (*cl_geterr)(struct __rpc_client *, 151 void (*cl_geterr)(struct __rpc_client *,
152 struct rpc_err *); 152 struct rpc_err *);
153 /* frees results */ 153 /* frees results */
154 bool_t (*cl_freeres)(struct __rpc_client *, 154 bool_t (*cl_freeres)(struct __rpc_client *,
155 xdrproc_t, caddr_t); 155 xdrproc_t, caddr_t);
156 /* destroy this structure */ 156 /* destroy this structure */
157 void (*cl_destroy)(struct __rpc_client *); 157 void (*cl_destroy)(struct __rpc_client *);
158 /* the ioctl() of rpc */ 158 /* the ioctl() of rpc */
159 bool_t (*cl_control)(struct __rpc_client *, unsigned, 159 bool_t (*cl_control)(struct __rpc_client *,
160 char *); 160 unsigned int, char *);
161 } *cl_ops; 161 } *cl_ops;
162 void *cl_private; /* private stuff */ 162 void *cl_private; /* private stuff */
163 char *cl_netid; /* network token */ 163 char *cl_netid; /* network token */
164 char *cl_tp; /* device name */ 164 char *cl_tp; /* device name */
165} CLIENT; 165} CLIENT;
166 166
167 167
168/* 168/*
169 * Timers used for the pseudo-transport protocol when using datagrams 169 * Timers used for the pseudo-transport protocol when using datagrams
170 */ 170 */
171struct rpc_timers { 171struct rpc_timers {
172 unsigned short rt_srtt; /* smoothed round-trip time */ 172 unsigned short rt_srtt; /* smoothed round-trip time */
173 unsigned short rt_deviate; /* estimated deviation */ 173 unsigned short rt_deviate; /* estimated deviation */
@@ -355,59 +355,59 @@ extern CLIENT *clnt_tp_create(const char @@ -355,59 +355,59 @@ extern CLIENT *clnt_tp_create(const char
355/* 355/*
356 * const char *hostname; -- hostname 356 * const char *hostname; -- hostname
357 * const rpcprog_t prog; -- program number 357 * const rpcprog_t prog; -- program number
358 * const rpcvers_t vers; -- version number 358 * const rpcvers_t vers; -- version number
359 * const struct netconfig *netconf; -- network config structure 359 * const struct netconfig *netconf; -- network config structure
360 */ 360 */
361 361
362/* 362/*
363 * Generic TLI create routine. Only provided for compatibility. 363 * Generic TLI create routine. Only provided for compatibility.
364 */ 364 */
365 365
366extern CLIENT *clnt_tli_create(const int, const struct netconfig *, 366extern CLIENT *clnt_tli_create(const int, const struct netconfig *,
367 const struct netbuf *, const rpcprog_t, 367 const struct netbuf *, const rpcprog_t,
368 const rpcvers_t, const unsigned, 368 const rpcvers_t, const unsigned int,
369 const unsigned); 369 const unsigned int);
370/* 370/*
371 * const register int fd; -- fd 371 * const register int fd; -- fd
372 * const struct netconfig *nconf; -- netconfig structure 372 * const struct netconfig *nconf; -- netconfig structure
373 * const struct netbuf *svcaddr; -- servers address 373 * const struct netbuf *svcaddr; -- servers address
374 * const unsigned long prog; -- program number 374 * const unsigned long prog; -- program number
375 * const unsigned long vers; -- version number 375 * const unsigned long vers; -- version number
376 * const unsigned sendsz; -- send size 376 * const unsigned sendsz; -- send size
377 * const unsigned recvsz; -- recv size 377 * const unsigned recvsz; -- recv size
378 */ 378 */
379 379
380/* 380/*
381 * Low level clnt create routine for connectionful transports, e.g. tcp. 381 * Low level clnt create routine for connectionful transports, e.g. tcp.
382 */ 382 */
383extern CLIENT *clnt_vc_create(const int, const struct netbuf *, 383extern CLIENT *clnt_vc_create(const int, const struct netbuf *,
384 const rpcprog_t, const rpcvers_t, 384 const rpcprog_t, const rpcvers_t,
385 const unsigned, const unsigned); 385 const unsigned int, const unsigned int);
386/* 386/*
387 * const int fd; -- open file descriptor 387 * const int fd; -- open file descriptor
388 * const struct netbuf *svcaddr; -- servers address 388 * const struct netbuf *svcaddr; -- servers address
389 * const rpcprog_t prog; -- program number 389 * const rpcprog_t prog; -- program number
390 * const rpcvers_t vers; -- version number 390 * const rpcvers_t vers; -- version number
391 * const unsigned sendsz; -- buffer recv size 391 * const unsigned sendsz; -- buffer recv size
392 * const unsigned recvsz; -- buffer send size 392 * const unsigned recvsz; -- buffer send size
393 */ 393 */
394 394
395/* 395/*
396 * Low level clnt create routine for connectionless transports, e.g. udp. 396 * Low level clnt create routine for connectionless transports, e.g. udp.
397 */ 397 */
398extern CLIENT *clnt_dg_create(const int, const struct netbuf *, 398extern CLIENT *clnt_dg_create(const int, const struct netbuf *,
399 const rpcprog_t, const rpcvers_t, 399 const rpcprog_t, const rpcvers_t,
400 const unsigned, const unsigned); 400 const unsigned int, const unsigned int);
401/* 401/*
402 * const int fd; -- open file descriptor 402 * const int fd; -- open file descriptor
403 * const struct netbuf *svcaddr; -- servers address 403 * const struct netbuf *svcaddr; -- servers address
404 * const rpcprog_t program; -- program number 404 * const rpcprog_t program; -- program number
405 * const rpcvers_t version; -- version number 405 * const rpcvers_t version; -- version number
406 * const unsigned sendsz; -- buffer recv size 406 * const unsigned sendsz; -- buffer recv size
407 * const unsigned recvsz; -- buffer send size 407 * const unsigned recvsz; -- buffer send size
408 */ 408 */
409 409
410/* 410/*
411 * Memory based rpc (for speed check and testing) 411 * Memory based rpc (for speed check and testing)
412 * CLIENT * 412 * CLIENT *
413 * clnt_raw_create(prog, vers) 413 * clnt_raw_create(prog, vers)

cvs diff -r1.4 -r1.5 src/include/rpc/clnt_soc.h (expand / switch to unified diff)

--- src/include/rpc/clnt_soc.h 2016/01/23 01:05:30 1.4
+++ src/include/rpc/clnt_soc.h 2016/01/23 02:34:09 1.5
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: clnt_soc.h,v 1.4 2016/01/23 01:05:30 dholland Exp $ */ 1/* $NetBSD: clnt_soc.h,v 1.5 2016/01/23 02:34:09 dholland Exp $ */
2 2
3/* 3/*
4 * Sun RPC is a product of Sun Microsystems, Inc. and is provided for 4 * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
5 * unrestricted use provided that this legend is included on all tape 5 * unrestricted use provided that this legend is included on all tape
6 * media and as a part of the software program in whole or part. Users 6 * media and as a part of the software program in whole or part. Users
7 * may copy or modify Sun RPC without charge, but are not authorized 7 * may copy or modify Sun RPC without charge, but are not authorized
8 * to license or distribute it to anyone else except as part of a product or 8 * to license or distribute it to anyone else except as part of a product or
9 * program developed by the user. 9 * program developed by the user.
10 *  10 *
11 * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE 11 * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
12 * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR 12 * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
13 * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. 13 * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
14 *  14 *
@@ -56,28 +56,28 @@ @@ -56,28 +56,28 @@
56 * clnttcp_create(raddr, prog, vers, sockp, sendsz, recvsz) 56 * clnttcp_create(raddr, prog, vers, sockp, sendsz, recvsz)
57 * struct sockaddr_in *raddr; 57 * struct sockaddr_in *raddr;
58 * unsigned long prog; 58 * unsigned long prog;
59 * unsigned long version; 59 * unsigned long version;
60 * int *sockp; 60 * int *sockp;
61 * unsigned sendsz; 61 * unsigned sendsz;
62 * unsigned recvsz; 62 * unsigned recvsz;
63 */ 63 */
64__BEGIN_DECLS 64__BEGIN_DECLS
65extern CLIENT *clnttcp_create(struct sockaddr_in *, 65extern CLIENT *clnttcp_create(struct sockaddr_in *,
66 unsigned long, 66 unsigned long,
67 unsigned long, 67 unsigned long,
68 int *, 68 int *,
69 unsigned, 69 unsigned int,
70 unsigned); 70 unsigned int);
71__END_DECLS 71__END_DECLS
72 72
73/* 73/*
74 * Raw (memory) rpc. 74 * Raw (memory) rpc.
75 */ 75 */
76__BEGIN_DECLS 76__BEGIN_DECLS
77extern CLIENT *clntraw_create (unsigned long, unsigned long); 77extern CLIENT *clntraw_create (unsigned long, unsigned long);
78__END_DECLS 78__END_DECLS
79 79
80 80
81/* 81/*
82 * UDP based rpc. 82 * UDP based rpc.
83 * CLIENT * 83 * CLIENT *
@@ -100,18 +100,18 @@ __END_DECLS @@ -100,18 +100,18 @@ __END_DECLS
100 * unsigned recvsz; 100 * unsigned recvsz;
101 */ 101 */
102__BEGIN_DECLS 102__BEGIN_DECLS
103extern CLIENT *clntudp_create(struct sockaddr_in *, 103extern CLIENT *clntudp_create(struct sockaddr_in *,
104 unsigned long, 104 unsigned long,
105 unsigned long, 105 unsigned long,
106 struct timeval, 106 struct timeval,
107 int *); 107 int *);
108extern CLIENT *clntudp_bufcreate(struct sockaddr_in *, 108extern CLIENT *clntudp_bufcreate(struct sockaddr_in *,
109 unsigned long, 109 unsigned long,
110 unsigned long, 110 unsigned long,
111 struct timeval, 111 struct timeval,
112 int *, 112 int *,
113 unsigned, 113 unsigned int,
114 unsigned); 114 unsigned int);
115__END_DECLS 115__END_DECLS
116 116
117#endif /* _RPC_CLNT_SOC_H */ 117#endif /* _RPC_CLNT_SOC_H */

cvs diff -r1.12 -r1.13 src/include/rpc/pmap_clnt.h (expand / switch to unified diff)

--- src/include/rpc/pmap_clnt.h 2016/01/23 01:05:30 1.12
+++ src/include/rpc/pmap_clnt.h 2016/01/23 02:34:09 1.13
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: pmap_clnt.h,v 1.12 2016/01/23 01:05:30 dholland Exp $ */ 1/* $NetBSD: pmap_clnt.h,v 1.13 2016/01/23 02:34:09 dholland Exp $ */
2 2
3/* 3/*
4 * Sun RPC is a product of Sun Microsystems, Inc. and is provided for 4 * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
5 * unrestricted use provided that this legend is included on all tape 5 * unrestricted use provided that this legend is included on all tape
6 * media and as a part of the software program in whole or part. Users 6 * media and as a part of the software program in whole or part. Users
7 * may copy or modify Sun RPC without charge, but are not authorized 7 * may copy or modify Sun RPC without charge, but are not authorized
8 * to license or distribute it to anyone else except as part of a product or 8 * to license or distribute it to anyone else except as part of a product or
9 * program developed by the user. 9 * program developed by the user.
10 *  10 *
11 * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE 11 * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
12 * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR 12 * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
13 * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. 13 * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
14 *  14 *
@@ -73,19 +73,19 @@ extern struct pmaplist *pmap_getmaps(str @@ -73,19 +73,19 @@ extern struct pmaplist *pmap_getmaps(str
73extern enum clnt_stat pmap_rmtcall(struct sockaddr_in *, 73extern enum clnt_stat pmap_rmtcall(struct sockaddr_in *,
74 unsigned long, unsigned long, 74 unsigned long, unsigned long,
75 unsigned long, 75 unsigned long,
76 xdrproc_t, caddr_t, 76 xdrproc_t, caddr_t,
77 xdrproc_t, caddr_t, 77 xdrproc_t, caddr_t,
78 struct timeval, unsigned long *) 78 struct timeval, unsigned long *)
79 __RENAME(__pmap_rmtcall50); 79 __RENAME(__pmap_rmtcall50);
80#endif 80#endif
81extern enum clnt_stat clnt_broadcast(unsigned long, unsigned long, 81extern enum clnt_stat clnt_broadcast(unsigned long, unsigned long,
82 unsigned long, 82 unsigned long,
83 xdrproc_t, char *, 83 xdrproc_t, char *,
84 xdrproc_t, char *, 84 xdrproc_t, char *,
85 resultproc_t); 85 resultproc_t);
86extern u_short pmap_getport(struct sockaddr_in *, 86extern unsigned short pmap_getport(struct sockaddr_in *,
87 unsigned long, unsigned long, 87 unsigned long, unsigned long,
88 unsigned); 88 unsigned int);
89__END_DECLS 89__END_DECLS
90 90
91#endif /* !_RPC_PMAP_CLNT_H_ */ 91#endif /* !_RPC_PMAP_CLNT_H_ */

cvs diff -r1.5 -r1.6 src/include/rpc/rpcb_prot.x (expand / switch to unified diff)

--- src/include/rpc/rpcb_prot.x 2016/01/23 01:05:30 1.5
+++ src/include/rpc/rpcb_prot.x 2016/01/23 02:34:09 1.6
@@ -197,27 +197,27 @@ struct rpcb_rmtcallargs { @@ -197,27 +197,27 @@ struct rpcb_rmtcallargs {
197% * The routine that XDRs the rpcb_rmtcallargs structure must deal with the 197% * The routine that XDRs the rpcb_rmtcallargs structure must deal with the
198% * opaque arguments in the "args" structure. xdr_rpcb_rmtcallargs() needs to 198% * opaque arguments in the "args" structure. xdr_rpcb_rmtcallargs() needs to
199% * be passed the XDR routine that knows the args' structure. This routine 199% * be passed the XDR routine that knows the args' structure. This routine
200% * doesn't need to go over-the-wire (and it wouldn't make sense anyway) since 200% * doesn't need to go over-the-wire (and it wouldn't make sense anyway) since
201% * the application being called already knows the args structure. So we use a 201% * the application being called already knows the args structure. So we use a
202% * different "XDR" structure on the client side, r_rpcb_rmtcallargs, which 202% * different "XDR" structure on the client side, r_rpcb_rmtcallargs, which
203% * includes the args' XDR routine. 203% * includes the args' XDR routine.
204% */ 204% */
205%struct r_rpcb_rmtcallargs { 205%struct r_rpcb_rmtcallargs {
206% rpcprog_t prog; 206% rpcprog_t prog;
207% rpcvers_t vers; 207% rpcvers_t vers;
208% rpcproc_t proc; 208% rpcproc_t proc;
209% struct { 209% struct {
210% unsigned args_len; 210% unsigned int args_len;
211% const char *args_val; 211% const char *args_val;
212% } args; 212% } args;
213% xdrproc_t xdr_args; /* encodes args */ 213% xdrproc_t xdr_args; /* encodes args */
214%}; 214%};
215% 215%
216#endif /* def RPC_HDR */ 216#endif /* def RPC_HDR */
217% 217%
218%/* 218%/*
219% * Results of the remote call 219% * Results of the remote call
220% */ 220% */
221struct rpcb_rmtcallres { 221struct rpcb_rmtcallres {
222 string addr<>; /* remote universal address */ 222 string addr<>; /* remote universal address */
223 opaque results<>; /* result */ 223 opaque results<>; /* result */

cvs diff -r1.30 -r1.31 src/include/rpc/svc.h (expand / switch to unified diff)

--- src/include/rpc/svc.h 2016/01/23 01:05:30 1.30
+++ src/include/rpc/svc.h 2016/01/23 02:34:09 1.31
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: svc.h,v 1.30 2016/01/23 01:05:30 dholland Exp $ */ 1/* $NetBSD: svc.h,v 1.31 2016/01/23 02:34:09 dholland Exp $ */
2 2
3/* 3/*
4 * Sun RPC is a product of Sun Microsystems, Inc. and is provided for 4 * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
5 * unrestricted use provided that this legend is included on all tape 5 * unrestricted use provided that this legend is included on all tape
6 * media and as a part of the software program in whole or part. Users 6 * media and as a part of the software program in whole or part. Users
7 * may copy or modify Sun RPC without charge, but are not authorized 7 * may copy or modify Sun RPC without charge, but are not authorized
8 * to license or distribute it to anyone else except as part of a product or 8 * to license or distribute it to anyone else except as part of a product or
9 * program developed by the user. 9 * program developed by the user.
10 * 10 *
11 * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE 11 * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
12 * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR 12 * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
13 * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. 13 * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
14 * 14 *
@@ -98,28 +98,28 @@ typedef struct __rpc_svcxprt { @@ -98,28 +98,28 @@ typedef struct __rpc_svcxprt {
98 /* send reply */ 98 /* send reply */
99 bool_t (*xp_reply)(struct __rpc_svcxprt *, struct rpc_msg *); 99 bool_t (*xp_reply)(struct __rpc_svcxprt *, struct rpc_msg *);
100 /* free mem allocated for args */ 100 /* free mem allocated for args */
101 bool_t (*xp_freeargs)(struct __rpc_svcxprt *, xdrproc_t, 101 bool_t (*xp_freeargs)(struct __rpc_svcxprt *, xdrproc_t,
102 caddr_t); 102 caddr_t);
103 /* destroy this struct */ 103 /* destroy this struct */
104 void (*xp_destroy)(struct __rpc_svcxprt *); 104 void (*xp_destroy)(struct __rpc_svcxprt *);
105 } *xp_ops; 105 } *xp_ops;
106 int xp_addrlen; /* length of remote address */ 106 int xp_addrlen; /* length of remote address */
107 struct sockaddr_in xp_raddr; /* rem. addr. (backward ABI compat) */ 107 struct sockaddr_in xp_raddr; /* rem. addr. (backward ABI compat) */
108 /* XXX - fvdl stick this here for ABI backward compat reasons */ 108 /* XXX - fvdl stick this here for ABI backward compat reasons */
109 const struct xp_ops2 { 109 const struct xp_ops2 {
110 /* catch-all function */ 110 /* catch-all function */
111 bool_t (*xp_control)(struct __rpc_svcxprt *, const unsigned, 111 bool_t (*xp_control)(struct __rpc_svcxprt *,
112 void *); 112 const unsigned int, void *);
113 } *xp_ops2; 113 } *xp_ops2;
114 char *xp_tp; /* transport provider device name */ 114 char *xp_tp; /* transport provider device name */
115 char *xp_netid; /* network token */ 115 char *xp_netid; /* network token */
116 struct netbuf xp_ltaddr; /* local transport address */ 116 struct netbuf xp_ltaddr; /* local transport address */
117 struct netbuf xp_rtaddr; /* remote transport address */ 117 struct netbuf xp_rtaddr; /* remote transport address */
118 struct opaque_auth xp_verf; /* raw response verifier */ 118 struct opaque_auth xp_verf; /* raw response verifier */
119 void *xp_p1; /* private: for use by svc ops */ 119 void *xp_p1; /* private: for use by svc ops */
120 void *xp_p2; /* private: for use by svc ops */ 120 void *xp_p2; /* private: for use by svc ops */
121 void *xp_p3; /* private: for use by svc lib */ 121 void *xp_p3; /* private: for use by svc lib */
122 int xp_type; /* transport type */ 122 int xp_type; /* transport type */
123} SVCXPRT; 123} SVCXPRT;
124 124
125/* 125/*
@@ -377,70 +377,73 @@ extern SVCXPRT *svc_tp_create(void (*)(s @@ -377,70 +377,73 @@ extern SVCXPRT *svc_tp_create(void (*)(s
377 const struct netconfig *); 377 const struct netconfig *);
378/* 378/*
379 * void (*dispatch)(...); -- dispatch routine 379 * void (*dispatch)(...); -- dispatch routine
380 * const rpcprog_t prognum; -- program number 380 * const rpcprog_t prognum; -- program number
381 * const rpcvers_t versnum; -- version number 381 * const rpcvers_t versnum; -- version number
382 * const struct netconfig *nconf; -- netconfig structure 382 * const struct netconfig *nconf; -- netconfig structure
383 */ 383 */
384 384
385 385
386/* 386/*
387 * Generic TLI create routine 387 * Generic TLI create routine
388 */ 388 */
389extern SVCXPRT *svc_tli_create(const int, const struct netconfig *, 389extern SVCXPRT *svc_tli_create(const int, const struct netconfig *,
390 const struct t_bind *, const unsigned, 390 const struct t_bind *, const unsigned int,
391 const unsigned); 391 const unsigned int);
392/* 392/*
393 * const int fd; -- connection end point 393 * const int fd; -- connection end point
394 * const struct netconfig *nconf; -- netconfig structure for network 394 * const struct netconfig *nconf; -- netconfig structure for network
395 * const struct t_bind *bindaddr; -- local bind address 395 * const struct t_bind *bindaddr; -- local bind address
396 * const unsigned sendsz; -- max sendsize 396 * const unsigned sendsz; -- max sendsize
397 * const unsigned recvsz; -- max recvsize 397 * const unsigned recvsz; -- max recvsize
398 */ 398 */
399 399
400/* 400/*
401 * Connectionless and connectionful create routines 401 * Connectionless and connectionful create routines
402 */ 402 */
403 403
404extern SVCXPRT *svc_vc_create(const int, const unsigned, const unsigned); 404extern SVCXPRT *svc_vc_create(const int, const unsigned int,
 405 const unsigned int);
405/* 406/*
406 * const int fd; -- open connection end point 407 * const int fd; -- open connection end point
407 * const unsigned sendsize; -- max send size 408 * const unsigned sendsize; -- max send size
408 * const unsigned recvsize; -- max recv size 409 * const unsigned recvsize; -- max recv size
409 */ 410 */
410 411
411extern SVCXPRT *svc_dg_create(const int, const unsigned, const unsigned); 412extern SVCXPRT *svc_dg_create(const int, const unsigned int,
 413 const unsigned int);
412/* 414/*
413 * const int fd; -- open connection 415 * const int fd; -- open connection
414 * const unsigned sendsize; -- max send size 416 * const unsigned sendsize; -- max send size
415 * const unsigned recvsize; -- max recv size 417 * const unsigned recvsize; -- max recv size
416 */ 418 */
417 419
418 420
419/* 421/*
420 * the routine takes any *open* connection 422 * the routine takes any *open* connection
421 * descriptor as its first input and is used for open connections. 423 * descriptor as its first input and is used for open connections.
422 */ 424 */
423extern SVCXPRT *svc_fd_create(const int, const unsigned, const unsigned); 425extern SVCXPRT *svc_fd_create(const int, const unsigned int,
 426 const unsigned int);
424/* 427/*
425 * const int fd; -- open connection end point 428 * const int fd; -- open connection end point
426 * const unsigned sendsize; -- max send size 429 * const unsigned sendsize; -- max send size
427 * const unsigned recvsize; -- max recv size 430 * const unsigned recvsize; -- max recv size
428 */ 431 */
429 432
430/* 433/*
431 * Memory based rpc (for speed check and testing) 434 * Memory based rpc (for speed check and testing)
432 */ 435 */
433extern SVCXPRT *svc_raw_create(void); 436extern SVCXPRT *svc_raw_create(void);
434 437
435/* 438/*
436 * svc_dg_enable_cache() enables the cache on dg transports. 439 * svc_dg_enable_cache() enables the cache on dg transports.
437 */ 440 */
438int svc_dg_enablecache(SVCXPRT *, const unsigned); 441int svc_dg_enablecache(SVCXPRT *, const unsigned int);
439 442
440__END_DECLS 443__END_DECLS
441 444
442 445
443/* for backward compatibility */ 446/* for backward compatibility */
444#include <rpc/svc_soc.h> 447#include <rpc/svc_soc.h>
445 448
446#endif /* !_RPC_SVC_H_ */ 449#endif /* !_RPC_SVC_H_ */

cvs diff -r1.3 -r1.4 src/include/rpc/svc_soc.h (expand / switch to unified diff)

--- src/include/rpc/svc_soc.h 2016/01/23 01:05:30 1.3
+++ src/include/rpc/svc_soc.h 2016/01/23 02:34:09 1.4
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: svc_soc.h,v 1.3 2016/01/23 01:05:30 dholland Exp $ */ 1/* $NetBSD: svc_soc.h,v 1.4 2016/01/23 02:34:09 dholland Exp $ */
2 2
3/* 3/*
4 * Sun RPC is a product of Sun Microsystems, Inc. and is provided for 4 * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
5 * unrestricted use provided that this legend is included on all tape 5 * unrestricted use provided that this legend is included on all tape
6 * media and as a part of the software program in whole or part. Users 6 * media and as a part of the software program in whole or part. Users
7 * may copy or modify Sun RPC without charge, but are not authorized 7 * may copy or modify Sun RPC without charge, but are not authorized
8 * to license or distribute it to anyone else except as part of a product or 8 * to license or distribute it to anyone else except as part of a product or
9 * program developed by the user. 9 * program developed by the user.
10 *  10 *
11 * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE 11 * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
12 * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR 12 * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
13 * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. 13 * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
14 *  14 *
@@ -83,33 +83,33 @@ __END_DECLS @@ -83,33 +83,33 @@ __END_DECLS
83/* 83/*
84 * Memory based rpc for testing and timing. 84 * Memory based rpc for testing and timing.
85 */ 85 */
86__BEGIN_DECLS 86__BEGIN_DECLS
87extern SVCXPRT *svcraw_create(void); 87extern SVCXPRT *svcraw_create(void);
88__END_DECLS 88__END_DECLS
89 89
90 90
91/* 91/*
92 * Udp based rpc. 92 * Udp based rpc.
93 */ 93 */
94__BEGIN_DECLS 94__BEGIN_DECLS
95extern SVCXPRT *svcudp_create(int); 95extern SVCXPRT *svcudp_create(int);
96extern SVCXPRT *svcudp_bufcreate(int, unsigned, unsigned); 96extern SVCXPRT *svcudp_bufcreate(int, unsigned int, unsigned int);
97extern int svcudp_enablecache(SVCXPRT *, unsigned long); 97extern int svcudp_enablecache(SVCXPRT *, unsigned long);
98__END_DECLS 98__END_DECLS
99 99
100 100
101/* 101/*
102 * Tcp based rpc. 102 * Tcp based rpc.
103 */ 103 */
104__BEGIN_DECLS 104__BEGIN_DECLS
105extern SVCXPRT *svctcp_create(int, unsigned, unsigned); 105extern SVCXPRT *svctcp_create(int, unsigned int, unsigned int);
106__END_DECLS 106__END_DECLS
107 107
108/* 108/*
109 * Fd based rpc. 109 * Fd based rpc.
110 */ 110 */
111__BEGIN_DECLS 111__BEGIN_DECLS
112extern SVCXPRT *svcfd_create(int, unsigned, unsigned); 112extern SVCXPRT *svcfd_create(int, unsigned int, unsigned int);
113__END_DECLS 113__END_DECLS
114 114
115#endif /* !_RPC_SVC_SOC_H */ 115#endif /* !_RPC_SVC_SOC_H */

cvs diff -r1.28 -r1.29 src/include/rpc/Attic/xdr.h (expand / switch to unified diff)

--- src/include/rpc/Attic/xdr.h 2016/01/23 01:05:30 1.28
+++ src/include/rpc/Attic/xdr.h 2016/01/23 02:34:09 1.29
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: xdr.h,v 1.28 2016/01/23 01:05:30 dholland Exp $ */ 1/* $NetBSD: xdr.h,v 1.29 2016/01/23 02:34:09 dholland Exp $ */
2 2
3/* 3/*
4 * Sun RPC is a product of Sun Microsystems, Inc. and is provided for 4 * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
5 * unrestricted use provided that this legend is included on all tape 5 * unrestricted use provided that this legend is included on all tape
6 * media and as a part of the software program in whole or part. Users 6 * media and as a part of the software program in whole or part. Users
7 * may copy or modify Sun RPC without charge, but are not authorized 7 * may copy or modify Sun RPC without charge, but are not authorized
8 * to license or distribute it to anyone else except as part of a product or 8 * to license or distribute it to anyone else except as part of a product or
9 * program developed by the user. 9 * program developed by the user.
10 *  10 *
11 * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE 11 * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
12 * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR 12 * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
13 * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. 13 * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
14 *  14 *
@@ -94,44 +94,44 @@ enum xdr_op { @@ -94,44 +94,44 @@ enum xdr_op {
94 * The XDR handle. 94 * The XDR handle.
95 * Contains operation which is being applied to the stream, 95 * Contains operation which is being applied to the stream,
96 * an operations vector for the paticular implementation (e.g. see xdr_mem.c), 96 * an operations vector for the paticular implementation (e.g. see xdr_mem.c),
97 * and two private fields for the use of the particular impelementation. 97 * and two private fields for the use of the particular impelementation.
98 */ 98 */
99typedef struct __rpc_xdr { 99typedef struct __rpc_xdr {
100 enum xdr_op x_op; /* operation; fast additional param */ 100 enum xdr_op x_op; /* operation; fast additional param */
101 const struct xdr_ops { 101 const struct xdr_ops {
102 /* get a long from underlying stream */ 102 /* get a long from underlying stream */
103 bool_t (*x_getlong)(struct __rpc_xdr *, long *); 103 bool_t (*x_getlong)(struct __rpc_xdr *, long *);
104 /* put a long to " */ 104 /* put a long to " */
105 bool_t (*x_putlong)(struct __rpc_xdr *, const long *); 105 bool_t (*x_putlong)(struct __rpc_xdr *, const long *);
106 /* get some bytes from " */ 106 /* get some bytes from " */
107 bool_t (*x_getbytes)(struct __rpc_xdr *, char *, unsigned); 107 bool_t (*x_getbytes)(struct __rpc_xdr *, char *, unsigned int);
108 /* put some bytes to " */ 108 /* put some bytes to " */
109 bool_t (*x_putbytes)(struct __rpc_xdr *, const char *, 109 bool_t (*x_putbytes)(struct __rpc_xdr *, const char *,
110 unsigned); 110 unsigned int);
111 /* returns bytes off from beginning */ 111 /* returns bytes off from beginning */
112 unsigned (*x_getpostn)(struct __rpc_xdr *); 112 unsigned (*x_getpostn)(struct __rpc_xdr *);
113 /* lets you reposition the stream */ 113 /* lets you reposition the stream */
114 bool_t (*x_setpostn)(struct __rpc_xdr *, unsigned); 114 bool_t (*x_setpostn)(struct __rpc_xdr *, unsigned int);
115 /* buf quick ptr to buffered data */ 115 /* buf quick ptr to buffered data */
116 int32_t *(*x_inline)(struct __rpc_xdr *, unsigned); 116 int32_t *(*x_inline)(struct __rpc_xdr *, unsigned int);
117 /* free privates of this xdr_stream */ 117 /* free privates of this xdr_stream */
118 void (*x_destroy)(struct __rpc_xdr *); 118 void (*x_destroy)(struct __rpc_xdr *);
119 bool_t (*x_control)(struct __rpc_xdr *, int, void *); 119 bool_t (*x_control)(struct __rpc_xdr *, int, void *);
120 } *x_ops; 120 } *x_ops;
121 char * x_public; /* users' data */ 121 char * x_public; /* users' data */
122 void * x_private; /* pointer to private data */ 122 void * x_private; /* pointer to private data */
123 char * x_base; /* private used for position info */ 123 char * x_base; /* private used for position info */
124 unsigned x_handy; /* extra private word */ 124 unsigned int x_handy; /* extra private word */
125} XDR; 125} XDR;
126 126
127/* 127/*
128 * A xdrproc_t exists for each data type which is to be encoded or decoded. 128 * A xdrproc_t exists for each data type which is to be encoded or decoded.
129 * 129 *
130 * The second argument to the xdrproc_t is a pointer to an opaque pointer. 130 * The second argument to the xdrproc_t is a pointer to an opaque pointer.
131 * The opaque pointer generally points to a structure of the data type 131 * The opaque pointer generally points to a structure of the data type
132 * to be decoded. If this pointer is 0, then the type routines should 132 * to be decoded. If this pointer is 0, then the type routines should
133 * allocate dynamic storage of the appropriate size and return it. 133 * allocate dynamic storage of the appropriate size and return it.
134 */ 134 */
135typedef bool_t (*xdrproc_t)(XDR *, const void *);  135typedef bool_t (*xdrproc_t)(XDR *, const void *);
136 136
137/* 137/*
@@ -270,90 +270,92 @@ struct xdr_discrim { @@ -270,90 +270,92 @@ struct xdr_discrim {
270 270
271#define IXDR_PUT_BOOL(buf, v) IXDR_PUT_LONG((buf), (v)) 271#define IXDR_PUT_BOOL(buf, v) IXDR_PUT_LONG((buf), (v))
272#define IXDR_PUT_ENUM(buf, v) IXDR_PUT_LONG((buf), (v)) 272#define IXDR_PUT_ENUM(buf, v) IXDR_PUT_LONG((buf), (v))
273#define IXDR_PUT_U_LONG(buf, v) IXDR_PUT_LONG((buf), (v)) 273#define IXDR_PUT_U_LONG(buf, v) IXDR_PUT_LONG((buf), (v))
274#define IXDR_PUT_SHORT(buf, v) IXDR_PUT_LONG((buf), (v)) 274#define IXDR_PUT_SHORT(buf, v) IXDR_PUT_LONG((buf), (v))
275#define IXDR_PUT_U_SHORT(buf, v) IXDR_PUT_LONG((buf), (v)) 275#define IXDR_PUT_U_SHORT(buf, v) IXDR_PUT_LONG((buf), (v))
276 276
277/* 277/*
278 * These are the "generic" xdr routines. 278 * These are the "generic" xdr routines.
279 */ 279 */
280__BEGIN_DECLS 280__BEGIN_DECLS
281extern bool_t xdr_void(void); 281extern bool_t xdr_void(void);
282extern bool_t xdr_int(XDR *, int *); 282extern bool_t xdr_int(XDR *, int *);
283extern bool_t xdr_u_int(XDR *, unsigned *); 283extern bool_t xdr_u_int(XDR *, unsigned int *);
284extern bool_t xdr_long(XDR *, long *); 284extern bool_t xdr_long(XDR *, long *);
285extern bool_t xdr_u_long(XDR *, unsigned long *); 285extern bool_t xdr_u_long(XDR *, unsigned long *);
286extern bool_t xdr_short(XDR *, short *); 286extern bool_t xdr_short(XDR *, short *);
287extern bool_t xdr_u_short(XDR *, unsigned short *); 287extern bool_t xdr_u_short(XDR *, unsigned short *);
288extern bool_t xdr_int16_t(XDR *, int16_t *); 288extern bool_t xdr_int16_t(XDR *, int16_t *);
289extern bool_t xdr_u_int16_t(XDR *, uint16_t *); 289extern bool_t xdr_u_int16_t(XDR *, uint16_t *);
290extern bool_t xdr_int32_t(XDR *, int32_t *); 290extern bool_t xdr_int32_t(XDR *, int32_t *);
291extern bool_t xdr_u_int32_t(XDR *, uint32_t *); 291extern bool_t xdr_u_int32_t(XDR *, uint32_t *);
292extern bool_t xdr_int64_t(XDR *, int64_t *); 292extern bool_t xdr_int64_t(XDR *, int64_t *);
293extern bool_t xdr_u_int64_t(XDR *, uint64_t *); 293extern bool_t xdr_u_int64_t(XDR *, uint64_t *);
294extern bool_t xdr_bool(XDR *, bool_t *); 294extern bool_t xdr_bool(XDR *, bool_t *);
295extern bool_t xdr_enum(XDR *, enum_t *); 295extern bool_t xdr_enum(XDR *, enum_t *);
296extern bool_t xdr_array(XDR *, char **, unsigned *, unsigned, unsigned, xdrproc_t); 296extern bool_t xdr_array(XDR *, char **, unsigned int *, unsigned int,
297extern bool_t xdr_bytes(XDR *, char **, unsigned *, unsigned); 297 unsigned int, xdrproc_t);
298extern bool_t xdr_opaque(XDR *, char *, unsigned); 298extern bool_t xdr_bytes(XDR *, char **, unsigned int *, unsigned int);
299extern bool_t xdr_string(XDR *, char **, unsigned); 299extern bool_t xdr_opaque(XDR *, char *, unsigned int);
 300extern bool_t xdr_string(XDR *, char **, unsigned int);
300extern bool_t xdr_union(XDR *, enum_t *, char *, const struct xdr_discrim *, xdrproc_t); 301extern bool_t xdr_union(XDR *, enum_t *, char *, const struct xdr_discrim *, xdrproc_t);
301extern bool_t xdr_char(XDR *, char *); 302extern bool_t xdr_char(XDR *, char *);
302extern bool_t xdr_u_char(XDR *, unsigned char *); 303extern bool_t xdr_u_char(XDR *, unsigned char *);
303extern bool_t xdr_vector(XDR *, char *, unsigned, unsigned, xdrproc_t); 304extern bool_t xdr_vector(XDR *, char *, unsigned int, unsigned int,
 305 xdrproc_t);
304extern bool_t xdr_float(XDR *, float *); 306extern bool_t xdr_float(XDR *, float *);
305extern bool_t xdr_double(XDR *, double *); 307extern bool_t xdr_double(XDR *, double *);
306extern bool_t xdr_quadruple(XDR *, long double *); 308extern bool_t xdr_quadruple(XDR *, long double *);
307extern bool_t xdr_reference(XDR *, char **, unsigned, xdrproc_t); 309extern bool_t xdr_reference(XDR *, char **, unsigned int, xdrproc_t);
308extern bool_t xdr_pointer(XDR *, char **, unsigned, xdrproc_t); 310extern bool_t xdr_pointer(XDR *, char **, unsigned int, xdrproc_t);
309extern bool_t xdr_wrapstring(XDR *, char **); 311extern bool_t xdr_wrapstring(XDR *, char **);
310extern void xdr_free(xdrproc_t, char *); 312extern void xdr_free(xdrproc_t, char *);
311extern bool_t xdr_hyper(XDR *, longlong_t *); 313extern bool_t xdr_hyper(XDR *, longlong_t *);
312extern bool_t xdr_u_hyper(XDR *, u_longlong_t *); 314extern bool_t xdr_u_hyper(XDR *, u_longlong_t *);
313extern bool_t xdr_longlong_t(XDR *, longlong_t *); 315extern bool_t xdr_longlong_t(XDR *, longlong_t *);
314extern bool_t xdr_u_longlong_t(XDR *, u_longlong_t *); 316extern bool_t xdr_u_longlong_t(XDR *, u_longlong_t *);
315extern unsigned long xdr_sizeof(xdrproc_t, void *); 317extern unsigned long xdr_sizeof(xdrproc_t, void *);
316__END_DECLS 318__END_DECLS
317 319
318/* 320/*
319 * Common opaque bytes objects used by many rpc protocols; 321 * Common opaque bytes objects used by many rpc protocols;
320 * declared here due to commonality. 322 * declared here due to commonality.
321 */ 323 */
322#define MAX_NETOBJ_SZ 1024  324#define MAX_NETOBJ_SZ 1024
323struct netobj { 325struct netobj {
324 unsigned n_len; 326 unsigned int n_len;
325 char *n_bytes; 327 char *n_bytes;
326}; 328};
327typedef struct netobj netobj; 329typedef struct netobj netobj;
328extern bool_t xdr_netobj(XDR *, struct netobj *); 330extern bool_t xdr_netobj(XDR *, struct netobj *);
329 331
330/* 332/*
331 * These are the public routines for the various implementations of 333 * These are the public routines for the various implementations of
332 * xdr streams. 334 * xdr streams.
333 */ 335 */
334__BEGIN_DECLS 336__BEGIN_DECLS
335/* XDR using memory buffers */ 337/* XDR using memory buffers */
336extern void xdrmem_create(XDR *, char *, unsigned, enum xdr_op); 338extern void xdrmem_create(XDR *, char *, unsigned int, enum xdr_op);
337 339
338/* XDR using stdio library */ 340/* XDR using stdio library */
339#ifdef _STDIO_H_ 341#ifdef _STDIO_H_
340extern void xdrstdio_create(XDR *, FILE *, enum xdr_op); 342extern void xdrstdio_create(XDR *, FILE *, enum xdr_op);
341#endif 343#endif
342 344
343/* XDR pseudo records for tcp */ 345/* XDR pseudo records for tcp */
344extern void xdrrec_create(XDR *, unsigned, unsigned, char *, 346extern void xdrrec_create(XDR *, unsigned int, unsigned int, char *,
345 int (*)(char *, char *, int), 347 int (*)(char *, char *, int),
346 int (*)(char *, char *, int)); 348 int (*)(char *, char *, int));
347 349
348/* make end of xdr record */ 350/* make end of xdr record */
349extern bool_t xdrrec_endofrecord(XDR *, int); 351extern bool_t xdrrec_endofrecord(XDR *, int);
350 352
351/* move to beginning of next record */ 353/* move to beginning of next record */
352extern bool_t xdrrec_skiprecord(XDR *); 354extern bool_t xdrrec_skiprecord(XDR *);
353 355
354/* true if no more input */ 356/* true if no more input */
355extern bool_t xdrrec_eof(XDR *); 357extern bool_t xdrrec_eof(XDR *);
356extern unsigned xdrrec_readbytes(XDR *, caddr_t, unsigned); 358extern unsigned xdrrec_readbytes(XDR *, caddr_t, unsigned int);
357__END_DECLS 359__END_DECLS
358 360
359#endif /* !_RPC_XDR_H_ */ 361#endif /* !_RPC_XDR_H_ */