summaryrefslogtreecommitdiffstats
path: root/freebsd/include/rpc
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-10-07 15:10:20 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2017-01-10 09:53:31 +0100
commitc40e45b75eb76d79a05c7fa85c1fa9b5c728a12f (patch)
treead4f2519067709f00ab98b3c591186c26dc3a21f /freebsd/include/rpc
parentuserspace-header-gen.py: Simplify program ports (diff)
downloadrtems-libbsd-c40e45b75eb76d79a05c7fa85c1fa9b5c728a12f.tar.bz2
Update to FreeBSD head 2016-08-23
Git mirror commit 9fe7c416e6abb28b1398fd3e5687099846800cfd.
Diffstat (limited to 'freebsd/include/rpc')
-rw-r--r--freebsd/include/rpc/rpcent.h2
-rw-r--r--freebsd/include/rpc/svc.h9
-rw-r--r--freebsd/include/rpc/xdr.h16
3 files changed, 12 insertions, 15 deletions
diff --git a/freebsd/include/rpc/rpcent.h b/freebsd/include/rpc/rpcent.h
index 405ba678..c1650fa4 100644
--- a/freebsd/include/rpc/rpcent.h
+++ b/freebsd/include/rpc/rpcent.h
@@ -56,7 +56,7 @@ __BEGIN_DECLS
* These interfaces are currently implemented through nsswitch and are
* MT-safe.
*/
-extern struct rpcent *getrpcbyname(char *);
+extern struct rpcent *getrpcbyname(const char *);
extern struct rpcent *getrpcbynumber(int);
extern struct rpcent *getrpcent(void);
extern void setrpcent(int);
diff --git a/freebsd/include/rpc/svc.h b/freebsd/include/rpc/svc.h
index 51f278ae..c7989b03 100644
--- a/freebsd/include/rpc/svc.h
+++ b/freebsd/include/rpc/svc.h
@@ -90,6 +90,7 @@ enum xprt_stat {
*/
typedef struct __rpc_svcxprt {
int xp_fd;
+#define xp_sock xp_fd
u_short xp_port; /* associated port number */
const struct xp_ops {
/* receive incoming requests */
@@ -226,7 +227,7 @@ struct svc_req {
* const SVCXPRT *xprt;
* const rpcprog_t prog;
* const rpcvers_t vers;
- * const void (*dispatch)();
+ * const void (*dispatch)(struct svc_req *, SVCXPRT *);
* const struct netconfig *nconf;
*/
@@ -314,7 +315,7 @@ __END_DECLS
* Somebody has to wait for incoming requests and then call the correct
* service routine. The routine svc_run does infinite waiting; i.e.,
* svc_run never returns.
- * Since another (co-existant) package may wish to selectively wait for
+ * Since another (co-existent) package may wish to selectively wait for
* incoming calls or other events outside of the rpc architecture, the
* routine svc_getreq is provided. It must be passed readfds, the
* "in-place" results of a select system call (see select, section 2).
@@ -376,7 +377,7 @@ __BEGIN_DECLS
extern int svc_create(void (*)(struct svc_req *, SVCXPRT *),
const rpcprog_t, const rpcvers_t, const char *);
/*
- * void (*dispatch)(); -- dispatch routine
+ * void (*dispatch)(struct svc_req *, SVCXPRT *);
* const rpcprog_t prognum; -- program number
* const rpcvers_t versnum; -- version number
* const char *nettype; -- network type
@@ -392,7 +393,7 @@ extern SVCXPRT *svc_tp_create(void (*)(struct svc_req *, SVCXPRT *),
const rpcprog_t, const rpcvers_t,
const struct netconfig *);
/*
- * void (*dispatch)(); -- dispatch routine
+ * void (*dispatch)(struct svc_req *, SVCXPRT *);
* const rpcprog_t prognum; -- program number
* const rpcvers_t versnum; -- version number
* const struct netconfig *nconf; -- netconfig structure
diff --git a/freebsd/include/rpc/xdr.h b/freebsd/include/rpc/xdr.h
index 9456f70c..daee333f 100644
--- a/freebsd/include/rpc/xdr.h
+++ b/freebsd/include/rpc/xdr.h
@@ -219,15 +219,11 @@ xdr_putint32(XDR *xdrs, int32_t *ip)
(*(xdrs)->x_ops->x_control)(xdrs, req, op)
#define xdr_control(xdrs, req, op) XDR_CONTROL(xdrs, req, op)
-/*
- * Solaris strips the '_t' from these types -- not sure why.
- * But, let's be compatible.
- */
-#define xdr_rpcvers(xdrs, versp) xdr_u_int32(xdrs, versp)
-#define xdr_rpcprog(xdrs, progp) xdr_u_int32(xdrs, progp)
-#define xdr_rpcproc(xdrs, procp) xdr_u_int32(xdrs, procp)
-#define xdr_rpcprot(xdrs, protp) xdr_u_int32(xdrs, protp)
-#define xdr_rpcport(xdrs, portp) xdr_u_int32(xdrs, portp)
+#define xdr_rpcvers(xdrs, versp) xdr_u_int32_t(xdrs, versp)
+#define xdr_rpcprog(xdrs, progp) xdr_u_int32_t(xdrs, progp)
+#define xdr_rpcproc(xdrs, procp) xdr_u_int32_t(xdrs, procp)
+#define xdr_rpcprot(xdrs, protp) xdr_u_int32_t(xdrs, protp)
+#define xdr_rpcport(xdrs, portp) xdr_u_int32_t(xdrs, portp)
/*
* Support struct for discriminated unions.
@@ -355,7 +351,7 @@ extern void xdrrec_create(XDR *, u_int, u_int, void *,
int (*)(void *, void *, int));
/* make end of xdr record */
-extern bool_t xdrrec_endofrecord(XDR *, int);
+extern bool_t xdrrec_endofrecord(XDR *, bool_t);
/* move to beginning of next record */
extern bool_t xdrrec_skiprecord(XDR *);