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