xref: /titanic_41/usr/src/lib/libnsl/common/llib-lnsl (revision c8f74a56af6974058d11efe681daeb7f4cdb78d1)
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21
22/*
23 * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
24 * Use is subject to license terms.
25 */
26
27
28/* LINTLIBRARY */
29/* PROTOLIB1 */
30
31#include <sys/types.h>
32#include <thread.h>
33#include <synch.h>
34#include <fcntl.h>
35#include <sys/des.h>
36#include <des/softdes.h>
37#include <des/desdata.h>
38#include <rpc/rpc.h>
39#include <rpc/key_prot.h>
40#include <rpc/des_crypt.h>
41#include <rpc/pmap_prot.h>
42#include <sys/ioctl.h>
43#include <netdir.h>
44#include <nss_netdir.h>
45#include <nss_dbdefs.h>
46#include <sac.h>
47#include <netconfig.h>
48#include <ndbm.h>
49#include <rpcsvc/yp_prot.h>
50#include <rpcsvc/ypclnt.h>
51#include <rpcsvc/yppasswd.h>
52#include <rpcsvc/ypupd.h>
53#include <rpcsvc/nis.h>
54#include <rpcsvc/nislib.h>
55#include <sys/stream.h>
56#include <sys/stropts.h>
57#include <sys/tihdr.h>
58#include <sys/timod.h>
59#include <tiuser.h>
60
61
62/*
63 * Declare t_errno, even though this file is compiled '_REENTRANT'.  This
64 * way t_errno is defined in the lint library, which is used for programs
65 * compiled with _REENTRANT and those compiled without it.
66 */
67#ifdef t_errno
68#undef t_errno
69#endif
70extern int t_errno;
71
72/*
73 * usr/src/lib/libnsl/common routines
74 */
75
76/* common.c */
77
78/*
79 * usr/src/lib/libnsl/des routines
80 */
81
82/* des_crypt.c */
83int cbc_crypt(char *key, char *buf, size_t len, uint_t mode, char *ivec);
84int ecb_crypt(char *key, char *buf, size_t len, uint_t mode);
85
86/* des_soft.c */
87void des_setparity(char *p);
88int __des_crypt(char *buf, unsigned len, struct desparams *desp);
89
90/* intl_crypt.c */
91
92/* intl_soft.c */
93int _des_crypt(char *buf, unsigned len, struct desparams *desp);
94
95/*
96 * usr/src/lib/libnsl/dial routines
97 */
98
99/* callers.c */
100
101/* conn.c */
102
103/* dial.c */
104void undial(int fd);
105
106/* getargs.c */
107
108/* interface.c */
109
110/* line.c */
111
112/* stoa.c */
113
114/* strecpy.c */
115
116/* strsave.c */
117
118/* sysfiles.c */
119
120/* ulockf.c */
121
122/* uucpdefs.c */
123
124/*
125 * usr/src/lib/libnsl/key routines
126 */
127
128/* gen_dhkeys.c */
129void __gen_dhkeys(char *public, char *secret, char *pass);
130
131/* publickey.c */
132int getpublickey(const char *netname, char *pkey);
133int __getpublickey_cached(char *netname, char *pkey, int *from_cache);
134void __getpublickey_flush(const char *netname);
135int getsecretkey(const char *netname, char *skey, const char *passwd);
136
137/* xcrypt.c */
138int xencrypt(char *secret, char *passwd);
139int xdecrypt(char *secret, char *passwd);
140int passwd2des(char *pw, char *key);
141
142/*
143 * usr/src/lib/libnsl/netdir routines
144 */
145
146/* netdir.c */
147int *__nderror(void);
148int netdir_getbyname(struct netconfig *tp, struct nd_hostserv *serv,
149				struct nd_addrlist **addrs);
150int netdir_getbyaddr(struct netconfig *tp, struct nd_hostservlist **serv,
151				struct netbuf *addr);
152int __netdir_getbyaddr_nosrv(struct netconfig *tp,
153				struct nd_hostservlist **serv,
154				struct netbuf *addr);
155int netdir_options(struct netconfig *tp, int option, int fd, char *par);
156struct netbuf *uaddr2taddr(struct netconfig *tp, char *addr);
157char *taddr2uaddr(struct netconfig *tp, struct netbuf *addr);
158void netdir_free(void *ptr, int type);
159char *netdir_sperror(void);
160void netdir_perror(char *s);
161
162/*
163 * usr/src/lib/libnsl/netselect routines
164 */
165
166/* netselect.c */
167void *setnetconfig(void);
168int endnetconfig(void *vdata);
169struct netconfig *getnetconfig(void *vdata);
170struct netconfig *getnetconfigent(const char *netid);
171void freenetconfigent(struct netconfig *netp);
172void *setnetpath(void);
173int endnetpath(void *vdata);
174struct netconfig *getnetpath(void *vdata);
175char *nc_sperror(void);
176void nc_perror(const char *string);
177
178/*
179 * usr/src/lib/libnsl/nis/gen routines
180 */
181
182/* nis_subr.c */
183name_pos nis_dir_cmp(nis_name n1, nis_name n2);
184nis_name nis_local_group(void);
185nis_name nis_domain_of(char *s);
186nis_name nis_leaf_of_r(const nis_name  s, char *buf, size_t bufsize);
187nis_name nis_leaf_of(char *s);
188nis_name nis_name_of(char *s);
189nis_name nis_local_directory(void);
190nis_name nis_local_host(void);
191void nis_destroy_object(nis_object *obj);
192nis_object *nis_clone_object(nis_object *obj, nis_object *dest);
193nis_object *nis_read_obj(char *f);
194int nis_write_obj(char *f, nis_object *o);
195void *nis_get_static_storage(struct nis_sdata *bs, u_int el, u_int nel);
196/*
197 * char *nis_old_data(char *s);
198 * char *nis_data(char *s);
199 */
200
201/* nis_xdr.c */
202bool_t xdr_nis_attr(XDR *xdrs, nis_attr *objp);
203bool_t xdr_nis_name(XDR *xdrs, nis_name *objp);
204bool_t xdr_endpoint(XDR *xdrs, endpoint *objp);
205bool_t xdr_nis_server(XDR *xdrs, nis_server *objp);
206bool_t xdr_directory_obj(XDR *xdrs, directory_obj *objp);
207bool_t xdr_entry_obj(XDR *xdrs, entry_obj *objp);
208bool_t xdr_table_obj(XDR *xdrs, table_obj *objp);
209bool_t xdr_objdata(XDR *xdrs, objdata *objp);
210bool_t xdr_nis_oid(XDR *xdrs, nis_oid *objp);
211bool_t xdr_nis_object(XDR *xdrs, nis_object *objp);
212bool_t xdr_nis_object(XDR *xdrs, nis_object *objp);
213bool_t xdr_log_entry_t(XDR *xdrs, log_entry_t *objp);
214bool_t xdr_log_entry(XDR *xdrs, log_entry *objp);
215bool_t xdr_nis_tag(XDR *xdrs, nis_tag *objp);
216bool_t xdr_nis_bound_endpoint(XDR *xdrs, nis_bound_endpoint *objp);
217bool_t xdr_nis_bound_directory(XDR *xdrs, nis_bound_directory *objp);
218bool_t xdr_nis_active_endpoint(XDR *xdrs, nis_active_endpoint *objp);
219
220/* thr_misc.c */
221
222/*
223 * usr/src/lib/libnsl/nsl routines
224 */
225
226/* _conn_util.c */
227
228/* _data2.c */
229
230/* _errlst.c */
231int *__t_errno(void);
232
233/* _utility.c */
234
235/* t_accept.c */
236int t_accept(int, int, struct t_call *);
237
238/* t_alloc.c */
239char *t_alloc(int, int, int);
240
241/* t_bind.c */
242int t_bind(int, struct t_bind *, struct t_bind *);
243
244/* t_close.c */
245int t_close(int);
246
247/* t_connect.c */
248int t_connect(int, struct t_call *, struct t_call *);
249
250/* t_error.c */
251void t_error(const char *);
252
253/* t_free.c */
254int t_free(char *, int);
255
256/* t_getinfo.c */
257int t_getinfo(int, struct t_info *);
258
259/* t_getname.c */
260int t_getname(int, struct netbuf *, int);
261
262/* t_getstate.c */
263int t_getstate(int);
264
265/* t_listen.c */
266int t_listen(int, struct t_call *);
267
268/* t_look.c */
269int t_look(int);
270
271/* t_open.c */
272int t_open(const char *, int, struct t_info *);
273
274/* t_optmgmt.c */
275int t_optmgmt(int, struct t_optmgmt *, struct t_optmgmt *);
276
277/* t_rcv.c */
278int t_rcv(int, char *, unsigned, int *);
279
280/* t_rcvconnect.c */
281int t_rcvconnect(int, struct t_call *);
282
283/* t_rcvdis.c */
284int t_rcvdis(int, struct t_discon *);
285
286/* t_rcvrel.c */
287int t_rcvrel(int);
288
289/* t_rcvudata.c */
290int t_rcvudata(int, struct t_unitdata *, int *);
291
292/* t_rcvuderr.c */
293int t_rcvuderr(int, struct t_uderr *);
294
295/* t_snd.c */
296int t_snd(int, char *, unsigned, int);
297
298/* t_snddis */
299int t_snddis(int, struct t_call *);
300
301/* t_sndrel.c */
302int t_sndrel(int);
303
304/* t_sndudata.c */
305int t_sndudata(int, struct t_unitdata *);
306
307/* t_strerror.c */
308char *t_strerror(int);
309
310/* t_sync.c */
311int t_sync(int);
312
313/* t_unbind.c */
314int t_unbind(int);
315
316/*
317 * struct t_iovec is defined in <xti.h>. But <xti.h> cannot be included
318 * because inclusion of <xti.h> and <tiuser.h> are mututally exclusive
319 * and <tiuser.h> is exposed by the inclusion of <rpc/rpc.h>. Needs to
320 * be seen how to build llib-lnsl.ln from multiple source files to avoid
321 * this problem.
322 */
323struct t_iovec {
324	void	*iov_base;
325	size_t	iov_len;
326};
327
328/* t_sndv.c */
329int t_sndv(int, const struct t_iovec *,  unsigned int, int);
330
331/* t_sndvudata.c */
332int t_sndvudata(int, struct t_unitdata *, struct t_iovec *, unsigned int);
333
334/* t_sndreldata.c */
335int t_sndreldata(int, struct t_discon *);
336
337/* t_rcvv.c */
338int t_rcvv(int, struct t_iovec *, unsigned int, int *);
339
340/* t_rcvvudata.c */
341int t_rcvvudata(int, struct t_unitdata *, struct t_iovec *,
342        unsigned int, int *);
343
344/* t_rcvreldata.c */
345extern int t_rcvreldata(int, struct t_discon *);
346
347/* t_sysconf.c */
348int t_sysconf(int);
349
350/* xti_wrappers.c */
351int _xti_accept(int, int, struct t_call *);
352int _xti_xns5_accept(int, int, struct t_call *);
353char *_xti_alloc(int, int, int);
354int _xti_bind(int, struct t_bind *, struct t_bind *);
355int _xti_close(int);
356int _xti_connect(int, struct t_call *, struct t_call *);
357int _xti_error(char *);
358int _xti_free(char *, int);
359int _xti_getinfo(int, struct t_info *);
360int _xti_getprotaddr(int, struct t_bind *, struct t_bind *);
361int _xti_getstate(int);
362int _xti_listen(int, struct t_call *);
363int _xti_look(int);
364int _xti_open(char *, int, struct t_info *);
365int _xti_optmgmt(int, struct t_optmgmt *, struct t_optmgmt *);
366int _xti_rcv(int, char *, unsigned int, int *);
367int _xti_rcvconnect(int, struct t_call *);
368int _xti_rcvdis(int, struct t_discon *);
369int _xti_rcvrel(int);
370int _xti_rcvreldata(int, struct t_discon *);
371int _xti_rcvudata(int, struct t_unitdata *, int *);
372int _xti_rcvuderr(int, struct t_uderr *);
373int _xti_rcvv(int, struct t_iovec *, unsigned int, int *);
374int _xti_rcvvudata(int, struct t_unitdata *, struct t_iovec *,
375    unsigned int, int *);
376int _xti_snd(int, char *, unsigned int, int);
377int _xti_xns5_snd(int, char *, unsigned int, int);
378int _xti_snddis(int, struct t_call *);
379int _xti_sndrel(int);
380int _xti_sndreldata(int, struct t_discon *);
381int _xti_sndudata(int, struct t_unitdata *);
382int _xti_sndv(int, const struct t_iovec *, unsigned int, int);
383int _xti_sndvudata(int, struct t_unitdata *, struct t_iovec *, unsigned int);
384char *_xti_strerror(int);
385int _xti_sync(int);
386int _xti_sysconf(int);
387int _xti_unbind(int);
388
389/*
390 * usr/src/lib/libnsl/nss routines
391 */
392
393/* gethostby_door.c */
394
395/* gethostbyname_r.c */
396struct hostent *_uncached_gethostbyname_r(const char *nam,
397				struct hostent *result,
398				char *buffer, int buflen, int *h_errnop);
399struct hostent *_uncached_gethostbyaddr_r(const char *addr, int length,
400				int type, struct hostent *result,
401				char *buffer, int buflen, int *h_errnop);
402struct hostent *gethostbyname_r(const char *nam, struct hostent *result,
403				char *buffer, int buflen, int *h_errnop);
404struct hostent *gethostbyaddr_r(const char *addr, int length, int type,
405				struct hostent *result,
406				char *buffer, int buflen, int *h_errnop);
407
408/* gethostent.c */
409struct hostent *gethostbyname(const char *nam);
410struct hostent *gethostbyaddr(const void *addr, socklen_t len, int type);
411struct hostent *gethostent(void);
412
413/* gethostent_r.c */
414int sethostent(int stay);
415int endhostent(void);
416struct hostent *gethostent_r(struct hostent *result, char *buffer, int buflen,
417				int *h_errnop);
418
419/* getipnodeby.c */
420void freehostent(struct hostent *hent);
421struct hostent *getipnodebyaddr(const void *src, size_t len, int type,
422				int *error_num);
423struct hostent *getipnodebyname(const char *name, int af, int flags,
424				int *error_num);
425
426/* getrpcent.c */
427struct rpcent *getrpcbyname(const char *nam);
428struct rpcent *getrpcbynumber(const int num);
429struct rpcent *getrpcent(void);
430
431/* getrpcent_r.c */
432struct rpcent *getrpcbyname_r(const char *name, struct rpcent *result,
433				char *buffer, int buflen);
434struct rpcent *getrpcbynumber_r(const int number, struct rpcent *result,
435				char *buffer, int buflen);
436void setrpcent(const int stay);
437void endrpcent(void);
438struct rpcent *getrpcent_r(struct rpcent *result, char *buffer, int buflen);
439
440/* inet_ntop.c */
441const char *inet_ntop(int af, const void *src, char *dst, socklen_t size);
442
443/* inet_pton.c */
444int inet_pton(int af, const char *src, void *dst);
445
446/* netdir_inet.c */
447int _get_hostserv_inetnetdir_byname(struct netconfig *nconf,
448				struct nss_netdirbyname_in *args,
449				union nss_netdirbyname_out *res);
450int _get_hostserv_inetnetdir_byaddr(struct netconfig *nconf,
451				struct nss_netdirbyaddr_in *args,
452				union nss_netdirbyaddr_out *res);
453int __nss2herrno(nss_status_t nsstat);
454nss_status_t _herrno2nss(int h_errno);
455struct hostent *_switch_gethostbyname_r(const char *name,
456				struct hostent *result,
457				char *buffer, int buflen, int *h_errnop);
458struct hostent *_switch_gethostbyaddr_r(const char *addr, int len, int type,
459				struct hostent *result,
460				char *buffer, int buflen, int *h_errnop);
461int str2servent(const char *instr, int lenstr, void *ent,
462				char *buffer, int buflen);
463void *__inet_get_local_interfaces(void);
464void __inet_free_local_interfaces(void *p);
465int __inet_address_is_local(void *p, struct in_addr addr);
466int __inet_uaddr_is_local(void *p, struct netconfig *nc, char *uaddr);
467int __inet_address_count(void *p);
468ulong_t __inet_get_addr(void *p, int n);
469char *__inet_get_uaddr(void *p, struct netconfig *nc, int n);
470char *__inet_get_networka(void *p, int n);
471
472/* netdir_inet_sundry.c */
473
474/*
475 * usr/src/lib/libnsl/rpc routines
476 */
477
478/* auth_des.c */
479AUTH *authdes_seccreate(const char *servername, uint_t win,
480			const char *timehost, const des_block *ckey);
481
482/* auth_none.c */
483AUTH *authnone_create(void);
484
485/* auth_sys.c */
486AUTH *authsys_create(const char *machname, uid_t uid, gid_t gid, int len,
487			const gid_t *aup_gids);
488AUTH *authsys_create_default(void);
489
490/* auth_time.c */
491
492/* authdes_prot.c */
493bool_t xdr_authdes_cred(XDR *xdrs, struct authdes_cred *cred);
494bool_t xdr_authdes_verf(XDR *xdrs, struct authdes_verf *verf);
495
496/* authsys_prot.c */
497bool_t xdr_authsys_parms(XDR *xdrs, struct authsys_parms *p);
498bool_t xdr_uid_t(XDR *xdrs, uid_t *ip);
499bool_t xdr_gid_t(XDR *xdrs, gid_t *ip);
500
501/* clnt_bcast.c */
502enum clnt_stat rpc_broadcast_exp(rpcprog_t prog, rpcvers_t vers, rpcproc_t proc,
503		xdrproc_t xargs, caddr_t argsp, xdrproc_t xresults,
504		caddr_t resultsp, resultproc_t eachresult, int inittime,
505		int waittime, const char *netclass);
506enum clnt_stat rpc_broadcast(rpcprog_t prog, rpcvers_t vers, rpcproc_t proc,
507		xdrproc_t xargs, caddr_t argsp, xdrproc_t xresults,
508		caddr_t resultsp, resultproc_t eachresult,
509		const char *netclass);
510
511/* clnt_dg.c */
512CLIENT *clnt_dg_create(int fd, struct netbuf *svcaddr, rpcprog_t program,
513		rpcvers_t version, uint_t sendsz, uint_t recvsz);
514
515/* clnt_door.c */
516CLIENT *clnt_door_create(rpcprog_t program, rpcvers_t version, uint_t sendsz);
517
518/* clnt_generic.c */
519CLIENT *clnt_create_vers(const char *hostname, rpcprog_t prog,
520		rpcvers_t *vers_out, rpcvers_t vers_low,
521		rpcvers_t vers_high, const char *nettype);
522CLIENT *clnt_create_vers_timed(const char *hostname, rpcprog_t prog,
523		rpcvers_t *vers_out, rpcvers_t vers_low,
524		rpcvers_t vers_high, const char *nettype,
525		const struct timeval *tp);
526CLIENT *clnt_create(const char *hostname, rpcprog_t prog, rpcvers_t vers,
527		const char *nettype);
528CLIENT *clnt_create_timed(const char *hostname, rpcprog_t prog, rpcvers_t vers,
529		const char *netclass, const struct timeval *tp);
530CLIENT *clnt_tp_create(const char *hostname, rpcprog_t prog, rpcvers_t vers,
531		const struct netconfig *nconf);
532CLIENT *clnt_tp_create_timed(const char *hostname, rpcprog_t prog,
533		rpcvers_t vers, const struct netconfig *nconf,
534		const struct timeval *tp);
535CLIENT *clnt_tli_create(int fd, const struct netconfig *nconf,
536		struct netbuf *svcaddr, rpcprog_t prog, rpcvers_t vers,
537		uint_t sendsz, uint_t recvsz);
538
539/* clnt_perror.c */
540char *clnt_sperror(const CLIENT *cl, const char *s);
541void clnt_perror(const CLIENT *cl, const char *s);
542void clnt_perrno(enum clnt_stat num);
543char *clnt_spcreateerror(const char *s);
544void clnt_pcreateerror(const char *s);
545const char *clnt_sperrno(const enum clnt_stat stat);
546
547/* clnt_raw.c */
548CLIENT *clnt_raw_create(rpcprog_t prog, rpcvers_t vers);
549
550/* clnt_simple.c */
551enum clnt_stat rpc_call(const char *host, rpcprog_t prognum, rpcvers_t versnum,
552		rpcproc_t procnum, xdrproc_t inproc, const char *in,
553		xdrproc_t outproc, char *out, const char *netclass);
554
555/* clnt_vc.c */
556CLIENT *clnt_vc_create(int fd, struct netbuf *svcaddr, rpcprog_t prog,
557		rpcvers_t vers, uint_t sendsz, uint_t recvsz);
558
559/* getdname.c */
560int getdomainname(char *name, int namelen);
561int setdomainname(char *domain, int len);
562
563/* gethostname.c */
564int gethostname(char *hname, int hlen);
565
566/* inet_ntoa.c */
567char *inet_ntoa_r(struct in_addr in, char b[]);
568char *inet_ntoa(struct in_addr in);
569in_addr_t inet_addr(const char *cp);
570in_addr_t inet_netof(struct in_addr in);
571
572/* key_call.c */
573int key_setsecret(const char *secretkey);
574int key_secretkey_is_set(void);
575int key_encryptsession_pk(const char *remotename, netobj *remotekey,
576				des_block *deskey);
577int key_decryptsession_pk(const char *remotename, netobj *remotekey,
578				des_block *deskey);
579
580int key_encryptsession(const char *remotename, des_block *deskey);
581int key_decryptsession(const char *remotename, des_block *deskey);
582int key_gendes(des_block *key);
583int key_setnet(struct key_netstarg *arg);
584int key_get_conv(char *pkey, des_block *deskey);
585int key_call(ulong_t proc, xdrproc_t xdr_arg, char *arg, xdrproc_t xdr_rslt,
586				char *rslt);
587
588/* key_prot.c */
589bool_t xdr_keystatus(XDR *xdrs, keystatus *objp);
590bool_t xdr_keybuf(XDR *xdrs, keybuf objp);
591bool_t xdr_netnamestr(XDR *xdrs, netnamestr *objp);
592bool_t xdr_cryptkeyarg(XDR *xdrs, cryptkeyarg *objp);
593bool_t xdr_cryptkeyarg2(XDR *xdrs, cryptkeyarg2 *objp);
594bool_t xdr_cryptkeyres(XDR *xdrs, cryptkeyres *objp);
595bool_t xdr_unixcred(XDR *xdrs, unixcred *objp);
596bool_t xdr_getcredres(XDR *xdrs, getcredres *objp);
597bool_t xdr_key_netstarg(XDR *xdrs, key_netstarg *objp);
598bool_t xdr_key_netstres(XDR *xdrs, key_netstres *objp);
599
600/* mt_misc.c */
601#ifdef rpc_createerr
602#undef rpc_createerr
603#endif
604struct rpc_createerr *__rpc_createerr(void);
605
606/* netname.c */
607int getnetname(char *name);
608int __getnetnamebyuid(char *name, uid_t uid);
609int user2netname(char *netname, const uid_t uid, const char *domain);
610int host2netname(char *netname, const char *host, const char *domain);
611
612/* netnamer.c */
613int netname2user(const char *netname, uid_t *uidp, gid_t *gidp,
614					int *gidlenp, gid_t *gidlist);
615int netname2host(const char *netname, char *hostname, int hostlen);
616
617/* openchild.c */
618
619/* pmap_clnt.c */
620int pmap_set(rpcprog_t program, rpcvers_t version, rpcprot_t protocol, ushort_t port);
621bool_t pmap_unset(rpcprog_t program, rpcvers_t version);
622ushort_t pmap_getport(struct sockaddr_in *address, rpcprog_t program,
623			rpcvers_t version, rpcprot_t protocol);
624struct pmaplist *pmap_getmaps(struct sockaddr_in *address);
625enum clnt_stat pmap_rmtcall(struct sockaddr_in *addr, rpcprog_t prog,
626			rpcvers_t vers, rpcproc_t proc, xdrproc_t xdrargs,
627			caddr_t argsp, xdrproc_t xdrres, caddr_t resp,
628			struct timeval tout, rpcport_t *port_ptr);
629
630/* pmap_prot.c */
631bool_t xdr_pmap(XDR *xdrs, struct pmap *objp);
632bool_t xdr_pmaplist_ptr(XDR *xdrs, pmaplist_ptr *rp);
633bool_t xdr_pmaplist(XDR *xdrs, PMAPLIST **rp);
634bool_t xdr_rmtcallargs(XDR *xdrs, struct p_rmtcallargs *cap);
635bool_t xdr_rmtcallres(XDR *xdrs, struct p_rmtcallres *crp);
636
637/* rpc_callmsg.c */
638bool_t xdr_callmsg(XDR *xdrs, struct rpc_msg *cmsg);
639
640/* rpc_comdata.c */
641
642/* rpc_generic.c */
643int __rpc_dtbsize(void);
644uint_t __rpc_get_t_size(t_scalar_t size, t_scalar_t bufsize);
645uint_t __rpc_get_a_size(t_scalar_t size);
646struct netconfig *__rpc_getconfip(char *nettype);
647void *__rpc_setconf(char *nettype);
648struct netconfig *__rpc_getconf(void *vhandle);
649void __rpc_endconf(void *vhandle);
650struct netconfig *__rpcfd_to_nconf(int fd, int servtype);
651int __rpc_matchserv(int servtype, unsigned int nc_semantics);
652
653/* rpc_prot.c */
654bool_t xdr_opaque_auth(XDR *xdrs, struct opaque_auth *ap);
655bool_t xdr_des_block(XDR *xdrs, des_block *blkp);
656bool_t xdr_accepted_reply(XDR *xdrs, struct accepted_reply *ar);
657bool_t xdr_rejected_reply(XDR *xdrs, struct rejected_reply *rr);
658bool_t xdr_replymsg(XDR *xdrs, struct rpc_msg *rmsg);
659bool_t xdr_callhdr(XDR *xdrs, struct rpc_msg *cmsg);
660void __seterr_reply(struct rpc_msg *msg, struct rpc_err *error);
661
662/* rpc_sel2poll.c */
663int __rpc_select_to_poll(int fdmax, fd_set *fdset, struct pollfd *p0);
664int __rpc_timeval_to_msec(struct timeval *t);
665
666/* rpc_soc.c */
667CLIENT *clntudp_bufcreate(struct sockaddr_in *raddr, rpcprog_t prog,
668			rpcvers_t vers, struct timeval wait, int *sockp,
669			uint_t sendsz, uint_t recvsz);
670CLIENT *clntudp_create(struct sockaddr_in *raddr, rpcprog_t program,
671			rpcvers_t version, struct timeval wait, int *sockp);
672CLIENT *clnttcp_create(struct sockaddr_in *raddr, rpcprog_t prog,
673			rpcvers_t vers, int *sockp, uint_t sendsz,
674			uint_t recvsz);
675CLIENT *clntraw_create(rpcprog_t prog, rpcvers_t vers);
676SVCXPRT *svctcp_create(int fd, uint_t sendsize, uint_t recvsize);
677SVCXPRT *svcudp_bufcreate(int fd, uint_t sendsize, uint_t recvsize);
678SVCXPRT *svcfd_create(int fd, uint_t sendsize, uint_t recvsize);
679SVCXPRT *svcudp_create(int fd);
680SVCXPRT *svcraw_create(void);
681int __rpc_bindresvport(int fd, struct sockaddr_in *sin, int *portp, int qlen);
682void get_myaddress(struct sockaddr_in *addr);
683ushort_t getrpcport(char *host, rpcprog_t prognum, rpcvers_t versnum, rpcprot_t proto);
684int callrpc(char *host, rpcprog_t prognum, rpcvers_t versnum, rpcproc_t procnum,
685		xdrproc_t inproc, char *in, xdrproc_t outproc, char *out);
686int registerrpc(rpcprog_t prognum, rpcvers_t versnum, rpcproc_t procnum,
687		char *(*progname)(), xdrproc_t inproc, xdrproc_t outproc);
688enum clnt_stat clnt_broadcast(rpcprog_t prog, rpcvers_t vers, rpcproc_t proc,
689		xdrproc_t xargs, caddr_t argsp, xdrproc_t xresults,
690		caddr_t resultsp, resultproc_t eachresult);
691AUTH *authdes_create(char *servername, uint_t window,
692		struct sockaddr_in *syncaddr, des_block *ckey);
693
694/* rpc_td.c */
695
696/* rpcb_clnt.c */
697bool_t __rpc_control(int request, void *info);
698bool_t rpcb_set(rpcprog_t program, rpcvers_t version,
699		const struct netconfig *nconf, const struct netbuf *address);
700bool_t rpcb_unset(rpcprog_t program, rpcvers_t version,
701		const struct netconfig *nconf);
702int rpcb_getaddr(rpcprog_t program, rpcvers_t version,
703		const struct netconfig *nconf, struct netbuf *address,
704		const char *host);
705rpcblist *rpcb_getmaps(const struct netconfig *nconf, const char *host);
706enum clnt_stat rpcb_rmtcall(const struct netconfig *nconf, const char *host,
707		rpcprog_t prog, rpcvers_t vers, rpcproc_t proc,
708		xdrproc_t xdrargs, caddr_t argsp, xdrproc_t xdrres,
709		caddr_t resp, struct timeval tout,
710		struct netbuf *addr_ptr);
711bool_t rpcb_gettime(const char *host, time_t *timep);
712char *rpcb_taddr2uaddr(struct netconfig *nconf, struct netbuf *taddr);
713struct netbuf *rpcb_uaddr2taddr(struct netconfig *nconf, char *uaddr);
714
715/* rpcb_prot.c */
716bool_t xdr_rpcb(XDR *xdrs, RPCB *objp);
717bool_t xdr_rpcblist_ptr(XDR *xdrs, rpcblist_ptr *rp);
718bool_t xdr_rpcblist(XDR *xdrs, RPCBLIST **rp);
719bool_t xdr_rpcb_entry(XDR *xdrs, rpcb_entry *objp);
720bool_t xdr_rpcb_entry_list_ptr(XDR *xdrs, rpcb_entry_list_ptr *rp);
721bool_t xdr_rpcb_rmtcallargs(XDR *xdrs, struct r_rpcb_rmtcallargs *objp);
722bool_t xdr_rpcb_rmtcallres(XDR *xdrs, struct r_rpcb_rmtcallres *objp);
723bool_t xdr_netbuf(XDR *xdrs, struct netbuf *objp);
724
725/* rpcb_st_xdr.c */
726bool_t xdr_rpcbs_addrlist(XDR *xdrs, rpcbs_addrlist *objp);
727bool_t xdr_rpcbs_addrlist(XDR *xdrs, rpcbs_addrlist *objp);
728
729bool_t xdr_rpcbs_rmtcalllist(XDR *xdrs, rpcbs_rmtcalllist *objp);
730bool_t xdr_rpcbs_proc(XDR *xdrs, rpcbs_proc objp);
731bool_t xdr_rpcbs_addrlist_ptr(XDR *xdrs, rpcbs_addrlist_ptr *objp);
732bool_t xdr_rpcbs_rmtcalllist_ptr(XDR *xdrs, rpcbs_rmtcalllist_ptr *objp);
733bool_t xdr_rpcb_stat(XDR *xdrs, rpcb_stat *objp);
734bool_t xdr_rpcb_stat_byvers(XDR *xdrs, rpcb_stat_byvers objp);
735
736/* rpcdname.c */
737int __rpc_get_default_domain(char **domain);
738
739/* rpcsec_gss_if.c */
740AUTH *rpc_gss_seccreate(CLIENT *clnt, char *principal, char *mechanism,
741		rpc_gss_service_t service_type, char *qop,
742		rpc_gss_options_req_t *options_req,
743		rpc_gss_options_ret_t *options_ret);
744bool_t rpc_gss_set_defaults(AUTH *auth, rpc_gss_service_t service, char *qop);
745bool_t rpc_gss_get_principal_name(rpc_gss_principal_t *principal, char
746		*mechanism, char *user_name, char *node, char *secdomain);
747char **rpc_gss_get_mechanisms(void);
748char **rpc_gss_get_mech_info(char *mechanism, rpc_gss_service_t *service);
749bool_t rpc_gss_get_versions(u_int *vers_hi, u_int *vers_lo);
750bool_t rpc_gss_is_installed(char *mechanism);
751bool_t rpc_gss_set_svc_name(char *principal, char *mechanism, uint_t req_time,
752		uint_t program, uint_t version);
753bool_t rpc_gss_set_callback(rpc_gss_callback_t *cb);
754bool_t rpc_gss_getcred(struct svc_req *req, rpc_gss_rawcred_t **rcred,
755		rpc_gss_ucred_t **ucred, void **cookie);
756bool_t rpc_gss_mech_to_oid(char *mech, rpc_gss_OID *oid);
757bool_t rpc_gss_qop_to_num(char *qop, char *mech, u_int *num);
758int rpc_gss_max_data_length(AUTH *rpcgss_handle, int max_tp_unit_len);
759int rpc_gss_svc_max_data_length(struct svc_req *req, int max_tp_unit_len);
760void rpc_gss_get_error(rpc_gss_error_t *error);
761
762/* rtime_tli.c */
763int rtime_tli(char *host, struct timeval *timep, struct timeval *timeout);
764
765/* svc.c */
766void xprt_register(const SVCXPRT *xprt);
767void xprt_unregister(const SVCXPRT *xprt);
768bool_t svc_reg(const SVCXPRT *xprt, rpcprog_t prog, rpcvers_t vers,
769		void (*dispatch)(), const struct netconfig *nconf);
770void svc_unreg(rpcprog_t prog, rpcvers_t vers);
771bool_t svc_register(SVCXPRT *xprt, rpcprog_t prog, rpcvers_t vers,
772		void (*dispatch)(), int protocol);
773void svc_unregister(rpcprog_t prog, rpcvers_t vers);
774bool_t svc_sendreply(const SVCXPRT *xprt, xdrproc_t xdr_results,
775		caddr_t xdr_location);
776void svcerr_noproc(const SVCXPRT *xprt);
777void svcerr_decode(const SVCXPRT *xprt);
778void svcerr_systemerr(const SVCXPRT *xprt);
779void svcerr_auth(const SVCXPRT *xprt, enum auth_stat why);
780void svcerr_weakauth(const SVCXPRT *xprt);
781void svcerr_noprog(const SVCXPRT *xprt);
782void svcerr_progvers(const SVCXPRT *xprt, rpcvers_t low_vers,
783		rpcvers_t high_vers);
784void svc_getreq(int rdfds);
785void svc_getreqset(fd_set *readfds);
786void svc_getreq_poll(struct pollfd *pfdp, int pollretval);
787void svc_getreq_common(int fd);
788SVCXPRT *svc_xprt_alloc(void);
789void svc_xprt_free(SVCXPRT *xprt);
790bool_t svc_get_local_cred(SVCXPRT *xprt, svc_local_cred_t *lcred);
791SVCAUTH *__svc_get_svcauth(SVCXPRT *);
792void *__svc_set_proc_cleanup_cb(void *cb);
793
794/* svc_auth.c */
795enum auth_stat __authenticate(struct svc_req *rqst, struct rpc_msg *msg);
796int svc_auth_reg(int cred_flavor, enum auth_stat (*handler)());
797
798/* svc_auth_sys.c */
799
800/* svc_dg.c */
801SVCXPRT *svc_dg_create(int fd, uint_t sendsize, uint_t recvsize);
802int svc_dg_enablecache(SVCXPRT *xprt, uint_t size);
803
804/* svc_door.c */
805SVCXPRT *svc_door_create(void (*dispatch)(), rpcprog_t prognum,
806			rpcvers_t versnum, uint_t sendsize);
807
808/* svc_generic.c */
809int svc_create(void (*dispatch)(), rpcprog_t prognum, rpcvers_t versnum,
810			const char *nettype);
811SVCXPRT *svc_tp_create(void (*dispatch)(), rpcprog_t prognum, rpcvers_t versnum,
812			const struct netconfig *nconf);
813SVCXPRT *svc_tli_create(int fd, const struct netconfig *nconf,
814			const struct t_bind *bindaddr, uint_t sendsz,
815			uint_t recvsz);
816
817/* svc_raw.c */
818SVCXPRT *svc_raw_create(void);
819
820/* svc_run.c */
821void svc_run(void);
822void svc_exit(void);
823void svc_done(SVCXPRT *xprt);
824bool_t rpc_control(int op, void *info);
825
826/* svc_simple.c */
827int rpc_reg(rpcprog_t prognum, rpcvers_t versnum, rpcproc_t procnum,
828		char *(*progname)(), xdrproc_t inproc, xdrproc_t outproc,
829		const char *nettype);
830
831/* svc_vc.c */
832SVCXPRT *svc_vc_create(int fd, uint_t sendsize, uint_t recvsize);
833SVCXPRT *svc_fd_create(int fd, uint_t sendsize, uint_t recvsize);
834void __svc_nisplus_fdcleanup_hack(void);
835void __svc_nisplus_enable_timestamps(void);
836void __svc_nisplus_purge_since(long since);
837bool_t __svc_vc_dupcache_init(SVCXPRT *xprt, void *condition, int basis);
838int __svc_vc_dup(struct svc_req *req, caddr_t *resp_buf, uint_t *resp_bufsz);
839int __svc_vc_dupdone(struct svc_req *req, caddr_t resp_buf, uint_t resp_bufsz,
840				int status);
841
842/* svcauth_des.c */
843int authdes_getucred(const struct authdes_cred *adc, uid_t *uid, gid_t *gid,
844				short *grouplen, gid_t *groups);
845enum auth_stat __svcauth_des(struct svc_req *rqst, struct rpc_msg *msg);
846
847/* ti_opts.c */
848int __rpc_negotiate_uid(int fd);
849int __rpc_get_local_uid(SVCXPRT *trans, uid_t *uid_out);
850
851/* xdr.c */
852void xdr_free(xdrproc_t proc, char *objp);
853bool_t xdr_void(void);
854bool_t xdr_int(XDR *xdrs, int *ip);
855bool_t xdr_u_int(XDR *xdrs, uint_t *up);
856bool_t xdr_long(XDR *xdrs, long *lp);
857bool_t xdr_u_long(XDR *xdrs, ulong_t *ulp);
858bool_t xdr_short(XDR *xdrs, short *sp);
859bool_t xdr_u_short(XDR *xdrs, ushort_t *sp);
860bool_t xdr_char(XDR *xdrs, char *cp);
861bool_t xdr_u_char(XDR *xdrs, uchar_t *cp);
862bool_t xdr_bool(XDR *xdrs, bool_t *bp);
863bool_t xdr_enum(XDR *xdrs, enum_t *ep);
864bool_t xdr_opaque(XDR *xdrs, caddr_t cp, uint_t cnt);
865bool_t xdr_bytes(XDR *xdrs, char **cpp, uint_t *sizep, uint_t maxsize);
866bool_t xdr_netobj(XDR *xdrs, struct netobj *np);
867bool_t xdr_union(XDR *xdrs, enum_t *dscmp, char *unp,
868			const struct xdr_discrim *choices, xdrproc_t dfault);
869bool_t xdr_string(XDR *xdrs, char **cpp, uint_t maxsize);
870bool_t xdr_hyper(XDR *xdrs, longlong_t *hp);
871bool_t xdr_u_hyper(XDR *xdrs, u_longlong_t *hp);
872bool_t xdr_longlong_t(XDR *xdrs, longlong_t *hp);
873bool_t xdr_u_longlong_t(XDR *xdrs, u_longlong_t *hp);
874bool_t xdr_ulonglong_t(XDR *xdrs, u_longlong_t *hp);
875bool_t xdr_wrapstring(XDR *xdrs, char **cpp);
876
877/* xdr_array.c */
878bool_t xdr_array(XDR *xdrs, caddr_t *addrp, uint_t *sizep, uint_t maxsize,
879				uint_t elsize, xdrproc_t elproc);
880bool_t xdr_vector(XDR *xdrs, char *basep, uint_t nelem, uint_t elemsize,
881				xdrproc_t xdr_elem);
882
883/* xdr_float.c */
884bool_t xdr_float(XDR *xdrs, float *fp);
885bool_t xdr_double(XDR *xdrs, double *dp);
886bool_t xdr_quadruple(XDR *xdrs, long double *fp);
887
888/* xdr_mem.c */
889void xdrmem_create(XDR *xdrs, caddr_t addr, uint_t size, enum xdr_op op);
890
891/* xdr_rec.c */
892void xdrrec_create(XDR *xdrs, uint_t sendsize, uint_t recvsize,
893			caddr_t tcp_handle, int (*readit)(), int (*writeit)());
894
895uint_t xdrrec_readbytes(XDR *xdrs, caddr_t addr, uint_t l);
896bool_t xdrrec_skiprecord(XDR *xdrs);
897bool_t xdrrec_eof(XDR *xdrs);
898bool_t xdrrec_endofrecord(XDR *xdrs, bool_t sendnow);
899
900/* xdr_refer.c */
901bool_t xdr_reference(XDR *xdrs, caddr_t *pp, uint_t size, xdrproc_t proc);
902bool_t xdr_pointer(XDR *xdrs, char **objpp, uint_t obj_size, xdrproc_t xdr_obj);
903
904/* xdr_sizeof.c */
905unsigned int xdr_sizeof(xdrproc_t func, void *data);
906
907/* xdr_stdio.c */
908void xdrstdio_create(XDR *xdrs, FILE *file, enum xdr_op op);
909
910/* svid_funcs.c */
911#undef	auth_destroy
912#undef	clnt_call
913#undef	clnt_control
914#undef	clnt_destroy
915#undef	clnt_freeres
916#undef	clnt_geterr
917#undef	svc_destroy
918#undef	svc_freeargs
919#undef	svc_getargs
920#undef	svc_getrpccaller
921#undef	xdr_destroy
922#undef	xdr_getpos
923#undef	xdr_inline
924#undef	xdr_setpos
925void auth_destroy(AUTH *auth);
926enum clnt_stat clnt_call(CLIENT *cl, rpcproc_t proc, xdrproc_t xargs,
927			caddr_t argsp, xdrproc_t xres, caddr_t resp,
928			struct timeval timeout);
929bool_t clnt_control(CLIENT *cl, uint_t rq, void *in);
930void clnt_destroy(CLIENT *cl);
931bool_t clnt_freeres(CLIENT *cl, xdrproc_t xres, caddr_t resp);
932void clnt_geterr(CLIENT *cl, struct rpc_err *errp);
933bool_t svc_control(SVCXPRT *xprt, const uint_t rq, void *in);
934bool_t svc_freeargs(SVCXPRT *xprt, xdrproc_t xargs, char *argsp);
935bool_t svc_getargs(SVCXPRT *xprt, xdrproc_t xargs, char *argsp);
936struct netbuf *svc_getrpccaller(SVCXPRT *xprt);
937long *xdr_inline(XDR *xdrs, int len);
938void xdr_destroy(XDR *xdrs);
939uint_t xdr_getpos(XDR *xdrs);
940bool_t xdr_setpos(XDR *xdrs, uint_t pos);
941
942/*
943 * usr/src/lib/libnsl/saf routines
944 */
945
946/* checkver.c */
947int check_version(int ver, char *fname);
948
949/* doconfig.c */
950int doconfig(int fd, char *script, long rflag);
951
952/*
953 * usr/src/lib/libnsl/yp routines
954 */
955
956/* dbm.c */
957int dbminit(char *file);
958int dbmclose(void);
959datum fetch(datum key);
960int delete(datum key);
961int store(datum key, datum dat);
962datum firstkey(void);
963datum nextkey(datum key);
964datum firsthash(long hash);
965datum makdatum(char *buf, int n);
966long hashinc(long hash);
967long calchash(datum item);
968
969/* yp_all.c */
970int yp_all(char *domain, char *map, struct ypall_callback *callback);
971int __yp_all_rsvdport(char *domain, char *map, struct ypall_callback *callback);
972
973/* yp_b_clnt.c */
974enum ypbind_resptype {
975	YPBIND_SUCC_VAL = 1,
976	YPBIND_FAIL_VAL = 2
977};
978typedef enum ypbind_resptype ypbind_resptype;
979struct ypbind_resp {
980	ypbind_resptype ypbind_status;
981	union {
982		uint_t ypbind_error;
983		struct ypbind_binding *ypbind_bindinfo;
984	} ypbind_resp_u;
985};
986typedef struct ypbind_resp ypbind_resp;
987struct ypbind_domain {
988	char *ypbind_domainname;
989	rpcvers_t ypbind_vers;
990};
991typedef struct ypbind_domain ypbind_domain;
992struct ypbind_setdom {
993	char *ypsetdom_domain;
994	struct ypbind_binding *ypsetdom_bindinfo;
995};
996typedef struct ypbind_setdom ypbind_setdom;
997ypbind_resp *ypbindproc_domain_3(ypbind_domain *argp, CLIENT *clnt);
998
999/* yp_b_xdr.c */
1000bool_t xdr_ypbind_domain(XDR *xdrs, ypbind_domain *objp);
1001bool_t xdr_ypbind_resp(XDR *xdrs, ypbind_resp *objp);
1002bool_t xdr_ypbind_setdom(XDR *xdrs, ypbind_setdom *objp);
1003bool_t xdr_ypbind_resptype(XDR *xdrs, ypbind_resptype *objp);
1004
1005/* yp_bind.c */
1006struct dom_binding {
1007	struct dom_binding *dom_pnext;
1008	char *dom_domain;
1009	struct ypbind_binding *dom_binding;
1010	CLIENT *dom_client;
1011	int cache_bad;
1012	int fd;
1013	dev_t rdev;
1014	int ref_count;
1015	int need_free;
1016	mutex_t server_name_lock;
1017};
1018int __yp_dobind(char *domain, struct dom_binding **binding);
1019int __yp_rel_binding(struct dom_binding *binding);
1020void yp_unbind(char *domain);
1021int __yp_add_binding(char *domain, char *addr);
1022int yp_bind(char *domain);
1023int yp_get_default_domain(char **domain);
1024int usingypmap(char **ddn, char *map);
1025CLIENT *__clnt_create_loopback(rpcprog_t prog, rpcvers_t vers, int err);
1026
1027/* yp_enum.c */
1028int yp_first(char *domain, char *map, char **key, int *keylen,
1029					char **val, int  *vallen);
1030int yp_next(char *domain, char *map, char *inkey, int inkeylen,
1031		char **outkey, int  *outkeylen, char **val, int *vallen);
1032
1033/* yp_master.c */
1034int yp_master(char *domain, char *map, char **master);
1035int __yp_master_rsvdport(char *domain, char *map, char **master);
1036
1037/* yp_match.c */
1038int yp_match(char *domain, char *map, char *key, int keylen,
1039						char **val, int  *vallen);
1040int yp_match_rsvdport(char *domain, char *map, char *key, int keylen,
1041						char **val, int  *vallen);
1042void __empty_yp_cache(void);
1043
1044/* yp_order.c */
1045int yp_order(char *domain, char *map, unsigned long *order);
1046
1047/* yp_rsvd.c */
1048CLIENT *__yp_clnt_create_rsvdport(const char *hostname,
1049			rpcprog_t prog, rpcvers_t vers,
1050			const char *nettype,
1051			const uint_t sendsz, const uint_t recvsz);
1052
1053/* yp_update.c */
1054int yp_update(char *domain, char *map, unsigned op,
1055			char *key, int keylen, char *data, int datalen);
1056
1057/* yp_xdr.c */
1058bool xdr_datum(XDR * xdrs, datum *pdatum);
1059bool xdr_ypdomain_wrap_string(XDR *xdrs, char **ppstring);
1060bool xdr_ypmap_wrap_string(XDR *xdrs, char **ppstring);
1061bool xdr_ypreq_key(XDR *xdrs, struct ypreq_key *ps);
1062bool xdr_ypreq_nokey(XDR *xdrs, struct ypreq_nokey *ps);
1063bool xdr_ypresp_val(XDR *xdrs, struct ypresp_val *ps);
1064bool xdr_ypresp_key_val(XDR *xdrs, struct ypresp_key_val *ps);
1065bool xdr_ypowner_wrap_string(XDR *xdrs, char **ppstring);
1066bool xdr_ypmap_parms(XDR *xdrs, struct ypmap_parms *ps);
1067bool xdr_ypresp_master(XDR *xdrs, struct ypresp_master *ps);
1068bool xdr_ypresp_order(XDR * xdrs, struct ypresp_order *ps);
1069bool xdr_ypresp_maplist(XDR *xdrs, struct ypresp_maplist *ps);
1070bool xdr_yppushresp_xfr(XDR *xdrs, struct yppushresp_xfr *ps);
1071bool xdr_ypreq_newxfr(XDR *xdrs, struct ypreq_newxfr *ps);
1072bool xdr_ypreq_xfr(XDR *xdrs, struct ypreq_xfr *ps);
1073bool xdr_ypall(XDR *xdrs, struct ypall_callback *callback);
1074
1075/* yperr_string.c */
1076char *yperr_string(int code);
1077
1078/* yppasswd_xdr.c */
1079bool_t xdr_yppasswd(XDR *xdrsp, struct yppasswd *pp);
1080
1081/* ypprot_err.c */
1082int ypprot_err(int yp_protocol_error);
1083
1084/* ypupd.c */
1085bool_t xdr_yp_buf(XDR *xdrs, yp_buf *objp);
1086bool_t xdr_ypupdate_args(XDR *xdrs, ypupdate_args *objp);
1087bool_t xdr_ypdelete_args(XDR *xdrs, ypdelete_args *objp);
1088
1089/* nis_sec_mechs.c */
1090char *__nis_keyalg2authtype(keylen_t keylen, algtype_t algtype,
1091	char *authtype, size_t authtype_len);
1092
1093/* usr/src/lib/libnsl/nss/parse.c */
1094char *_strtok_escape(char *string, char *sepset, char **lasts);
1095