summaryrefslogtreecommitdiff
path: root/nis/rpcsvc
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1996-12-11 01:40:39 +0000
committerUlrich Drepper <drepper@redhat.com>1996-12-11 01:40:39 +0000
commit6259ec0d78fd301572fcb616fdfa0500b828a824 (patch)
treeb1a008ed66281799defcaf56a92d3b592ca1f34a /nis/rpcsvc
parentaee321f468f9214700b24e7aef39ef27bda4c42c (diff)
update from main arcive 961210cvs/libc-961211
Wed Dec 11 01:04:30 1996 Ulrich Drepper <drepper@cygnus.com> Add NIS NSS implementation. * shlib-versions: Add versions for NIS libraries. * sysdeps/unix/inet/Subdirs: Add nis. * nis/Banner: New file. * nis/Makefile: New file. * nis/nss-nis.h: New file. * nis/yp_xdr.h: New file. * nis/ypclnt.h: New file. * nis/ypupdate_xdr.c: New file. * nis/nss_compat/compat-grp.c: New file. * nis/nss_compat/compat-pwd.c: New file. * nis/nss_compat/compat-spwd.c: New file. * nis/nss_nis/nis-alias.c: New file. * nis/nss_nis/nis-ethers.c: New file. * nis/nss_nis/nis-grp.c: New file. * nis/nss_nis/nis-hosts.c: New file. * nis/nss_nis/nis-netgrp.c: New file. * nis/nss_nis/nis-network.c: New file. * nis/nss_nis/nis-proto.c: New file. * nis/nss_nis/nis-publickey.c: New file. * nis/nss_nis/nis-pwd.c: New file. * nis/nss_nis/nis-rpc.c: New file. * nis/nss_nis/nis-service.c: New file. * nis/nss_nis/nis-spwd.c: New file. * nis/rpcsvc/yp.h: New file. * nis/rpcsvc/yp.x: New file. * nis/rpcsvc/yp_prot.h: New file. * nis/rpcsvc/ypclnt.h: New file. * nis/rpcsvc/ypupd.h: New file. * libio/_G_config.h: Define _G_HAVE_SYS_WAIT and _G_HAVE_PRINTF_FP. * locale/C-numeric.c: Update copyright. * locale/Makefile: Add rules to build libBrokenLocale. * locale/broken_cur_max.c: New file. * locale/mb_cur_max.c: Update copyright. (__ctype_get_mb_cur_max): Make function weak. * new-malloc/malloc.c: Correct copyright. * new-malloc/thread-m.h: Correct key handling. * shadow/lckpwdf.c: Update copyright. (PWD_LOCKFILE): Change to /etc/.pwd.lock. * stdlib/strtod.c: Add another assertion. * stdlib/tst-strtod.c: Add another test case. * sysdeps/generic/paths.h: Add _PATH_PRESERVE. Needed by nvi. * sysdeps/unix/sysv/linux/paths.h: Likewise. * sysdeps/gnu/utmpbits.h: Rename ut_addr field to ut_addr_v6. ut_addr names a single element in ut_addr_v6. * sysdeps/mach/hurd/xmknod.c: Remove alias from __mknod to mknod. Patch by Thomas Bushnell, n/BSG. Tue Dec 10 11:35:28 1996 Richard Henderson <rth@tamu.edu> * sysdeps/alpha/strncmp.S: Fix aligned short truncated compare corner condition. * sysdeps/alpha/memchr.S: Don't read ahead, even if the load did fit nicely into that delay slot (patch from David Mosberger-Tang). Mon Dec 9 23:53:43 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu> * sysdeps/mach/hurd/ttyname_r.c (__ttyname_r): Renamed from `ttyname_r'. (ttyname_r): New alias. * stdio-common/printf_fp.c (__guess_grouping): Fix off by one
Diffstat (limited to 'nis/rpcsvc')
-rw-r--r--nis/rpcsvc/yp.h611
-rw-r--r--nis/rpcsvc/yp.x300
-rw-r--r--nis/rpcsvc/yp_prot.h334
-rw-r--r--nis/rpcsvc/ypclnt.h88
-rw-r--r--nis/rpcsvc/ypupd.h88
5 files changed, 1421 insertions, 0 deletions
diff --git a/nis/rpcsvc/yp.h b/nis/rpcsvc/yp.h
new file mode 100644
index 0000000000..f625eced50
--- /dev/null
+++ b/nis/rpcsvc/yp.h
@@ -0,0 +1,611 @@
+/*
+ * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
+ * unrestricted use provided that this legend is included on all tape
+ * media and as a part of the software program in whole or part. Users
+ * may copy or modify Sun RPC without charge, but are not authorized
+ * to license or distribute it to anyone else except as part of a product or
+ * program developed by the user.
+ *
+ * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
+ * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
+ *
+ * Sun RPC is provided with no support and without any obligation on the
+ * part of Sun Microsystems, Inc. to assist in its use, correction,
+ * modification or enhancement.
+ *
+ * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
+ * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
+ * OR ANY PART THEREOF.
+ *
+ * In no event will Sun Microsystems, Inc. be liable for any lost revenue
+ * or profits or other special, indirect and consequential damages, even if
+ * Sun has been advised of the possibility of such damages.
+ *
+ * Sun Microsystems, Inc.
+ * 2550 Garcia Avenue
+ * Mountain View, California 94043
+ */
+
+#ifndef __RPCSVC_YP_H__
+#define __RPCSVC_YP_H__
+
+#include <rpc/rpc.h>
+
+#define YPMAXRECORD 1024
+#define YPMAXDOMAIN 64
+#define YPMAXMAP 64
+#define YPMAXPEER 64
+
+enum ypstat {
+ YP_TRUE = 1,
+ YP_NOMORE = 2,
+ YP_FALSE = 0,
+ YP_NOMAP = -1,
+ YP_NODOM = -2,
+ YP_NOKEY = -3,
+ YP_BADOP = -4,
+ YP_BADDB = -5,
+ YP_YPERR = -6,
+ YP_BADARGS = -7,
+ YP_VERS = -8,
+};
+typedef enum ypstat ypstat;
+#ifdef __cplusplus
+extern "C" bool_t xdr_ypstat(XDR *, ypstat*);
+#elif __STDC__
+extern bool_t xdr_ypstat(XDR *, ypstat*);
+#else /* Old Style C */
+bool_t xdr_ypstat();
+#endif /* Old Style C */
+
+
+enum ypxfrstat {
+ YPXFR_SUCC = 1,
+ YPXFR_AGE = 2,
+ YPXFR_NOMAP = -1,
+ YPXFR_NODOM = -2,
+ YPXFR_RSRC = -3,
+ YPXFR_RPC = -4,
+ YPXFR_MADDR = -5,
+ YPXFR_YPERR = -6,
+ YPXFR_BADARGS = -7,
+ YPXFR_DBM = -8,
+ YPXFR_FILE = -9,
+ YPXFR_SKEW = -10,
+ YPXFR_CLEAR = -11,
+ YPXFR_FORCE = -12,
+ YPXFR_XFRERR = -13,
+ YPXFR_REFUSED = -14,
+};
+typedef enum ypxfrstat ypxfrstat;
+#ifdef __cplusplus
+extern "C" bool_t xdr_ypxfrstat(XDR *, ypxfrstat*);
+#elif __STDC__
+extern bool_t xdr_ypxfrstat(XDR *, ypxfrstat*);
+#else /* Old Style C */
+bool_t xdr_ypxfrstat();
+#endif /* Old Style C */
+
+
+typedef char *domainname;
+#ifdef __cplusplus
+extern "C" bool_t xdr_domainname(XDR *, domainname*);
+#elif __STDC__
+extern bool_t xdr_domainname(XDR *, domainname*);
+#else /* Old Style C */
+bool_t xdr_domainname();
+#endif /* Old Style C */
+
+
+typedef char *mapname;
+#ifdef __cplusplus
+extern "C" bool_t xdr_mapname(XDR *, mapname*);
+#elif __STDC__
+extern bool_t xdr_mapname(XDR *, mapname*);
+#else /* Old Style C */
+bool_t xdr_mapname();
+#endif /* Old Style C */
+
+
+typedef char *peername;
+#ifdef __cplusplus
+extern "C" bool_t xdr_peername(XDR *, peername*);
+#elif __STDC__
+extern bool_t xdr_peername(XDR *, peername*);
+#else /* Old Style C */
+bool_t xdr_peername();
+#endif /* Old Style C */
+
+
+typedef struct {
+ u_int keydat_len;
+ char *keydat_val;
+} keydat;
+#ifdef __cplusplus
+extern "C" bool_t xdr_keydat(XDR *, keydat*);
+#elif __STDC__
+extern bool_t xdr_keydat(XDR *, keydat*);
+#else /* Old Style C */
+bool_t xdr_keydat();
+#endif /* Old Style C */
+
+
+typedef struct {
+ u_int valdat_len;
+ char *valdat_val;
+} valdat;
+#ifdef __cplusplus
+extern "C" bool_t xdr_valdat(XDR *, valdat*);
+#elif __STDC__
+extern bool_t xdr_valdat(XDR *, valdat*);
+#else /* Old Style C */
+bool_t xdr_valdat();
+#endif /* Old Style C */
+
+
+struct ypmap_parms {
+ domainname domain;
+ mapname map;
+ u_int ordernum;
+ peername peer;
+};
+typedef struct ypmap_parms ypmap_parms;
+#ifdef __cplusplus
+extern "C" bool_t xdr_ypmap_parms(XDR *, ypmap_parms*);
+#elif __STDC__
+extern bool_t xdr_ypmap_parms(XDR *, ypmap_parms*);
+#else /* Old Style C */
+bool_t xdr_ypmap_parms();
+#endif /* Old Style C */
+
+
+struct ypreq_key {
+ domainname domain;
+ mapname map;
+ keydat key;
+};
+typedef struct ypreq_key ypreq_key;
+#ifdef __cplusplus
+extern "C" bool_t xdr_ypreq_key(XDR *, ypreq_key*);
+#elif __STDC__
+extern bool_t xdr_ypreq_key(XDR *, ypreq_key*);
+#else /* Old Style C */
+bool_t xdr_ypreq_key();
+#endif /* Old Style C */
+
+
+struct ypreq_nokey {
+ domainname domain;
+ mapname map;
+};
+typedef struct ypreq_nokey ypreq_nokey;
+#ifdef __cplusplus
+extern "C" bool_t xdr_ypreq_nokey(XDR *, ypreq_nokey*);
+#elif __STDC__
+extern bool_t xdr_ypreq_nokey(XDR *, ypreq_nokey*);
+#else /* Old Style C */
+bool_t xdr_ypreq_nokey();
+#endif /* Old Style C */
+
+
+struct ypreq_xfr {
+ ypmap_parms map_parms;
+ u_int transid;
+ u_int prog;
+ u_int port;
+};
+typedef struct ypreq_xfr ypreq_xfr;
+#ifdef __cplusplus
+extern "C" bool_t xdr_ypreq_xfr(XDR *, ypreq_xfr*);
+#elif __STDC__
+extern bool_t xdr_ypreq_xfr(XDR *, ypreq_xfr*);
+#else /* Old Style C */
+bool_t xdr_ypreq_xfr();
+#endif /* Old Style C */
+
+
+struct ypresp_val {
+ ypstat stat;
+ valdat val;
+};
+typedef struct ypresp_val ypresp_val;
+#ifdef __cplusplus
+extern "C" bool_t xdr_ypresp_val(XDR *, ypresp_val*);
+#elif __STDC__
+extern bool_t xdr_ypresp_val(XDR *, ypresp_val*);
+#else /* Old Style C */
+bool_t xdr_ypresp_val();
+#endif /* Old Style C */
+
+
+struct ypresp_key_val {
+ ypstat stat;
+ valdat val;
+ keydat key;
+};
+typedef struct ypresp_key_val ypresp_key_val;
+#ifdef __cplusplus
+extern "C" bool_t xdr_ypresp_key_val(XDR *, ypresp_key_val*);
+#elif __STDC__
+extern bool_t xdr_ypresp_key_val(XDR *, ypresp_key_val*);
+#else /* Old Style C */
+bool_t xdr_ypresp_key_val();
+#endif /* Old Style C */
+
+
+struct ypresp_master {
+ ypstat stat;
+ peername peer;
+};
+typedef struct ypresp_master ypresp_master;
+#ifdef __cplusplus
+extern "C" bool_t xdr_ypresp_master(XDR *, ypresp_master*);
+#elif __STDC__
+extern bool_t xdr_ypresp_master(XDR *, ypresp_master*);
+#else /* Old Style C */
+bool_t xdr_ypresp_master();
+#endif /* Old Style C */
+
+
+struct ypresp_order {
+ ypstat stat;
+ u_int ordernum;
+};
+typedef struct ypresp_order ypresp_order;
+#ifdef __cplusplus
+extern "C" bool_t xdr_ypresp_order(XDR *, ypresp_order*);
+#elif __STDC__
+extern bool_t xdr_ypresp_order(XDR *, ypresp_order*);
+#else /* Old Style C */
+bool_t xdr_ypresp_order();
+#endif /* Old Style C */
+
+
+struct ypresp_all {
+ bool_t more;
+ union {
+ ypresp_key_val val;
+ } ypresp_all_u;
+};
+typedef struct ypresp_all ypresp_all;
+#ifdef __cplusplus
+extern "C" bool_t xdr_ypresp_all(XDR *, ypresp_all*);
+#elif __STDC__
+extern bool_t xdr_ypresp_all(XDR *, ypresp_all*);
+#else /* Old Style C */
+bool_t xdr_ypresp_all();
+#endif /* Old Style C */
+
+
+struct ypresp_xfr {
+ u_int transid;
+ ypxfrstat xfrstat;
+};
+typedef struct ypresp_xfr ypresp_xfr;
+#ifdef __cplusplus
+extern "C" bool_t xdr_ypresp_xfr(XDR *, ypresp_xfr*);
+#elif __STDC__
+extern bool_t xdr_ypresp_xfr(XDR *, ypresp_xfr*);
+#else /* Old Style C */
+bool_t xdr_ypresp_xfr();
+#endif /* Old Style C */
+
+
+struct ypmaplist {
+ mapname map;
+ struct ypmaplist *next;
+};
+typedef struct ypmaplist ypmaplist;
+#ifdef __cplusplus
+extern "C" bool_t xdr_ypmaplist(XDR *, ypmaplist*);
+#elif __STDC__
+extern bool_t xdr_ypmaplist(XDR *, ypmaplist*);
+#else /* Old Style C */
+bool_t xdr_ypmaplist();
+#endif /* Old Style C */
+
+
+struct ypresp_maplist {
+ ypstat stat;
+ ypmaplist *maps;
+};
+typedef struct ypresp_maplist ypresp_maplist;
+#ifdef __cplusplus
+extern "C" bool_t xdr_ypresp_maplist(XDR *, ypresp_maplist*);
+#elif __STDC__
+extern bool_t xdr_ypresp_maplist(XDR *, ypresp_maplist*);
+#else /* Old Style C */
+bool_t xdr_ypresp_maplist();
+#endif /* Old Style C */
+
+
+enum yppush_status {
+ YPPUSH_SUCC = 1,
+ YPPUSH_AGE = 2,
+ YPPUSH_NOMAP = -1,
+ YPPUSH_NODOM = -2,
+ YPPUSH_RSRC = -3,
+ YPPUSH_RPC = -4,
+ YPPUSH_MADDR = -5,
+ YPPUSH_YPERR = -6,
+ YPPUSH_BADARGS = -7,
+ YPPUSH_DBM = -8,
+ YPPUSH_FILE = -9,
+ YPPUSH_SKEW = -10,
+ YPPUSH_CLEAR = -11,
+ YPPUSH_FORCE = -12,
+ YPPUSH_XFRERR = -13,
+ YPPUSH_REFUSED = -14,
+};
+typedef enum yppush_status yppush_status;
+#ifdef __cplusplus
+extern "C" bool_t xdr_yppush_status(XDR *, yppush_status*);
+#elif __STDC__
+extern bool_t xdr_yppush_status(XDR *, yppush_status*);
+#else /* Old Style C */
+bool_t xdr_yppush_status();
+#endif /* Old Style C */
+
+
+struct yppushresp_xfr {
+ u_int transid;
+ yppush_status status;
+};
+typedef struct yppushresp_xfr yppushresp_xfr;
+#ifdef __cplusplus
+extern "C" bool_t xdr_yppushresp_xfr(XDR *, yppushresp_xfr*);
+#elif __STDC__
+extern bool_t xdr_yppushresp_xfr(XDR *, yppushresp_xfr*);
+#else /* Old Style C */
+bool_t xdr_yppushresp_xfr();
+#endif /* Old Style C */
+
+
+enum ypbind_resptype {
+ YPBIND_SUCC_VAL = 1,
+ YPBIND_FAIL_VAL = 2,
+};
+typedef enum ypbind_resptype ypbind_resptype;
+#ifdef __cplusplus
+extern "C" bool_t xdr_ypbind_resptype(XDR *, ypbind_resptype*);
+#elif __STDC__
+extern bool_t xdr_ypbind_resptype(XDR *, ypbind_resptype*);
+#else /* Old Style C */
+bool_t xdr_ypbind_resptype();
+#endif /* Old Style C */
+
+
+struct ypbind_binding {
+ char ypbind_binding_addr[4];
+ char ypbind_binding_port[2];
+};
+typedef struct ypbind_binding ypbind_binding;
+#ifdef __cplusplus
+extern "C" bool_t xdr_ypbind_binding(XDR *, ypbind_binding*);
+#elif __STDC__
+extern bool_t xdr_ypbind_binding(XDR *, ypbind_binding*);
+#else /* Old Style C */
+bool_t xdr_ypbind_binding();
+#endif /* Old Style C */
+
+
+struct ypbind_resp {
+ ypbind_resptype ypbind_status;
+ union {
+ u_int ypbind_error;
+ ypbind_binding ypbind_bindinfo;
+ } ypbind_resp_u;
+};
+typedef struct ypbind_resp ypbind_resp;
+#ifdef __cplusplus
+extern "C" bool_t xdr_ypbind_resp(XDR *, ypbind_resp*);
+#elif __STDC__
+extern bool_t xdr_ypbind_resp(XDR *, ypbind_resp*);
+#else /* Old Style C */
+bool_t xdr_ypbind_resp();
+#endif /* Old Style C */
+
+#define YPBIND_ERR_ERR 1
+#define YPBIND_ERR_NOSERV 2
+#define YPBIND_ERR_RESC 3
+
+struct ypbind_setdom {
+ domainname ypsetdom_domain;
+ ypbind_binding ypsetdom_binding;
+ u_int ypsetdom_vers;
+};
+typedef struct ypbind_setdom ypbind_setdom;
+#ifdef __cplusplus
+extern "C" bool_t xdr_ypbind_setdom(XDR *, ypbind_setdom*);
+#elif __STDC__
+extern bool_t xdr_ypbind_setdom(XDR *, ypbind_setdom*);
+#else /* Old Style C */
+bool_t xdr_ypbind_setdom();
+#endif /* Old Style C */
+
+
+#define YPPROG ((u_long)100004)
+#define YPVERS ((u_long)2)
+
+#ifdef __cplusplus
+#define YPPROC_NULL ((u_long)0)
+extern "C" void * ypproc_null_2(void *, CLIENT *);
+extern "C" void * ypproc_null_2_svc(void *, struct svc_req *);
+#define YPPROC_DOMAIN ((u_long)1)
+extern "C" bool_t * ypproc_domain_2(domainname *, CLIENT *);
+extern "C" bool_t * ypproc_domain_2_svc(domainname *, struct svc_req *);
+#define YPPROC_DOMAIN_NONACK ((u_long)2)
+extern "C" bool_t * ypproc_domain_nonack_2(domainname *, CLIENT *);
+extern "C" bool_t * ypproc_domain_nonack_2_svc(domainname *, struct svc_req *);
+#define YPPROC_MATCH ((u_long)3)
+extern "C" ypresp_val * ypproc_match_2(ypreq_key *, CLIENT *);
+extern "C" ypresp_val * ypproc_match_2_svc(ypreq_key *, struct svc_req *);
+#define YPPROC_FIRST ((u_long)4)
+extern "C" ypresp_key_val * ypproc_first_2(ypreq_key *, CLIENT *);
+extern "C" ypresp_key_val * ypproc_first_2_svc(ypreq_key *, struct svc_req *);
+#define YPPROC_NEXT ((u_long)5)
+extern "C" ypresp_key_val * ypproc_next_2(ypreq_key *, CLIENT *);
+extern "C" ypresp_key_val * ypproc_next_2_svc(ypreq_key *, struct svc_req *);
+#define YPPROC_XFR ((u_long)6)
+extern "C" ypresp_xfr * ypproc_xfr_2(ypreq_xfr *, CLIENT *);
+extern "C" ypresp_xfr * ypproc_xfr_2_svc(ypreq_xfr *, struct svc_req *);
+#define YPPROC_CLEAR ((u_long)7)
+extern "C" void * ypproc_clear_2(void *, CLIENT *);
+extern "C" void * ypproc_clear_2_svc(void *, struct svc_req *);
+#define YPPROC_ALL ((u_long)8)
+extern "C" ypresp_all * ypproc_all_2(ypreq_nokey *, CLIENT *);
+extern "C" ypresp_all * ypproc_all_2_svc(ypreq_nokey *, struct svc_req *);
+#define YPPROC_MASTER ((u_long)9)
+extern "C" ypresp_master * ypproc_master_2(ypreq_nokey *, CLIENT *);
+extern "C" ypresp_master * ypproc_master_2_svc(ypreq_nokey *, struct svc_req *);
+#define YPPROC_ORDER ((u_long)10)
+extern "C" ypresp_order * ypproc_order_2(ypreq_nokey *, CLIENT *);
+extern "C" ypresp_order * ypproc_order_2_svc(ypreq_nokey *, struct svc_req *);
+#define YPPROC_MAPLIST ((u_long)11)
+extern "C" ypresp_maplist * ypproc_maplist_2(domainname *, CLIENT *);
+extern "C" ypresp_maplist * ypproc_maplist_2_svc(domainname *, struct svc_req *);
+
+#elif __STDC__
+#define YPPROC_NULL ((u_long)0)
+extern void * ypproc_null_2(void *, CLIENT *);
+extern void * ypproc_null_2_svc(void *, struct svc_req *);
+#define YPPROC_DOMAIN ((u_long)1)
+extern bool_t * ypproc_domain_2(domainname *, CLIENT *);
+extern bool_t * ypproc_domain_2_svc(domainname *, struct svc_req *);
+#define YPPROC_DOMAIN_NONACK ((u_long)2)
+extern bool_t * ypproc_domain_nonack_2(domainname *, CLIENT *);
+extern bool_t * ypproc_domain_nonack_2_svc(domainname *, struct svc_req *);
+#define YPPROC_MATCH ((u_long)3)
+extern ypresp_val * ypproc_match_2(ypreq_key *, CLIENT *);
+extern ypresp_val * ypproc_match_2_svc(ypreq_key *, struct svc_req *);
+#define YPPROC_FIRST ((u_long)4)
+extern ypresp_key_val * ypproc_first_2(ypreq_key *, CLIENT *);
+extern ypresp_key_val * ypproc_first_2_svc(ypreq_key *, struct svc_req *);
+#define YPPROC_NEXT ((u_long)5)
+extern ypresp_key_val * ypproc_next_2(ypreq_key *, CLIENT *);
+extern ypresp_key_val * ypproc_next_2_svc(ypreq_key *, struct svc_req *);
+#define YPPROC_XFR ((u_long)6)
+extern ypresp_xfr * ypproc_xfr_2(ypreq_xfr *, CLIENT *);
+extern ypresp_xfr * ypproc_xfr_2_svc(ypreq_xfr *, struct svc_req *);
+#define YPPROC_CLEAR ((u_long)7)
+extern void * ypproc_clear_2(void *, CLIENT *);
+extern void * ypproc_clear_2_svc(void *, struct svc_req *);
+#define YPPROC_ALL ((u_long)8)
+extern ypresp_all * ypproc_all_2(ypreq_nokey *, CLIENT *);
+extern ypresp_all * ypproc_all_2_svc(ypreq_nokey *, struct svc_req *);
+#define YPPROC_MASTER ((u_long)9)
+extern ypresp_master * ypproc_master_2(ypreq_nokey *, CLIENT *);
+extern ypresp_master * ypproc_master_2_svc(ypreq_nokey *, struct svc_req *);
+#define YPPROC_ORDER ((u_long)10)
+extern ypresp_order * ypproc_order_2(ypreq_nokey *, CLIENT *);
+extern ypresp_order * ypproc_order_2_svc(ypreq_nokey *, struct svc_req *);
+#define YPPROC_MAPLIST ((u_long)11)
+extern ypresp_maplist * ypproc_maplist_2(domainname *, CLIENT *);
+extern ypresp_maplist * ypproc_maplist_2_svc(domainname *, struct svc_req *);
+
+#else /* Old Style C */
+#define YPPROC_NULL ((u_long)0)
+extern void * ypproc_null_2();
+extern void * ypproc_null_2_svc();
+#define YPPROC_DOMAIN ((u_long)1)
+extern bool_t * ypproc_domain_2();
+extern bool_t * ypproc_domain_2_svc();
+#define YPPROC_DOMAIN_NONACK ((u_long)2)
+extern bool_t * ypproc_domain_nonack_2();
+extern bool_t * ypproc_domain_nonack_2_svc();
+#define YPPROC_MATCH ((u_long)3)
+extern ypresp_val * ypproc_match_2();
+extern ypresp_val * ypproc_match_2_svc();
+#define YPPROC_FIRST ((u_long)4)
+extern ypresp_key_val * ypproc_first_2();
+extern ypresp_key_val * ypproc_first_2_svc();
+#define YPPROC_NEXT ((u_long)5)
+extern ypresp_key_val * ypproc_next_2();
+extern ypresp_key_val * ypproc_next_2_svc();
+#define YPPROC_XFR ((u_long)6)
+extern ypresp_xfr * ypproc_xfr_2();
+extern ypresp_xfr * ypproc_xfr_2_svc();
+#define YPPROC_CLEAR ((u_long)7)
+extern void * ypproc_clear_2();
+extern void * ypproc_clear_2_svc();
+#define YPPROC_ALL ((u_long)8)
+extern ypresp_all * ypproc_all_2();
+extern ypresp_all * ypproc_all_2_svc();
+#define YPPROC_MASTER ((u_long)9)
+extern ypresp_master * ypproc_master_2();
+extern ypresp_master * ypproc_master_2_svc();
+#define YPPROC_ORDER ((u_long)10)
+extern ypresp_order * ypproc_order_2();
+extern ypresp_order * ypproc_order_2_svc();
+#define YPPROC_MAPLIST ((u_long)11)
+extern ypresp_maplist * ypproc_maplist_2();
+extern ypresp_maplist * ypproc_maplist_2_svc();
+#endif /* Old Style C */
+
+#define YPPUSH_XFRRESPPROG ((u_long)0x40000000)
+#define YPPUSH_XFRRESPVERS ((u_long)1)
+
+#ifdef __cplusplus
+#define YPPUSHPROC_NULL ((u_long)0)
+extern "C" void * yppushproc_null_1(void *, CLIENT *);
+extern "C" void * yppushproc_null_1_svc(void *, struct svc_req *);
+#define YPPUSHPROC_XFRRESP ((u_long)1)
+extern "C" void * yppushproc_xfrresp_1(yppushresp_xfr *, CLIENT *);
+extern "C" void * yppushproc_xfrresp_1_svc(yppushresp_xfr *, struct svc_req *);
+
+#elif __STDC__
+#define YPPUSHPROC_NULL ((u_long)0)
+extern void * yppushproc_null_1(void *, CLIENT *);
+extern void * yppushproc_null_1_svc(void *, struct svc_req *);
+#define YPPUSHPROC_XFRRESP ((u_long)1)
+extern void * yppushproc_xfrresp_1(yppushresp_xfr *, CLIENT *);
+extern void * yppushproc_xfrresp_1_svc(yppushresp_xfr *, struct svc_req *);
+
+#else /* Old Style C */
+#define YPPUSHPROC_NULL ((u_long)0)
+extern void * yppushproc_null_1();
+extern void * yppushproc_null_1_svc();
+#define YPPUSHPROC_XFRRESP ((u_long)1)
+extern void * yppushproc_xfrresp_1();
+extern void * yppushproc_xfrresp_1_svc();
+#endif /* Old Style C */
+
+#define YPBINDPROG ((u_long)100007)
+#define YPBINDVERS ((u_long)2)
+
+#ifdef __cplusplus
+#define YPBINDPROC_NULL ((u_long)0)
+extern "C" void * ypbindproc_null_2(void *, CLIENT *);
+extern "C" void * ypbindproc_null_2_svc(void *, struct svc_req *);
+#define YPBINDPROC_DOMAIN ((u_long)1)
+extern "C" ypbind_resp * ypbindproc_domain_2(domainname *, CLIENT *);
+extern "C" ypbind_resp * ypbindproc_domain_2_svc(domainname *, struct svc_req *);
+#define YPBINDPROC_SETDOM ((u_long)2)
+extern "C" void * ypbindproc_setdom_2(ypbind_setdom *, CLIENT *);
+extern "C" void * ypbindproc_setdom_2_svc(ypbind_setdom *, struct svc_req *);
+
+#elif __STDC__
+#define YPBINDPROC_NULL ((u_long)0)
+extern void * ypbindproc_null_2(void *, CLIENT *);
+extern void * ypbindproc_null_2_svc(void *, struct svc_req *);
+#define YPBINDPROC_DOMAIN ((u_long)1)
+extern ypbind_resp * ypbindproc_domain_2(domainname *, CLIENT *);
+extern ypbind_resp * ypbindproc_domain_2_svc(domainname *, struct svc_req *);
+#define YPBINDPROC_SETDOM ((u_long)2)
+extern void * ypbindproc_setdom_2(ypbind_setdom *, CLIENT *);
+extern void * ypbindproc_setdom_2_svc(ypbind_setdom *, struct svc_req *);
+
+#else /* Old Style C */
+#define YPBINDPROC_NULL ((u_long)0)
+extern void * ypbindproc_null_2();
+extern void * ypbindproc_null_2_svc();
+#define YPBINDPROC_DOMAIN ((u_long)1)
+extern ypbind_resp * ypbindproc_domain_2();
+extern ypbind_resp * ypbindproc_domain_2_svc();
+#define YPBINDPROC_SETDOM ((u_long)2)
+extern void * ypbindproc_setdom_2();
+extern void * ypbindproc_setdom_2_svc();
+#endif /* Old Style C */
+
+#endif /* !__RPCSVC_YP_H__ */
diff --git a/nis/rpcsvc/yp.x b/nis/rpcsvc/yp.x
new file mode 100644
index 0000000000..be855df749
--- /dev/null
+++ b/nis/rpcsvc/yp.x
@@ -0,0 +1,300 @@
+/* @(#)yp.x 2.1 88/08/01 4.0 RPCSRC */
+
+/*
+ * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
+ * unrestricted use provided that this legend is included on all tape
+ * media and as a part of the software program in whole or part. Users
+ * may copy or modify Sun RPC without charge, but are not authorized
+ * to license or distribute it to anyone else except as part of a product or
+ * program developed by the user.
+ *
+ * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
+ * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
+ *
+ * Sun RPC is provided with no support and without any obligation on the
+ * part of Sun Microsystems, Inc. to assist in its use, correction,
+ * modification or enhancement.
+ *
+ * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
+ * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
+ * OR ANY PART THEREOF.
+ *
+ * In no event will Sun Microsystems, Inc. be liable for any lost revenue
+ * or profits or other special, indirect and consequential damages, even if
+ * Sun has been advised of the possibility of such damages.
+ *
+ * Sun Microsystems, Inc.
+ * 2550 Garcia Avenue
+ * Mountain View, California 94043
+ */
+
+/*
+ * Protocol description file for the Yellow Pages Service
+ */
+
+const YPMAXRECORD = 1024;
+const YPMAXDOMAIN = 64;
+const YPMAXMAP = 64;
+const YPMAXPEER = 64;
+
+
+enum ypstat {
+ YP_TRUE = 1,
+ YP_NOMORE = 2,
+ YP_FALSE = 0,
+ YP_NOMAP = -1,
+ YP_NODOM = -2,
+ YP_NOKEY = -3,
+ YP_BADOP = -4,
+ YP_BADDB = -5,
+ YP_YPERR = -6,
+ YP_BADARGS = -7,
+ YP_VERS = -8
+};
+
+
+enum ypxfrstat {
+ YPXFR_SUCC = 1,
+ YPXFR_AGE = 2,
+ YPXFR_NOMAP = -1,
+ YPXFR_NODOM = -2,
+ YPXFR_RSRC = -3,
+ YPXFR_RPC = -4,
+ YPXFR_MADDR = -5,
+ YPXFR_YPERR = -6,
+ YPXFR_BADARGS = -7,
+ YPXFR_DBM = -8,
+ YPXFR_FILE = -9,
+ YPXFR_SKEW = -10,
+ YPXFR_CLEAR = -11,
+ YPXFR_FORCE = -12,
+ YPXFR_XFRERR = -13,
+ YPXFR_REFUSED = -14
+};
+
+
+typedef string domainname<YPMAXDOMAIN>;
+typedef string mapname<YPMAXMAP>;
+typedef string peername<YPMAXPEER>;
+typedef opaque keydat<YPMAXRECORD>;
+typedef opaque valdat<YPMAXRECORD>;
+
+
+struct ypmap_parms {
+ domainname domain;
+ mapname map;
+ unsigned int ordernum;
+ peername peer;
+};
+
+struct ypreq_key {
+ domainname domain;
+ mapname map;
+ keydat key;
+};
+
+struct ypreq_nokey {
+ domainname domain;
+ mapname map;
+};
+
+struct ypreq_xfr {
+ ypmap_parms map_parms;
+ unsigned int transid;
+ unsigned int prog;
+ unsigned int port;
+};
+
+
+struct ypresp_val {
+ ypstat stat;
+ valdat val;
+};
+
+struct ypresp_key_val {
+ ypstat stat;
+#ifdef STUPID_SUN_BUG
+ keydat key;
+ valdat val;
+#else
+ valdat val;
+ keydat key;
+#endif
+};
+
+
+struct ypresp_master {
+ ypstat stat;
+ peername peer;
+};
+
+struct ypresp_order {
+ ypstat stat;
+ unsigned int ordernum;
+};
+
+union ypresp_all switch (bool more) {
+case TRUE:
+ ypresp_key_val val;
+case FALSE:
+ void;
+};
+
+struct ypresp_xfr {
+ unsigned int transid;
+ ypxfrstat xfrstat;
+};
+
+struct ypmaplist {
+ mapname map;
+ ypmaplist *next;
+};
+
+struct ypresp_maplist {
+ ypstat stat;
+ ypmaplist *maps;
+};
+
+enum yppush_status {
+ YPPUSH_SUCC = 1, /* Success */
+ YPPUSH_AGE = 2, /* Master's version not newer */
+ YPPUSH_NOMAP = -1, /* Can't find server for map */
+ YPPUSH_NODOM = -2, /* Domain not supported */
+ YPPUSH_RSRC = -3, /* Local resource alloc failure */
+ YPPUSH_RPC = -4, /* RPC failure talking to server */
+ YPPUSH_MADDR = -5, /* Can't get master address */
+ YPPUSH_YPERR = -6, /* YP server/map db error */
+ YPPUSH_BADARGS = -7, /* Request arguments bad */
+ YPPUSH_DBM = -8, /* Local dbm operation failed */
+ YPPUSH_FILE = -9, /* Local file I/O operation failed */
+ YPPUSH_SKEW = -10, /* Map version skew during transfer */
+ YPPUSH_CLEAR = -11, /* Can't send "Clear" req to local ypserv */
+ YPPUSH_FORCE = -12, /* No local order number in map use -f flag. */
+ YPPUSH_XFRERR = -13, /* ypxfr error */
+ YPPUSH_REFUSED = -14 /* Transfer request refused by ypserv */
+};
+
+struct yppushresp_xfr {
+ unsigned transid;
+ yppush_status status;
+};
+
+/*
+ * Response structure and overall result status codes. Success and failure
+ * represent two separate response message types.
+ */
+
+enum ypbind_resptype {
+ YPBIND_SUCC_VAL = 1,
+ YPBIND_FAIL_VAL = 2
+};
+
+struct ypbind_binding {
+ opaque ypbind_binding_addr[4]; /* In network order */
+ opaque ypbind_binding_port[2]; /* In network order */
+};
+
+union ypbind_resp switch (ypbind_resptype ypbind_status) {
+case YPBIND_FAIL_VAL:
+ unsigned ypbind_error;
+case YPBIND_SUCC_VAL:
+ ypbind_binding ypbind_bindinfo;
+};
+
+/* Detailed failure reason codes for response field ypbind_error*/
+
+const YPBIND_ERR_ERR = 1; /* Internal error */
+const YPBIND_ERR_NOSERV = 2; /* No bound server for passed domain */
+const YPBIND_ERR_RESC = 3; /* System resource allocation failure */
+
+
+/*
+ * Request data structure for ypbind "Set domain" procedure.
+ */
+struct ypbind_setdom {
+ domainname ypsetdom_domain;
+ ypbind_binding ypsetdom_binding;
+ unsigned ypsetdom_vers;
+};
+
+
+/*
+ * YP access protocol
+ */
+program YPPROG {
+ version YPVERS {
+ void
+ YPPROC_NULL(void) = 0;
+
+ bool
+ YPPROC_DOMAIN(domainname) = 1;
+
+ bool
+ YPPROC_DOMAIN_NONACK(domainname) = 2;
+
+ ypresp_val
+ YPPROC_MATCH(ypreq_key) = 3;
+
+ ypresp_key_val
+ YPPROC_FIRST(ypreq_key) = 4;
+
+ ypresp_key_val
+ YPPROC_NEXT(ypreq_key) = 5;
+
+ ypresp_xfr
+ YPPROC_XFR(ypreq_xfr) = 6;
+
+ void
+ YPPROC_CLEAR(void) = 7;
+
+ ypresp_all
+ YPPROC_ALL(ypreq_nokey) = 8;
+
+ ypresp_master
+ YPPROC_MASTER(ypreq_nokey) = 9;
+
+ ypresp_order
+ YPPROC_ORDER(ypreq_nokey) = 10;
+
+ ypresp_maplist
+ YPPROC_MAPLIST(domainname) = 11;
+ } = 2;
+} = 100004;
+
+
+/*
+ * YPPUSHPROC_XFRRESP is the callback routine for result of YPPROC_XFR
+ */
+program YPPUSH_XFRRESPPROG {
+ version YPPUSH_XFRRESPVERS {
+ void
+ YPPUSHPROC_NULL(void) = 0;
+
+#ifdef STUPID_SUN_BUG
+ yppushresp_xfr
+ YPPUSHPROC_XFRRESP(void) = 1;
+#else
+ void
+ YPPUSHPROC_XFRRESP(yppushresp_xfr) = 1;
+#endif
+ } = 1;
+} = 0x40000000; /* transient: could be anything up to 0x5fffffff */
+
+/*
+ * YP binding protocol
+ */
+program YPBINDPROG {
+ version YPBINDVERS {
+ void
+ YPBINDPROC_NULL(void) = 0;
+
+ ypbind_resp
+ YPBINDPROC_DOMAIN(domainname) = 1;
+
+ void
+ YPBINDPROC_SETDOM(ypbind_setdom) = 2;
+ } = 2;
+} = 100007;
+
+
diff --git a/nis/rpcsvc/yp_prot.h b/nis/rpcsvc/yp_prot.h
new file mode 100644
index 0000000000..60c24a2f5f
--- /dev/null
+++ b/nis/rpcsvc/yp_prot.h
@@ -0,0 +1,334 @@
+/*
+ * This file contains symbols and structures defining the rpc protocol
+ * between the NIS clients and the NIS servers. The servers
+ * are the NIS database servers, and the NIS binders.
+ */
+
+#ifndef _RPCSVC_YP_PROT_H
+#define _RPCSVC_YP_PROT_H
+
+#include <features.h>
+
+#include <rpc/rpc.h>
+#include <rpcsvc/ypclnt.h>
+
+/*
+ * The following procedures are supported by the protocol:
+ *
+ * YPPROC_NULL() returns () takes nothing, returns nothing. This indicates
+ * that the NIS server is alive.
+ *
+ * YPPROC_DOMAIN (char *) returns (bool_t) TRUE. Indicates that the
+ * responding NIS server does serve the named domain; FALSE indicates no
+ * support.
+ *
+ * YPPROC_DOMAIN_NONACK (char *) returns (TRUE) if the NIS server does serve
+ * the named domain, otherwise does not return. Used in the broadcast case.
+ *
+ * YPPROC_MATCH (struct ypreq_key) returns (struct ypresp_val). Returns the
+ * right-hand value for a passed left-hand key, within a named map and
+ * domain.
+ *
+ * YPPROC_FIRST (struct ypreq_nokey) returns (struct ypresp_key_val).
+ * Returns the first key-value pair from a named domain and map.
+ *
+ * YPPROC_NEXT (struct ypreq_key) returns (struct ypresp_key_val). Returns
+ * the key-value pair following a passed key-value pair within a named
+ * domain and map.
+ *
+ * YPPROC_XFR (struct ypreq_xfr) returns nothing. Indicates to a server that
+ * a map should be updated.
+ *
+ * YPPROC_CLEAR takes nothing, returns nothing. Instructs a NIS server to
+ * close the current map, so that old versions of the disk file don't get
+ * held open.
+ *
+ * YPPROC_ALL (struct ypreq_nokey), returns
+ * union switch (bool_t more) {
+ * TRUE: (struct ypresp_key_val);
+ * FALSE: (struct) {};
+ * }
+ *
+ * YPPROC_MASTER (struct ypreq_nokey), returns (ypresp_master)
+ *
+ * YPPROC_ORDER (struct ypreq_nokey), returns (ypresp_order)
+ *
+ * YPPROC_MAPLIST (char *), returns (struct ypmaplist *)
+ */
+
+/* Program and version symbols, magic numbers */
+
+#define YPPROG ((u_long)100004)
+#define YPVERS ((u_long)2)
+#define YPVERS_ORIG ((u_long)1)
+#define YPMAXRECORD ((u_long)1024)
+#define YPMAXDOMAIN ((u_long)256)
+#define YPMAXMAP ((u_long)64)
+#define YPMAXPEER ((u_long)256)
+
+/* byte size of a large NIS packet */
+#define YPMSGSZ 1600
+
+#ifndef DATUM
+typedef struct {
+ char *dptr;
+ int dsize;
+} datum;
+#define DATUM
+#endif
+
+struct ypmap_parms {
+ char *domain; /* Null string means not available */
+ char *map; /* Null string means not available */
+ unsigned long int ordernum; /* 0 means not available */
+ char *owner; /* Null string means not available */
+};
+
+/*
+ * Request parameter structures
+ */
+
+struct ypreq_key {
+ char *domain;
+ char *map;
+ datum keydat;
+};
+
+struct ypreq_nokey {
+ char *domain;
+ char *map;
+};
+
+struct ypreq_xfr {
+ struct ypmap_parms map_parms;
+ unsigned long transid;
+ unsigned long proto;
+ unsigned short port;
+};
+
+struct ypreq_newxfr {
+ struct ypmap_parms map_parms;
+ unsigned long transid;
+ unsigned long proto;
+ char *name;
+};
+
+#define ypxfr_domain map_parms.domain
+#define ypxfr_map map_parms.map
+#define ypxfr_ordernum map_parms.ordernum
+#define ypxfr_owner map_parms.owner
+
+/*
+ * Response parameter structures
+ */
+
+struct ypresp_val {
+ long unsigned status;
+ datum valdat;
+};
+
+struct ypresp_key_val {
+ long unsigned status;
+ datum keydat;
+ datum valdat;
+};
+
+struct ypresp_master {
+ long unsigned status;
+ char *master;
+};
+
+struct ypresp_order {
+ long unsigned status;
+ unsigned long int ordernum;
+};
+
+struct ypmaplist {
+ char ypml_name[YPMAXMAP + 1];
+ struct ypmaplist *ypml_next;
+};
+
+struct ypresp_maplist {
+ long unsigned status;
+ struct ypmaplist *list;
+};
+
+/*
+ * Procedure symbols. YPPROC_NULL, YPPROC_DOMAIN, and YPPROC_DOMAIN_NONACK
+ * must keep the same values (0, 1, and 2) that they had in the first version
+ * of the protocol.
+ */
+
+#define YPPROC_NULL ((u_long)0)
+#define YPPROC_DOMAIN ((u_long)1)
+#define YPPROC_DOMAIN_NONACK ((u_long)2)
+#define YPPROC_MATCH ((u_long)3)
+#define YPPROC_FIRST ((u_long)4)
+#define YPPROC_NEXT ((u_long)5)
+#define YPPROC_XFR ((u_long)6)
+#define YPPROC_CLEAR ((u_long)7)
+#define YPPROC_ALL ((u_long)8)
+#define YPPROC_MASTER ((u_long)9)
+#define YPPROC_ORDER ((u_long)10)
+#define YPPROC_MAPLIST ((u_long)11)
+#define YPPROC_NEWXFR ((u_long)12)
+
+/* Return status values */
+
+#define YP_TRUE ((long)1) /* General purpose success code */
+#define YP_NOMORE ((long)2) /* No more entries in map */
+#define YP_FALSE ((long)0) /* General purpose failure code */
+#define YP_NOMAP ((long)-1) /* No such map in domain */
+#define YP_NODOM ((long)-2) /* Domain not supported */
+#define YP_NOKEY ((long)-3) /* No such key in map */
+#define YP_BADOP ((long)-4) /* Invalid operation */
+#define YP_BADDB ((long)-5) /* Server data base is bad */
+#define YP_YPERR ((long)-6) /* NIS server error */
+#define YP_BADARGS ((long)-7) /* Request arguments bad */
+#define YP_VERS ((long)-8) /* NIS server version mismatch - server
+ * can't supply requested service. */
+/*
+ * Protocol between clients and NIS binder servers
+ */
+
+/*
+ * The following procedures are supported by the protocol:
+ *
+ * YPBINDPROC_NULL() returns ()
+ * takes nothing, returns nothing
+ *
+ * YPBINDPROC_DOMAIN takes (char *) returns (struct ypbind_resp)
+ *
+ * YPBINDPROC_SETDOM takes (struct ypbind_setdom) returns nothing
+ */
+
+/* Program and version symbols, magic numbers */
+
+#define YPBINDPROG ((u_long)100007)
+#define YPBINDVERS ((u_long)2)
+#define YPBINDVERS_ORIG ((u_long)1)
+
+/* Procedure symbols */
+
+#define YPBINDPROC_NULL ((u_long)0)
+#define YPBINDPROC_DOMAIN ((u_long)1)
+#define YPBINDPROC_SETDOM ((u_long)2)
+/*
+ * Response structure and overall result status codes. Success and failure
+ * represent two separate response message types.
+ */
+
+enum ypbind_resptype {YPBIND_SUCC_VAL = 1, YPBIND_FAIL_VAL = 2};
+
+struct ypbind_binding {
+ struct in_addr ypbind_binding_addr; /* In network order */
+ unsigned short int ypbind_binding_port; /* In network order */
+};
+
+struct ypbind_resp {
+ enum ypbind_resptype ypbind_status;
+ union {
+ unsigned long ypbind_error;
+ struct ypbind_binding ypbind_bindinfo;
+ } ypbind_respbody;
+};
+
+
+/* Detailed failure reason codes for response field ypbind_error*/
+
+#define YPBIND_ERR_ERR 1 /* Internal error */
+#define YPBIND_ERR_NOSERV 2 /* No bound server for passed domain */
+#define YPBIND_ERR_RESC 3 /* System resource allocation failure */
+
+/*
+ * Request data structure for ypbind "Set domain" procedure.
+ */
+struct ypbind_setdom {
+ char ypsetdom_domain[YPMAXDOMAIN + 1];
+ struct ypbind_binding ypsetdom_binding;
+ unsigned short ypsetdom_vers;
+};
+#define ypsetdom_addr ypsetdom_binding.ypbind_binding_addr
+#define ypsetdom_port ypsetdom_binding.ypbind_binding_port
+
+/*
+ * Protocol between clients (ypxfr, only) and yppush
+ * yppush speaks a protocol in the transient range, which
+ * is supplied to ypxfr as a command-line parameter when it
+ * is activated by ypserv.
+ */
+#define YPPUSHVERS ((u_long) 1)
+#define YPPUSHVERS_ORIG ((u_long)1)
+
+/* Procedure symbols */
+
+#define YPPUSHPROC_NULL ((u_long)0)
+#define YPPUSHPROC_XFRRESP ((u_long)1)
+
+struct yppushresp_xfr {
+ unsigned long transid;
+ unsigned long status;
+};
+
+/* Status values for yppushresp_xfr.status */
+
+#define YPPUSH_SUCC ((long)1) /* Success */
+#define YPPUSH_AGE ((long)2) /* Master's version not newer */
+#define YPPUSH_NOMAP ((long)-1) /* Can't find server for map */
+#define YPPUSH_NODOM ((long)-2) /* Domain not supported */
+#define YPPUSH_RSRC ((long)-3) /* Local resouce alloc failure */
+#define YPPUSH_RPC ((long)-4) /* RPC failure talking to server */
+#define YPPUSH_MADDR ((long)-5) /* Can't get master address */
+#define YPPUSH_YPERR ((long)-6) /* NIS server/map db error */
+#define YPPUSH_BADARGS ((long)-7) /* Request arguments bad */
+#define YPPUSH_DBM ((long)-8) /* Local dbm operation failed */
+#define YPPUSH_FILE ((long)-9) /* Local file I/O operation failed */
+#define YPPUSH_SKEW ((long)-10) /* Map version skew during transfer */
+#define YPPUSH_CLEAR ((long)-11) /* Can't send "Clear" req to local
+ * ypserv */
+#define YPPUSH_FORCE ((long)-12) /* No local order number in map -
+ * use -f flag. */
+#define YPPUSH_XFRERR ((long)-13) /* ypxfr error */
+#define YPPUSH_REFUSED ((long)-14) /* Transfer request refused by ypserv */
+#define YPPUSH_NOALIAS ((long)-15) /* Alias not found for map or domain */
+
+struct ypresp_all {
+ bool_t more;
+ union {
+ struct ypresp_key_val val;
+ } ypresp_all_u;
+};
+
+__BEGIN_DECLS
+
+extern bool_t xdr_datum __P ((XDR *__xdrs, datum * __objp));
+extern bool_t xdr_ypdomain_wrap_string __P ((XDR *__xdrs, char ** __objp));
+extern bool_t xdr_ypmap_wrap_string __P ((XDR *__xdrs, char ** __objp));
+extern bool_t xdr_ypreq_key __P ((XDR *__xdrs, struct ypreq_key * __objp));
+extern bool_t xdr_ypreq_nokey __P ((XDR *__xdrs, struct ypreq_nokey * __objp));
+extern bool_t xdr_ypreq_xfr __P ((XDR *__xdrs, struct ypreq_xfr * __objp));
+extern bool_t xdr_ypreq_newxfr __P ((XDR *__xdrs, struct ypreq_newxfr * __objp));
+extern bool_t xdr_ypresp_val __P ((XDR *__xdrs, struct ypresp_val * __objp));
+extern bool_t xdr_ypresp_key_val __P ((XDR *__xdrs, struct ypresp_key_val * __objp));
+extern bool_t xdr_ypbind_resp __P ((XDR *__xdrs, struct ypbind_resp * __objp));
+extern bool_t xdr_ypbind_setdom __P ((XDR *__xdrs, struct ypbind_setdom * __objp));
+extern bool_t xdr_ypmap_parms __P ((XDR *__xdrs, struct ypmap_parms * __objp));
+extern bool_t xdr_ypowner_wrap_string __P ((XDR *__xdrs, char ** __objp));
+extern bool_t xdr_yppushresp_xfr __P ((XDR *__xdrs, struct yppushresp_xfr * __objp));
+extern bool_t xdr_ypresp_order __P ((XDR *__xdrs, struct ypresp_order * __objp));
+extern bool_t xdr_ypresp_master __P ((XDR *__xdrs, struct ypresp_master * __objp));
+extern bool_t xdr_ypall __P ((XDR *__xdrs, struct ypall_callback * __objp));
+extern bool_t xdr_ypresp_maplist __P ((XDR *__xdrs, struct ypresp_maplist * __objp));
+
+extern bool_t xdr_domainname_ypbind __P ((XDR *__xdrs, char * __objp));
+extern bool_t xdr_ypbind_binding __P ((XDR *__xdrs, struct ypbind_binding * __objp));
+extern bool_t xdr_ypbind_resptype __P ((XDR *__xdrs, enum ypbind_resptype * __objp));
+extern bool_t xdr_ypstat __P ((XDR *__xdrs, enum ypbind_resptype * __objp));
+extern bool_t xdr_ypresp_all __P ((XDR *__xdrs, struct ypresp_all * __objp));
+extern bool_t xdr_ypresp_all_seq __P ((XDR *__xdrs, u_long * __objp));
+extern bool_t xdr_ypmaplist_str __P ((XDR *__xdrs, char * __objp));
+extern bool_t xdr_ypmaplist __P ((XDR *__xdrs, struct ypmaplist * __objp));
+
+__END_DECLS
+
+#endif /* _RPCSVC_YP_PROT_H */
diff --git a/nis/rpcsvc/ypclnt.h b/nis/rpcsvc/ypclnt.h
new file mode 100644
index 0000000000..b61a498417
--- /dev/null
+++ b/nis/rpcsvc/ypclnt.h
@@ -0,0 +1,88 @@
+/*
+** Copyright (c) 1996 Thorsten Kukuk, Germany
+**
+** This library is free software; you can redistribute it and/or
+** modify it under the terms of the GNU Library General Public
+** License as published by the Free Software Foundation; either
+** version 2 of the License, or (at your option) any later version.
+**
+** This library is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+** Library General Public License for more details.
+**
+** You should have received a copy of the GNU Library General Public
+** License along with this library; if not, write to the Free
+** Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+**
+** Author: Thorsten Kukuk <kukuk@vt.uni-paderborn.de>
+**
+*/
+
+#ifndef __RPCSVC_YPCLNT_H__
+#define __RPCSVC_YPCLNT_H__
+
+#include <features.h>
+
+/* some defines */
+#define YPERR_SUCCESS 0 /* There is no error */
+#define YPERR_BADARGS 1 /* Args to function are bad */
+#define YPERR_RPC 2 /* RPC failure */
+#define YPERR_DOMAIN 3 /* Can't bind to a server with this domain */
+#define YPERR_MAP 4 /* No such map in server's domain */
+#define YPERR_KEY 5 /* No such key in map */
+#define YPERR_YPERR 6 /* Internal yp server or client error */
+#define YPERR_RESRC 7 /* Local resource allocation failure */
+#define YPERR_NOMORE 8 /* No more records in map database */
+#define YPERR_PMAP 9 /* Can't communicate with portmapper */
+#define YPERR_YPBIND 10 /* Can't communicate with ypbind */
+#define YPERR_YPSERV 11 /* Can't communicate with ypserv */
+#define YPERR_NODOM 12 /* Local domain name not set */
+#define YPERR_BADDB 13 /* yp data base is bad */
+#define YPERR_VERS 14 /* YP version mismatch */
+#define YPERR_ACCESS 15 /* Access violation */
+#define YPERR_BUSY 16 /* Database is busy */
+
+/* Types of update operations */
+#define YPOP_CHANGE 1 /* change, do not add */
+#define YPOP_INSERT 2 /* add, do not change */
+#define YPOP_DELETE 3 /* delete this entry */
+#define YPOP_STORE 4 /* add, or change */
+
+__BEGIN_DECLS
+
+/* struct ypall_callback * is the arg which must be passed to yp_all */
+struct ypall_callback {
+ int (*foreach)();
+ char *data;
+};
+
+/* External NIS client function references. */
+extern int yp_bind __P ((__const char *));
+extern void yp_unbind __P ((__const char *));
+extern int yp_get_default_domain __P ((char **));
+extern int yp_match __P ((__const char *, __const char *, __const char *,
+ __const int, char **, int *));
+extern int yp_first __P ((__const char *, __const char *, char **,
+ int *, char **, int *));
+extern int yp_next __P ((__const char *, __const char *, __const char *,
+ __const int, char **, int *, char **, int *));
+extern int yp_master __P ((__const char *, __const char *, char **));
+extern int yp_order __P ((__const char *, __const char *, unsigned int *));
+extern int yp_all __P ((__const char *, __const char *,
+ __const struct ypall_callback *));
+extern __const char *yperr_string __P ((__const int));
+extern __const char *ypbinderr_string __P ((__const int));
+extern int ypprot_err __P ((__const int));
+extern int yp_update __P ((char *, char *, unsigned, char *,
+ int, char *, int));
+#if 0
+extern int yp_maplist __P ((__const char *, struct ypmaplist **));
+#endif
+
+/* Exist only under BSD and Linux systems */
+extern int __yp_check __P ((char **));
+
+__END_DECLS
+
+#endif /* __RPCSVC_YPCLNT_H__ */
diff --git a/nis/rpcsvc/ypupd.h b/nis/rpcsvc/ypupd.h
new file mode 100644
index 0000000000..dace7824d4
--- /dev/null
+++ b/nis/rpcsvc/ypupd.h
@@ -0,0 +1,88 @@
+/*
+ * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
+ * unrestricted use provided that this legend is included on all tape
+ * media and as a part of the software program in whole or part. Users
+ * may copy or modify Sun RPC without charge, but are not authorized
+ * to license or distribute it to anyone else except as part of a product or
+ * program developed by the user or with the express written consent of
+ * Sun Microsystems, Inc.
+ *
+ * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
+ * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
+ *
+ * Sun RPC is provided with no support and without any obligation on the
+ * part of Sun Microsystems, Inc. to assist in its use, correction,
+ * modification or enhancement.
+ *
+ * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
+ * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
+ * OR ANY PART THEREOF.
+ *
+ * In no event will Sun Microsystems, Inc. be liable for any lost revenue
+ * or profits or other special, indirect and consequential damages, even if
+ * Sun has been advised of the possibility of such damages.
+ *
+ * Sun Microsystems, Inc.
+ * 2550 Garcia Avenue
+ * Mountain View, California 94043
+ */
+/*
+ * Copyright (c) 1986, 1990 by Sun Microsystems, Inc.
+ */
+/* from @(#)ypupdate_prot.x 1.3 91/03/11 TIRPC 1.0 */
+
+#ifndef __RPCSVC_YPUPD_H__
+#define __RPCSVC_YPUPD_H__
+
+#include <features.h>
+
+#include <rpc/rpc.h>
+
+#define MAXMAPNAMELEN 255
+#define MAXYPDATALEN 1023
+#define MAXERRMSGLEN 255
+
+__BEGIN_DECLS
+
+typedef struct {
+ u_int yp_buf_len;
+ char *yp_buf_val;
+} yp_buf;
+
+extern bool_t xdr_yp_buf __P ((XDR *, yp_buf*));
+
+struct ypupdate_args {
+ char *mapname;
+ yp_buf key;
+ yp_buf datum;
+};
+typedef struct ypupdate_args ypupdate_args;
+
+extern bool_t xdr_ypupdate_args __P ((XDR *, ypupdate_args*));
+
+struct ypdelete_args {
+ char *mapname;
+ yp_buf key;
+};
+typedef struct ypdelete_args ypdelete_args;
+
+extern bool_t xdr_ypdelete_args __P ((XDR *, ypdelete_args*));
+
+#define YPU_PROG ((u_long)100028)
+#define YPU_VERS ((u_long)1)
+
+#define YPU_CHANGE ((u_long)1)
+extern u_int * ypu_change_1 __P ((ypupdate_args *, CLIENT *));
+extern u_int * ypu_change_1_svc __P((ypupdate_args *, struct svc_req *));
+#define YPU_INSERT ((u_long)2)
+extern u_int * ypu_insert_1 __P ((ypupdate_args *, CLIENT *));
+extern u_int * ypu_insert_1_svc __P ((ypupdate_args *, struct svc_req *));
+#define YPU_DELETE ((u_long)3)
+extern u_int * ypu_delete_1 __P ((ypdelete_args *, CLIENT *));
+extern u_int * ypu_delete_1_svc __P ((ypdelete_args *, struct svc_req *));
+#define YPU_STORE ((u_long)4)
+extern u_int * ypu_store_1 __P ((ypupdate_args *, CLIENT *));
+extern u_int * ypu_store_1_svc __P ((ypupdate_args *, struct svc_req *));
+
+#endif /* !__RPCSVC_YPUPD_H__ */