summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorchristos <christos@NetBSD.org>1995-07-14 21:10:58 +0000
committerchristos <christos@NetBSD.org>1995-07-14 21:10:58 +0000
commit3a00fc6b74007c2670711d564d2985787b68df9e (patch)
tree1d7dc96d5d518d8d5d8e417b215830e008e9fc19 /include
parenta667b8f7d4b2976bd9c3e194efa2c255fb2511ae (diff)
- Const poisoning
- Fix prototypes
Diffstat (limited to 'include')
-rw-r--r--include/rpcsvc/yp_prot.h74
-rw-r--r--include/rpcsvc/ypclnt.h49
2 files changed, 67 insertions, 56 deletions
diff --git a/include/rpcsvc/yp_prot.h b/include/rpcsvc/yp_prot.h
index eb21decb966..37b2c2702e7 100644
--- a/include/rpcsvc/yp_prot.h
+++ b/include/rpcsvc/yp_prot.h
@@ -1,4 +1,4 @@
-/* $NetBSD: yp_prot.h,v 1.5 1994/10/26 00:57:10 cgd Exp $ */
+/* $NetBSD: yp_prot.h,v 1.6 1995/07/14 21:10:58 christos Exp $ */
/*
* Copyright (c) 1992, 1993 Theo de Raadt <deraadt@fsa.ca>
@@ -31,8 +31,8 @@
* SUCH DAMAGE.
*/
-#ifndef _YP_PROT_H_
-#define _YP_PROT_H_
+#ifndef _RPCSVC_YP_PROT_H_
+#define _RPCSVC_YP_PROT_H_
/*
* YPSERV PROTOCOL:
@@ -74,27 +74,8 @@ typedef u_int bool;
#define BOOL_DEFINED
#endif
-bool_t xdr_datum();
-bool_t xdr_ypdomain_wrap_string();
-bool_t xdr_ypmap_wrap_string();
-bool_t xdr_ypreq_key();
-bool_t xdr_ypreq_nokey();
-bool_t xdr_ypreq_xfr();
-bool_t xdr_ypresp_val();
-bool_t xdr_ypresp_key_val();
-bool_t xdr_ypbind_resp();
-bool_t xdr_ypbind_setdom();
-bool_t xdr_yp_inaddr();
-bool_t xdr_ypmap_parms();
-bool_t xdr_ypowner_wrap_string();
-bool_t xdr_yppushresp_xfr();
-bool_t xdr_ypresp_order();
-bool_t xdr_ypresp_master();
-bool_t xdr_ypall();
-bool_t xdr_ypresp_maplist();
/* Program and version symbols, magic numbers */
-
#define YPPROG ((u_long)100004)
#define YPVERS ((u_long)2)
#define YPVERS_ORIG ((u_long)1)
@@ -112,28 +93,28 @@ bool_t xdr_ypresp_maplist();
#ifndef DATUM
typedef struct {
- char *dptr;
- int dsize;
+ const char *dptr;
+ int dsize;
} datum;
#define DATUM
#endif
struct ypmap_parms {
- char *domain;
- char *map;
+ const char *domain;
+ const char *map;
u_long ordernum;
char *owner;
};
struct ypreq_key {
- char *domain;
- char *map;
+ const char *domain;
+ const char *map;
datum keydat;
};
struct ypreq_nokey {
- char *domain;
- char *map;
+ const char *domain;
+ const char *map;
};
struct ypreq_xfr {
@@ -168,6 +149,13 @@ struct ypresp_order {
u_long ordernum;
};
+struct ypresp_all {
+ bool_t more;
+ union {
+ struct ypresp_key_val val;
+ } ypresp_all_u;
+};
+
struct ypmaplist {
char ypml_name[YPMAXMAP + 1];
struct ypmaplist *ypml_next;
@@ -329,4 +317,28 @@ struct yppushresp_xfr {
#define YPPUSH_XFRERR ((long)-13) /* ypxfr error */
#define YPPUSH_REFUSED ((long)-14) /* Transfer request refused by ypserv */
-#endif /* _YP_PROT_H_ */
+__BEGIN_DECLS
+bool_t xdr_domainname __P((XDR *, char *));
+bool_t xdr_peername __P((XDR *, char *));
+bool_t xdr_datum __P((XDR *, datum *));
+bool_t xdr_mapname __P((XDR *, char *));
+bool_t xdr_ypreq_key __P((XDR *, struct ypreq_key *));
+bool_t xdr_ypreq_nokey __P((XDR *, struct ypreq_nokey *));
+bool_t xdr_yp_inaddr __P((XDR *, struct in_addr *));
+bool_t xdr_ypbind_binding __P((XDR *, struct ypbind_binding *));
+bool_t xdr_ypbind_resptype __P((XDR *, enum ypbind_resptype *));
+bool_t xdr_ypstat __P((XDR *, enum ypbind_resptype *));
+bool_t xdr_ypbind_resp __P((XDR *, struct ypbind_resp *));
+bool_t xdr_ypresp_val __P((XDR *, struct ypresp_val *));
+bool_t xdr_ypbind_setdom __P((XDR *, struct ypbind_setdom *));
+bool_t xdr_ypresp_key_val __P((XDR *, struct ypresp_key_val *));
+bool_t xdr_ypresp_all __P((XDR *, struct ypresp_all *));
+bool_t xdr_ypresp_all_seq __P((XDR *, u_long *));
+bool_t xdr_ypresp_master __P((XDR *, struct ypresp_master *));
+bool_t xdr_ypmaplist_str __P((XDR *, char *));
+bool_t xdr_ypmaplist __P((XDR *, struct ypmaplist *));
+bool_t xdr_ypresp_maplist __P((XDR *, struct ypresp_maplist *));
+bool_t xdr_ypresp_order __P((XDR *, struct ypresp_order *));
+__END_DECLS
+
+#endif /* _RPCSVC_YP_PROT_H_ */
diff --git a/include/rpcsvc/ypclnt.h b/include/rpcsvc/ypclnt.h
index 38a2593bd9e..dcdfce4884a 100644
--- a/include/rpcsvc/ypclnt.h
+++ b/include/rpcsvc/ypclnt.h
@@ -1,4 +1,4 @@
-/* $NetBSD: ypclnt.h,v 1.6 1994/10/26 00:57:11 cgd Exp $ */
+/* $NetBSD: ypclnt.h,v 1.7 1995/07/14 21:11:10 christos Exp $ */
/*
* Copyright (c) 1992, 1993 Theo de Raadt <deraadt@fsa.ca>
@@ -31,8 +31,8 @@
* SUCH DAMAGE.
*/
-#ifndef _YPCLNT_H_
-#define _YPCLNT_H_
+#ifndef _RPCSVC_YPCLNT_H_
+#define _RPCSVC_YPCLNT_H_
#define YPERR_BADARGS 1 /* args to function are bad */
#define YPERR_RPC 2 /* RPC failure */
@@ -60,30 +60,29 @@
#define YPOP_STORE 4 /* add, or change */
struct ypall_callback {
- int (*foreach)(); /* return non-0 to stop getting called */
+ /* return non-0 to stop getting called */
+ int (*foreach) __P((u_long, char *, int, char *, int, void *));
char *data; /* opaque pointer for use of callback fn */
};
-int yp_bind __P((char *dom));
+__BEGIN_DECLS
+int yp_bind __P((const char *));
struct dom_binding;
-int _yp_dobind __P((char *dom, struct dom_binding **ypdb));
-void yp_unbind __P((char *dom));
-int yp_get_default_domain __P((char **domp));
-int yp_match __P((char *indomain, char *inmap,
- const char *inkey, int inkeylen, char **outval,
- int *outvallen));
-int yp_first __P((char *indomain, char *inmap,
- char **outkey, int *outkeylen, char **outval,
- int *outvallen));
-int yp_next __P((char *indomain, char *inmap,
- char *inkey, int inkeylen, char **outkey,
- int *outkeylen, char **outval, int *outvallen));
-int yp_master __P((char *indomain, char *inmap, char **outname));
-int yp_order __P((char *indomain, char *inmap, int *outorder));
-int yp_all __P((char *indomain, char *inmap,
- struct ypall_callback *incallback));
-char * yperr_string __P((int incode));
-int ypprot_err __P((unsigned int incode));
-
-#endif /* _YPCLNT_H_ */
+int _yp_dobind __P((const char *, struct dom_binding **));
+void yp_unbind __P((const char *));
+int yp_get_default_domain __P((char **));
+int yp_match __P((const char *, const char *, const char *,
+ int , char **, int *));
+int yp_first __P((const char *, const char *, char **, int *,
+ char **, int *));
+int yp_next __P((const char *, const char *, const char *,
+ int, char **, int *, char **, int *));
+int yp_master __P((const char *, const char *, char **));
+int yp_order __P((const char *, const char *, int *));
+int yp_all __P((const char *, const char *,
+ struct ypall_callback *));
+char * yperr_string __P((int));
+int ypprot_err __P((unsigned int));
+__END_DECLS
+#endif /* _RPCSVC_YPCLNT_H_ */