xref: /titanic_41/usr/src/lib/libnsl/common/llib-lnsl (revision 61961e0f20c7637a3846bb39786bb9dffa91dfb9)
17c478bd9Sstevel@tonic-gate/*
27c478bd9Sstevel@tonic-gate * CDDL HEADER START
37c478bd9Sstevel@tonic-gate *
47c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the
57c478bd9Sstevel@tonic-gate * Common Development and Distribution License, Version 1.0 only
67c478bd9Sstevel@tonic-gate * (the "License").  You may not use this file except in compliance
77c478bd9Sstevel@tonic-gate * with the License.
87c478bd9Sstevel@tonic-gate *
97c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
107c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing.
117c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions
127c478bd9Sstevel@tonic-gate * and limitations under the License.
137c478bd9Sstevel@tonic-gate *
147c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each
157c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
167c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the
177c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying
187c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner]
197c478bd9Sstevel@tonic-gate *
207c478bd9Sstevel@tonic-gate * CDDL HEADER END
217c478bd9Sstevel@tonic-gate */
22*61961e0fSrobinson
237c478bd9Sstevel@tonic-gate/* LINTLIBRARY */
247c478bd9Sstevel@tonic-gate/* PROTOLIB1 */
257c478bd9Sstevel@tonic-gate
267c478bd9Sstevel@tonic-gate/*
27*61961e0fSrobinson * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
287c478bd9Sstevel@tonic-gate * Use is subject to license terms.
297c478bd9Sstevel@tonic-gate */
307c478bd9Sstevel@tonic-gate
317c478bd9Sstevel@tonic-gate#pragma ident	"%Z%%M%	%I%	%E% SMI"
327c478bd9Sstevel@tonic-gate
337c478bd9Sstevel@tonic-gate#include <sys/types.h>
347c478bd9Sstevel@tonic-gate#include <thread.h>
357c478bd9Sstevel@tonic-gate#include <synch.h>
367c478bd9Sstevel@tonic-gate#include <fcntl.h>
377c478bd9Sstevel@tonic-gate#include <sys/des.h>
387c478bd9Sstevel@tonic-gate#include <des/softdes.h>
397c478bd9Sstevel@tonic-gate#include <des/desdata.h>
407c478bd9Sstevel@tonic-gate#include <rpc/rpc.h>
417c478bd9Sstevel@tonic-gate#include <rpc/key_prot.h>
427c478bd9Sstevel@tonic-gate#include <rpc/des_crypt.h>
437c478bd9Sstevel@tonic-gate#include <rpc/pmap_prot.h>
447c478bd9Sstevel@tonic-gate#include <sys/ioctl.h>
457c478bd9Sstevel@tonic-gate#include <netdir.h>
467c478bd9Sstevel@tonic-gate#include <nss_netdir.h>
477c478bd9Sstevel@tonic-gate#include <nss_dbdefs.h>
487c478bd9Sstevel@tonic-gate#include <sac.h>
497c478bd9Sstevel@tonic-gate#include <netconfig.h>
507c478bd9Sstevel@tonic-gate#include <ndbm.h>
517c478bd9Sstevel@tonic-gate#include <rpcsvc/yp_prot.h>
527c478bd9Sstevel@tonic-gate#include <rpcsvc/ypclnt.h>
537c478bd9Sstevel@tonic-gate#include <rpcsvc/yppasswd.h>
547c478bd9Sstevel@tonic-gate#include <rpcsvc/ypupd.h>
557c478bd9Sstevel@tonic-gate#include <rpcsvc/nis.h>
567c478bd9Sstevel@tonic-gate#include <rpcsvc/nis_callback.h>
577c478bd9Sstevel@tonic-gate#include <rpcsvc/nislib.h>
587c478bd9Sstevel@tonic-gate#include <rpcsvc/nispasswd.h>
597c478bd9Sstevel@tonic-gate#include <sys/stream.h>
607c478bd9Sstevel@tonic-gate#include <sys/stropts.h>
617c478bd9Sstevel@tonic-gate#include <sys/tihdr.h>
627c478bd9Sstevel@tonic-gate#include <sys/timod.h>
637c478bd9Sstevel@tonic-gate#include <tiuser.h>
647c478bd9Sstevel@tonic-gate
657c478bd9Sstevel@tonic-gate
667c478bd9Sstevel@tonic-gate/*
677c478bd9Sstevel@tonic-gate * Declare t_errno, even though this file is compiled '_REENTRANT'.  This
687c478bd9Sstevel@tonic-gate * way t_errno is defined in the lint library, which is used for programs
697c478bd9Sstevel@tonic-gate * compiled with _REENTRANT and those compiled without it.
707c478bd9Sstevel@tonic-gate */
717c478bd9Sstevel@tonic-gate#ifdef t_errno
727c478bd9Sstevel@tonic-gate#undef t_errno
737c478bd9Sstevel@tonic-gate#endif
747c478bd9Sstevel@tonic-gateextern int t_errno;
757c478bd9Sstevel@tonic-gate
767c478bd9Sstevel@tonic-gate/*
777c478bd9Sstevel@tonic-gate * usr/src/lib/libnsl/common routines
787c478bd9Sstevel@tonic-gate */
797c478bd9Sstevel@tonic-gate
807c478bd9Sstevel@tonic-gate/* common.c */
817c478bd9Sstevel@tonic-gate
827c478bd9Sstevel@tonic-gate/*
837c478bd9Sstevel@tonic-gate * usr/src/lib/libnsl/des routines
847c478bd9Sstevel@tonic-gate */
857c478bd9Sstevel@tonic-gate
867c478bd9Sstevel@tonic-gate/* des_crypt.c */
877c478bd9Sstevel@tonic-gateint cbc_crypt(char *key, char *buf, size_t len, uint_t mode, char *ivec);
887c478bd9Sstevel@tonic-gateint ecb_crypt(char *key, char *buf, size_t len, uint_t mode);
897c478bd9Sstevel@tonic-gate
907c478bd9Sstevel@tonic-gate/* des_soft.c */
917c478bd9Sstevel@tonic-gatevoid des_setparity(char *p);
927c478bd9Sstevel@tonic-gateint __des_crypt(char *buf, unsigned len, struct desparams *desp);
937c478bd9Sstevel@tonic-gate
947c478bd9Sstevel@tonic-gate/* intl_crypt.c */
957c478bd9Sstevel@tonic-gate
967c478bd9Sstevel@tonic-gate/* intl_soft.c */
977c478bd9Sstevel@tonic-gateint _des_crypt(char *buf, unsigned len, struct desparams *desp);
987c478bd9Sstevel@tonic-gate
997c478bd9Sstevel@tonic-gate/*
1007c478bd9Sstevel@tonic-gate * usr/src/lib/libnsl/dial routines
1017c478bd9Sstevel@tonic-gate */
1027c478bd9Sstevel@tonic-gate
1037c478bd9Sstevel@tonic-gate/* callers.c */
1047c478bd9Sstevel@tonic-gate
1057c478bd9Sstevel@tonic-gate/* conn.c */
1067c478bd9Sstevel@tonic-gate
1077c478bd9Sstevel@tonic-gate/* dial.c */
1087c478bd9Sstevel@tonic-gatevoid undial(int fd);
1097c478bd9Sstevel@tonic-gate
1107c478bd9Sstevel@tonic-gate/* getargs.c */
1117c478bd9Sstevel@tonic-gate
1127c478bd9Sstevel@tonic-gate/* interface.c */
1137c478bd9Sstevel@tonic-gate
1147c478bd9Sstevel@tonic-gate/* line.c */
1157c478bd9Sstevel@tonic-gate
1167c478bd9Sstevel@tonic-gate/* stoa.c */
1177c478bd9Sstevel@tonic-gate
1187c478bd9Sstevel@tonic-gate/* strecpy.c */
1197c478bd9Sstevel@tonic-gate
1207c478bd9Sstevel@tonic-gate/* strsave.c */
1217c478bd9Sstevel@tonic-gate
1227c478bd9Sstevel@tonic-gate/* sysfiles.c */
1237c478bd9Sstevel@tonic-gate
1247c478bd9Sstevel@tonic-gate/* ulockf.c */
1257c478bd9Sstevel@tonic-gate
1267c478bd9Sstevel@tonic-gate/* uucpdefs.c */
1277c478bd9Sstevel@tonic-gate
1287c478bd9Sstevel@tonic-gate/*
1297c478bd9Sstevel@tonic-gate * usr/src/lib/libnsl/key routines
1307c478bd9Sstevel@tonic-gate */
1317c478bd9Sstevel@tonic-gate
1327c478bd9Sstevel@tonic-gate/* gen_dhkeys.c */
1337c478bd9Sstevel@tonic-gatevoid __gen_dhkeys(char *public, char *secret, char *pass);
1347c478bd9Sstevel@tonic-gate
1357c478bd9Sstevel@tonic-gate/* publickey.c */
1367c478bd9Sstevel@tonic-gateint getpublickey(const char *netname, char *pkey);
1377c478bd9Sstevel@tonic-gateint __getpublickey_cached(char *netname, char *pkey, int *from_cache);
1387c478bd9Sstevel@tonic-gatevoid __getpublickey_flush(const char *netname);
1397c478bd9Sstevel@tonic-gateint getsecretkey(const char *netname, char *skey, const char *passwd);
1407c478bd9Sstevel@tonic-gate
1417c478bd9Sstevel@tonic-gate/* xcrypt.c */
1427c478bd9Sstevel@tonic-gateint xencrypt(char *secret, char *passwd);
1437c478bd9Sstevel@tonic-gateint xdecrypt(char *secret, char *passwd);
1447c478bd9Sstevel@tonic-gateint passwd2des(char *pw, char *key);
1457c478bd9Sstevel@tonic-gate
1467c478bd9Sstevel@tonic-gate/*
1477c478bd9Sstevel@tonic-gate * usr/src/lib/libnsl/netdir routines
1487c478bd9Sstevel@tonic-gate */
1497c478bd9Sstevel@tonic-gate
1507c478bd9Sstevel@tonic-gate/* netdir.c */
1517c478bd9Sstevel@tonic-gateint *__nderror(void);
1527c478bd9Sstevel@tonic-gateint netdir_getbyname(struct netconfig *tp, struct nd_hostserv *serv,
1537c478bd9Sstevel@tonic-gate				struct nd_addrlist **addrs);
1547c478bd9Sstevel@tonic-gateint netdir_getbyaddr(struct netconfig *tp, struct nd_hostservlist **serv,
1557c478bd9Sstevel@tonic-gate				struct netbuf *addr);
1567c478bd9Sstevel@tonic-gateint __netdir_getbyaddr_nosrv(struct netconfig *tp,
1577c478bd9Sstevel@tonic-gate				struct nd_hostservlist **serv,
1587c478bd9Sstevel@tonic-gate				struct netbuf *addr);
1597c478bd9Sstevel@tonic-gateint netdir_options(struct netconfig *tp, int option, int fd, char *par);
1607c478bd9Sstevel@tonic-gatestruct netbuf *uaddr2taddr(struct netconfig *tp, char *addr);
1617c478bd9Sstevel@tonic-gatechar *taddr2uaddr(struct netconfig *tp, struct netbuf *addr);
1627c478bd9Sstevel@tonic-gatevoid netdir_free(void *ptr, int type);
1637c478bd9Sstevel@tonic-gatechar *netdir_sperror(void);
1647c478bd9Sstevel@tonic-gatevoid netdir_perror(char *s);
1657c478bd9Sstevel@tonic-gate
1667c478bd9Sstevel@tonic-gate/*
1677c478bd9Sstevel@tonic-gate * usr/src/lib/libnsl/netselect routines
1687c478bd9Sstevel@tonic-gate */
1697c478bd9Sstevel@tonic-gate
1707c478bd9Sstevel@tonic-gate/* netselect.c */
1717c478bd9Sstevel@tonic-gatevoid *setnetconfig(void);
1727c478bd9Sstevel@tonic-gateint endnetconfig(void *vdata);
1737c478bd9Sstevel@tonic-gatestruct netconfig *getnetconfig(void *vdata);
1747c478bd9Sstevel@tonic-gatestruct netconfig *getnetconfigent(const char *netid);
1757c478bd9Sstevel@tonic-gatevoid freenetconfigent(struct netconfig *netp);
1767c478bd9Sstevel@tonic-gatevoid *setnetpath(void);
1777c478bd9Sstevel@tonic-gateint endnetpath(void *vdata);
1787c478bd9Sstevel@tonic-gatestruct netconfig *getnetpath(void *vdata);
1797c478bd9Sstevel@tonic-gatechar *nc_sperror(void);
1807c478bd9Sstevel@tonic-gatevoid nc_perror(const char *string);
1817c478bd9Sstevel@tonic-gate
1827c478bd9Sstevel@tonic-gate/*
1837c478bd9Sstevel@tonic-gate * usr/src/lib/libnsl/nis/cache routines
1847c478bd9Sstevel@tonic-gate */
1857c478bd9Sstevel@tonic-gate
1867c478bd9Sstevel@tonic-gate/* cache.cc */
1877c478bd9Sstevel@tonic-gate
1887c478bd9Sstevel@tonic-gate/* cache_api.cc */
1897c478bd9Sstevel@tonic-gate#ifdef notdef
1907c478bd9Sstevel@tonic-gate/* XXX lacking appropriate public header files */
1917c478bd9Sstevel@tonic-gatenis_error __nis_CacheInit(NisCache **cache);
1927c478bd9Sstevel@tonic-gate#endif
1937c478bd9Sstevel@tonic-gatenis_error __nis_CacheBind(char *dname, directory_obj *dobj);
1947c478bd9Sstevel@tonic-gatebool_t __nis_CacheRemoveEntry(directory_obj *dobj);
1957c478bd9Sstevel@tonic-gatenis_error __nis_CacheSearch(char *dname, directory_obj *dobj);
1967c478bd9Sstevel@tonic-gatevoid __nis_CacheRestart(void);
1977c478bd9Sstevel@tonic-gatevoid __nis_CachePrint(void);
1987c478bd9Sstevel@tonic-gatebool_t __nis_CacheAddEntry(fd_result *, directory_obj *);
1997c478bd9Sstevel@tonic-gateuint32_t __nis_CacheLocalLoadPref(void);
2007c478bd9Sstevel@tonic-gatenis_error __nis_CacheLocalInit(uint32_t *exp_time);
2017c478bd9Sstevel@tonic-gatenis_error __nis_CacheMgrInit(void);
2027c478bd9Sstevel@tonic-gatevoid __nis_CacheMgrCleanup(void);
2037c478bd9Sstevel@tonic-gatenis_error __nis_CacheMgrBindReplica(char *dname);
2047c478bd9Sstevel@tonic-gatenis_error __nis_CacheMgrBindMaster(char *dname);
2057c478bd9Sstevel@tonic-gatenis_error __nis_CacheMgrBindServer(nis_server *srv, int nsrv);
2067c478bd9Sstevel@tonic-gateint __nis_CacheMgrRefreshBinding(nis_bound_directory *binding);
2077c478bd9Sstevel@tonic-gateint __nis_CacheMgrRefreshAddress(nis_bound_endpoint *bep);
2087c478bd9Sstevel@tonic-gateint __nis_CacheMgrRefreshCallback(nis_bound_endpoint *bep);
2097c478bd9Sstevel@tonic-gateint __nis_CacheMgrUpdateUaddr(char *uaddr);
2107c478bd9Sstevel@tonic-gatevoid __nis_CacheMgrMarkUp(void);
2117c478bd9Sstevel@tonic-gateuint32_t __nis_CacheMgrTimers(void);
2127c478bd9Sstevel@tonic-gateuint32_t __nis_CacheMgrRefreshCache(void);
2137c478bd9Sstevel@tonic-gateuint32_t __nis_serverRefreshCache(void);
2147c478bd9Sstevel@tonic-gate
2157c478bd9Sstevel@tonic-gate/* client_cache.cc */
2167c478bd9Sstevel@tonic-gate
2177c478bd9Sstevel@tonic-gate/* cold_start.cc */
2187c478bd9Sstevel@tonic-gatebool_t writeColdStartFile(directory_obj *dobj);
2197c478bd9Sstevel@tonic-gate
2207c478bd9Sstevel@tonic-gate/* local_cache.cc */
2217c478bd9Sstevel@tonic-gate
2227c478bd9Sstevel@tonic-gate/* mapped_cache.cc */
2237c478bd9Sstevel@tonic-gate
2247c478bd9Sstevel@tonic-gate/* mgr_cache.cc */
2257c478bd9Sstevel@tonic-gate
2267c478bd9Sstevel@tonic-gate/* nis_cache_clnt.cc */
2277c478bd9Sstevel@tonic-gate
2287c478bd9Sstevel@tonic-gate/* nis_cache_xdr.cc */
2297c478bd9Sstevel@tonic-gate
2307c478bd9Sstevel@tonic-gate/*
2317c478bd9Sstevel@tonic-gate * usr/src/lib/libnsl/nis/gen routines
2327c478bd9Sstevel@tonic-gate */
2337c478bd9Sstevel@tonic-gate
2347c478bd9Sstevel@tonic-gate/* nis_callback.c */
2357c478bd9Sstevel@tonic-gateint __nis_destroy_callback(void);
2367c478bd9Sstevel@tonic-gatenis_server *__nis_init_callback(CLIENT *svc_clnt, int (*cbfunc)(),
2377c478bd9Sstevel@tonic-gate								void *userdata);
2387c478bd9Sstevel@tonic-gateint __nis_run_callback(netobj *srvid, rpcproc_t srvproc,
2397c478bd9Sstevel@tonic-gate				struct timeval *timeout, CLIENT *myserv);
2407c478bd9Sstevel@tonic-gate
2417c478bd9Sstevel@tonic-gate/* nis_cast.c */
2427c478bd9Sstevel@tonic-gateenum clnt_stat __nis_cast_proc(nis_bound_directory *binding, int base,
2437c478bd9Sstevel@tonic-gate				int nbep, rpcproc_t procnum,
2447c478bd9Sstevel@tonic-gate				xdrproc_t xdr_inproc, void *in,
2457c478bd9Sstevel@tonic-gate				xdrproc_t xdr_outproc, void *out,
2467c478bd9Sstevel@tonic-gate				int *fastest, int mytimeout);
2477c478bd9Sstevel@tonic-gate
2487c478bd9Sstevel@tonic-gate/* nis_cback_xdr.c */
2497c478bd9Sstevel@tonic-gatebool_t xdr_obj_p(XDR *xdrs, obj_p *objp);
2507c478bd9Sstevel@tonic-gatebool_t xdr_cback_data(XDR *xdrs, cback_data *objp);
2517c478bd9Sstevel@tonic-gate
2527c478bd9Sstevel@tonic-gate/* nis_clnt.c */
2537c478bd9Sstevel@tonic-gate
2547c478bd9Sstevel@tonic-gate/* nis_groups.c */
2557c478bd9Sstevel@tonic-gatetypedef nis_result *(*nis_lookup_func)(nis_name, u_int);
2567c478bd9Sstevel@tonic-gateint __nis_group_cache_stats(int *grpcachecall, int *grpcachehits,
2577c478bd9Sstevel@tonic-gate					int *grpcachemisses);
2587c478bd9Sstevel@tonic-gatebool_t nis_ismember(nis_name princp, nis_name group);
2597c478bd9Sstevel@tonic-gatebool_t __do_ismember(nis_name princp, nis_object *obj, nis_lookup_func lookup);
2607c478bd9Sstevel@tonic-gatevoid nis_print_group_entry(nis_name group);
2617c478bd9Sstevel@tonic-gatevoid nis_flushgroups(void);
2627c478bd9Sstevel@tonic-gatevoid __nis_flush_group_exp_name(nis_name groupname);
2637c478bd9Sstevel@tonic-gatenis_name __nis_map_group_r(const nis_name name, char *buf, size_t bufsize);
2647c478bd9Sstevel@tonic-gatenis_error nis_addmember(nis_name princp, nis_name group);
2657c478bd9Sstevel@tonic-gatenis_error nis_removemember(nis_name princp, nis_name group);
2667c478bd9Sstevel@tonic-gatenis_error nis_verifygroup(nis_name group);
2677c478bd9Sstevel@tonic-gatenis_error __nis_creategroup_obj(nis_name name, uint_t flags, nis_object *obj);
2687c478bd9Sstevel@tonic-gatenis_error nis_creategroup(nis_name name, uint_t flags);
2697c478bd9Sstevel@tonic-gatenis_error nis_destroygroup(nis_name name);
2707c478bd9Sstevel@tonic-gate
2717c478bd9Sstevel@tonic-gate/* nis_hash.c */
2727c478bd9Sstevel@tonic-gateint nis_in_table(nis_name name, NIS_HASH_TABLE *table, int *key);
2737c478bd9Sstevel@tonic-gateint nis_insert_item(NIS_HASH_ITEM *item, NIS_HASH_TABLE *table);
2747c478bd9Sstevel@tonic-gateNIS_HASH_ITEM *nis_find_item(nis_name name, NIS_HASH_TABLE *table);
2757c478bd9Sstevel@tonic-gateNIS_HASH_ITEM *nis_pop_item(NIS_HASH_TABLE *table);
2767c478bd9Sstevel@tonic-gateNIS_HASH_ITEM *nis_remove_item(nis_name name, NIS_HASH_TABLE *table);
2777c478bd9Sstevel@tonic-gatevoid nis_insert_name(nis_name name, NIS_HASH_TABLE *table);
2787c478bd9Sstevel@tonic-gatevoid nis_remove_name(nis_name name, NIS_HASH_TABLE *table);
2797c478bd9Sstevel@tonic-gate
2807c478bd9Sstevel@tonic-gate/* nis_lookup.c */
2817c478bd9Sstevel@tonic-gatenis_result *__nis_remote_lookup(ib_request *req, u_int flags, int list_op,
2827c478bd9Sstevel@tonic-gate				void *cbdata, int (*cback)());
2837c478bd9Sstevel@tonic-gatenis_result *__nis_core_lookup(ib_request *req, u_int flags, int list_op,
2847c478bd9Sstevel@tonic-gate				void *cbdata, int (*cback)());
2857c478bd9Sstevel@tonic-gatefd_result *__nis_finddirectory_remote(nis_bound_directory **binding,
2867c478bd9Sstevel@tonic-gate				char *dname);
2877c478bd9Sstevel@tonic-gatefd_result *__nis_finddirectory(nis_bound_directory **binding, char *dname);
2887c478bd9Sstevel@tonic-gatefd_result *nis_finddirectory(directory_obj *dobj, nis_name name);
2897c478bd9Sstevel@tonic-gate
2907c478bd9Sstevel@tonic-gate/* nis_misc.c */
2917c478bd9Sstevel@tonic-gatevoid __nis_pingproc(nis_server *srv, nis_name name, uint32_t mtime);
2927c478bd9Sstevel@tonic-gatevoid nis_ping(nis_name name, uint32_t mtime, nis_object *obj);
2937c478bd9Sstevel@tonic-gatelog_result *nis_dumplog(nis_server *host, nis_name name, uint32_t dtime);
2947c478bd9Sstevel@tonic-gatelog_result *nis_dump(nis_server *host, nis_name name, int (*cback)());
2957c478bd9Sstevel@tonic-gatevoid nis_free_binding(nis_bound_directory *binding);
2967c478bd9Sstevel@tonic-gatevoid __nis_path_free(char **names, int len);
2977c478bd9Sstevel@tonic-gatenis_error __nis_path(char *from, char *to, int *path_length, char ***namesp);
2987c478bd9Sstevel@tonic-gateint __nis_host_is_server(nis_server *, int);
2997c478bd9Sstevel@tonic-gatevoid __nis_print_result(nis_result *);
3007c478bd9Sstevel@tonic-gatestruct netconfig *__nis_get_netconfig(endpoint *);
3017c478bd9Sstevel@tonic-gate
3027c478bd9Sstevel@tonic-gate/* nis_misc_proc.c */
3037c478bd9Sstevel@tonic-gatevoid __nis_auth2princ(char *name, int flavor, caddr_t auth, bool_t refresh,
3047c478bd9Sstevel@tonic-gate			int verbose);
3057c478bd9Sstevel@tonic-gatebool_t __nis_ck_perms(u_int right, u_int mask, nis_object *obj,
3067c478bd9Sstevel@tonic-gate				nis_name pr, int level);
3077c478bd9Sstevel@tonic-gatebool_t __nis_ismaster(char *host, char *domain);
3087c478bd9Sstevel@tonic-gatebool_t __nis_isadmin(char *princ, char *table, char *domain);
3097c478bd9Sstevel@tonic-gatenis_server * __nis_host2nis_server(char *host, bool_t addpubkey, int *errcode);
3107c478bd9Sstevel@tonic-gate
3117c478bd9Sstevel@tonic-gate/* nis_names.c */
3127c478bd9Sstevel@tonic-gateint __nis_parse_path(char *path, nis_name *list, int max);
3137c478bd9Sstevel@tonic-gatenis_name *nis_getnames(nis_name name);
3147c478bd9Sstevel@tonic-gatevoid nis_freenames(nis_name *namelist);
3157c478bd9Sstevel@tonic-gate
3167c478bd9Sstevel@tonic-gate/* nis_perror.c */
3177c478bd9Sstevel@tonic-gatechar *nis_sperrno(nis_error stat);
3187c478bd9Sstevel@tonic-gatevoid nis_perror(nis_error stat, char *str);
3197c478bd9Sstevel@tonic-gatechar *nis_sperror_r(nis_error stat, char *str, char buf[], int len);
3207c478bd9Sstevel@tonic-gatechar *nis_sperror(nis_error stat, char *str);
3217c478bd9Sstevel@tonic-gatevoid nis_lerror(nis_error stat, char *str);
3227c478bd9Sstevel@tonic-gate
3237c478bd9Sstevel@tonic-gate/* nis_rpc.c */
3247c478bd9Sstevel@tonic-gatetypedef struct {
3257c478bd9Sstevel@tonic-gate	nis_server *srv;
3267c478bd9Sstevel@tonic-gate	int nsrv;
3277c478bd9Sstevel@tonic-gate	char *name;
3287c478bd9Sstevel@tonic-gate	int parent_first;
3297c478bd9Sstevel@tonic-gate	u_int flags;
3307c478bd9Sstevel@tonic-gate	struct timeval timeout;
3317c478bd9Sstevel@tonic-gate	nis_error niserror;
3327c478bd9Sstevel@tonic-gate	uint32_t aticks;
3337c478bd9Sstevel@tonic-gate	int state;
3347c478bd9Sstevel@tonic-gate	nis_bound_directory *binding;
3357c478bd9Sstevel@tonic-gate	int base;
3367c478bd9Sstevel@tonic-gate	int end;
3377c478bd9Sstevel@tonic-gate	int count;
3387c478bd9Sstevel@tonic-gate	int start;
3397c478bd9Sstevel@tonic-gate	int cur;
3407c478bd9Sstevel@tonic-gate	int bound_to;
3417c478bd9Sstevel@tonic-gate	int refresh_count;
3427c478bd9Sstevel@tonic-gate} nis_call_state;
3437c478bd9Sstevel@tonic-gate
3447c478bd9Sstevel@tonic-gatevoid __nis_reset_state(void);
3457c478bd9Sstevel@tonic-gatevoid __nis_bad_auth_server(CLIENT *c);
3467c478bd9Sstevel@tonic-gatevoid __nis_release_server(nis_call_state *state, CLIENT *c,
3477c478bd9Sstevel@tonic-gate					enum clnt_stat status);
3487c478bd9Sstevel@tonic-gateCLIENT *__nis_get_server(nis_call_state *state);
3497c478bd9Sstevel@tonic-gate
3507c478bd9Sstevel@tonic-gate/* nis_subr.c */
3517c478bd9Sstevel@tonic-gateint __start_clock(int clk);
3527c478bd9Sstevel@tonic-gateunsigned int __stop_clock(int clk);
3537c478bd9Sstevel@tonic-gatename_pos nis_dir_cmp(nis_name n1, nis_name n2);
3547c478bd9Sstevel@tonic-gatenis_name nis_local_group(void);
3557c478bd9Sstevel@tonic-gatenis_name nis_domain_of(char *s);
3567c478bd9Sstevel@tonic-gatenis_name nis_leaf_of_r(const nis_name  s, char *buf, size_t bufsize);
3577c478bd9Sstevel@tonic-gatenis_name nis_leaf_of(char *s);
3587c478bd9Sstevel@tonic-gatenis_name nis_name_of(char *s);
3597c478bd9Sstevel@tonic-gatenis_name nis_local_directory(void);
3607c478bd9Sstevel@tonic-gateint __nis_principal(char *principal_name, uid_t uid, char *directory);
3617c478bd9Sstevel@tonic-gatenis_name nis_local_principal(void);
3627c478bd9Sstevel@tonic-gatenis_name nis_local_host(void);
3637c478bd9Sstevel@tonic-gatevoid nis_destroy_object(nis_object *obj);
3647c478bd9Sstevel@tonic-gatenis_object *nis_clone_object(nis_object *obj, nis_object *dest);
3657c478bd9Sstevel@tonic-gatechar **__break_name(nis_name name, int *levels);
3667c478bd9Sstevel@tonic-gateint __name_distance(char **targ, char **test);
3677c478bd9Sstevel@tonic-gatenis_result *nis_make_error(nis_error err, uint32_t aticks, uint32_t cticks,
3687c478bd9Sstevel@tonic-gate				uint32_t dticks, uint32_t zticks);
3697c478bd9Sstevel@tonic-gatenis_attr *__cvt2attr(int *na, char **attrs);
3707c478bd9Sstevel@tonic-gatevoid nis_free_request(ib_request *req);
3717c478bd9Sstevel@tonic-gatenis_error nis_get_request(nis_name name, nis_object *obj, netobj *cookie,
3727c478bd9Sstevel@tonic-gate				ib_request *reqreq);
3737c478bd9Sstevel@tonic-gatenis_object *nis_read_obj(char *f);
3747c478bd9Sstevel@tonic-gateint nis_write_obj(char *f, nis_object *o);
3757c478bd9Sstevel@tonic-gateCLIENT *nis_make_rpchandle(nis_server *srv, int cback, rpcprog_t prog,
3767c478bd9Sstevel@tonic-gate			rpcvers_t ver, u_int flags, int inbuf, int outbuf);
3777c478bd9Sstevel@tonic-gatevoid *nis_get_static_storage(struct nis_sdata *bs, u_int el, u_int nel);
3787c478bd9Sstevel@tonic-gatechar *nis_old_data(char *s);
3797c478bd9Sstevel@tonic-gatechar *nis_data(char *s);
3807c478bd9Sstevel@tonic-gatenis_name __nis_local_root(void);
3817c478bd9Sstevel@tonic-gate
3827c478bd9Sstevel@tonic-gate/* nis_tags.c */
3837c478bd9Sstevel@tonic-gatevoid nis_freeservlist(nis_server **servers);
3847c478bd9Sstevel@tonic-gatenis_server **nis_getservlist(nis_name name);
3857c478bd9Sstevel@tonic-gatenis_error nis_stats(nis_server *srv, nis_tag *tags, int ntags,
3867c478bd9Sstevel@tonic-gate							nis_tag **result);
3877c478bd9Sstevel@tonic-gatenis_error nis_servstate(nis_server *srv, nis_tag *tags, int ntags,
3887c478bd9Sstevel@tonic-gate							nis_tag **result);
3897c478bd9Sstevel@tonic-gatevoid nis_freetags(nis_tag *tags, int ntags);
3907c478bd9Sstevel@tonic-gate
3917c478bd9Sstevel@tonic-gate/* nis_xdr.c */
3927c478bd9Sstevel@tonic-gatebool_t xdr_nis_attr(XDR *xdrs, nis_attr *objp);
3937c478bd9Sstevel@tonic-gatebool_t xdr_nis_name(XDR *xdrs, nis_name *objp);
3947c478bd9Sstevel@tonic-gatebool_t xdr_endpoint(XDR *xdrs, endpoint *objp);
3957c478bd9Sstevel@tonic-gatebool_t xdr_nis_server(XDR *xdrs, nis_server *objp);
3967c478bd9Sstevel@tonic-gatebool_t xdr_directory_obj(XDR *xdrs, directory_obj *objp);
3977c478bd9Sstevel@tonic-gatebool_t xdr_entry_obj(XDR *xdrs, entry_obj *objp);
3987c478bd9Sstevel@tonic-gatebool_t xdr_table_obj(XDR *xdrs, table_obj *objp);
3997c478bd9Sstevel@tonic-gatebool_t xdr_objdata(XDR *xdrs, objdata *objp);
4007c478bd9Sstevel@tonic-gatebool_t xdr_nis_oid(XDR *xdrs, nis_oid *objp);
4017c478bd9Sstevel@tonic-gatebool_t xdr_nis_object(XDR *xdrs, nis_object *objp);
4027c478bd9Sstevel@tonic-gatebool_t xdr_nis_object(XDR *xdrs, nis_object *objp);
4037c478bd9Sstevel@tonic-gatebool_t xdr_nis_error(XDR *xdrs, nis_error *objp);
4047c478bd9Sstevel@tonic-gatebool_t xdr_nis_result(XDR *xdrs, nis_result *objp);
4057c478bd9Sstevel@tonic-gatebool_t xdr_ns_request(XDR *xdrs, ns_request *objp);
4067c478bd9Sstevel@tonic-gatebool_t xdr_ib_request(XDR *xdrs, ib_request *objp);
4077c478bd9Sstevel@tonic-gatebool_t xdr_ping_args(XDR *xdrs, ping_args *objp);
4087c478bd9Sstevel@tonic-gatebool_t xdr_log_entry_t(XDR *xdrs, log_entry_t *objp);
4097c478bd9Sstevel@tonic-gatebool_t xdr_log_entry(XDR *xdrs, log_entry *objp);
4107c478bd9Sstevel@tonic-gatebool_t xdr_log_result(XDR *xdrs, log_result *objp);
4117c478bd9Sstevel@tonic-gatebool_t xdr_cp_result(XDR *xdrs, cp_result *objp);
4127c478bd9Sstevel@tonic-gatebool_t xdr_nis_tag(XDR *xdrs, nis_tag *objp);
4137c478bd9Sstevel@tonic-gatebool_t xdr_nis_taglist(XDR *xdrs, nis_taglist *objp);
4147c478bd9Sstevel@tonic-gatebool_t xdr_dump_args(XDR *xdrs, dump_args *objp);
4157c478bd9Sstevel@tonic-gatebool_t xdr_fd_args(XDR *xdrs, fd_args *objp);
4167c478bd9Sstevel@tonic-gatebool_t xdr_fd_result(XDR *xdrs, fd_result *objp);
4177c478bd9Sstevel@tonic-gatebool_t xdr_nis_bound_endpoint(XDR *xdrs, nis_bound_endpoint *objp);
4187c478bd9Sstevel@tonic-gatebool_t xdr_nis_bound_directory(XDR *xdrs, nis_bound_directory *objp);
4197c478bd9Sstevel@tonic-gatebool_t xdr_nis_active_endpoint(XDR *xdrs, nis_active_endpoint *objp);
4207c478bd9Sstevel@tonic-gate
4217c478bd9Sstevel@tonic-gate/* nislib.c */
4227c478bd9Sstevel@tonic-gatevoid nis_freeresult(nis_result *res);
4237c478bd9Sstevel@tonic-gatevoid __nis_freelogresult(log_result *lres);
4247c478bd9Sstevel@tonic-gatenis_error nis_bind_dir(char *dname, int parent_first,
4257c478bd9Sstevel@tonic-gate				nis_bound_directory **binding, u_int flags);
4267c478bd9Sstevel@tonic-gatenis_result *nis_lookup(nis_name name, uint_t flags);
4277c478bd9Sstevel@tonic-gatenis_result *nis_list(nis_name name, uint_t flags, int (*cback)(),
4287c478bd9Sstevel@tonic-gate				void *cbdata);
4297c478bd9Sstevel@tonic-gatenis_result *nis_add(nis_name name, nis_object *obj);
4307c478bd9Sstevel@tonic-gatenis_result *nis_remove(nis_name name, nis_object *obj);
4317c478bd9Sstevel@tonic-gatenis_result *nis_modify(nis_name name, nis_object *obj);
4327c478bd9Sstevel@tonic-gatenis_result *nis_add_entry(nis_name name, nis_object *obj, uint_t flags);
4337c478bd9Sstevel@tonic-gatenis_result *nis_remove_entry(nis_name name, nis_object *obj, uint_t flags);
4347c478bd9Sstevel@tonic-gatenis_result *nis_modify_entry(nis_name name, nis_object *obj, uint_t flags);
4357c478bd9Sstevel@tonic-gatenis_result *nis_first_entry(nis_name table);
4367c478bd9Sstevel@tonic-gatenis_result *nis_next_entry(nis_name table, netobj *cookie);
4377c478bd9Sstevel@tonic-gatenis_result *nis_checkpoint(nis_name name);
4387c478bd9Sstevel@tonic-gatenis_error nis_mkdir(nis_name name, nis_server *srv);
4397c478bd9Sstevel@tonic-gatenis_error nis_rmdir(nis_name name, nis_server *srv);
4407c478bd9Sstevel@tonic-gatenis_error __nis_send_msg(nis_server *srv, int proc, xdrproc_t out, char *msg);
4417c478bd9Sstevel@tonic-gatenis_result *__nis_list_localcb(nis_name name, u_int flags,
4427c478bd9Sstevel@tonic-gate				int (*cback)(), void *cbdata);
4437c478bd9Sstevel@tonic-gate
4447c478bd9Sstevel@tonic-gate/* npd_lib.c */
4457c478bd9Sstevel@tonic-gatebool_t __npd_ecb_crypt(uint32_t *val1, uint32_t *val2, des_block *buf,
4467c478bd9Sstevel@tonic-gate			uint_t bufsize, uint_t mode, des_block *deskey);
4477c478bd9Sstevel@tonic-gatebool_t __npd_cbc_crypt(uint32_t *val, char *str, uint_t strsize,
4487c478bd9Sstevel@tonic-gate			npd_newpass *buf, uint_t bufsize, uint_t mode,
4497c478bd9Sstevel@tonic-gate			des_block *deskey);
4507c478bd9Sstevel@tonic-gate
4517c478bd9Sstevel@tonic-gate/* print_obj.c */
4527c478bd9Sstevel@tonic-gatevoid nis_print_rights(u_int r);
4537c478bd9Sstevel@tonic-gatevoid nis_print_directory(directory_obj *r);
4547c478bd9Sstevel@tonic-gatevoid nis_print_group(group_obj *g);
4557c478bd9Sstevel@tonic-gatevoid nis_print_table(table_obj *t);
4567c478bd9Sstevel@tonic-gatevoid nis_print_link(link_obj *l);
4577c478bd9Sstevel@tonic-gatevoid nis_print_entry(entry_obj *edata);
4587c478bd9Sstevel@tonic-gatevoid nis_print_object(nis_object *o);
4597c478bd9Sstevel@tonic-gate
4607c478bd9Sstevel@tonic-gate/* thr_misc.c */
4617c478bd9Sstevel@tonic-gate
4627c478bd9Sstevel@tonic-gate/*
4637c478bd9Sstevel@tonic-gate * usr/src/lib/libnsl/nsl routines
4647c478bd9Sstevel@tonic-gate */
4657c478bd9Sstevel@tonic-gate
4667c478bd9Sstevel@tonic-gate/* _conn_util.c */
4677c478bd9Sstevel@tonic-gate
4687c478bd9Sstevel@tonic-gate/* _data2.c */
4697c478bd9Sstevel@tonic-gate
4707c478bd9Sstevel@tonic-gate/* _errlst.c */
4717c478bd9Sstevel@tonic-gateint *__t_errno(void);
4727c478bd9Sstevel@tonic-gate
4737c478bd9Sstevel@tonic-gate/* _utility.c */
4747c478bd9Sstevel@tonic-gate
4757c478bd9Sstevel@tonic-gate/* t_accept.c */
4767c478bd9Sstevel@tonic-gateint t_accept(int, int, struct t_call *);
4777c478bd9Sstevel@tonic-gate
4787c478bd9Sstevel@tonic-gate/* t_alloc.c */
4797c478bd9Sstevel@tonic-gatechar *t_alloc(int, int, int);
4807c478bd9Sstevel@tonic-gate
4817c478bd9Sstevel@tonic-gate/* t_bind.c */
4827c478bd9Sstevel@tonic-gateint t_bind(int, struct t_bind *, struct t_bind *);
4837c478bd9Sstevel@tonic-gate
4847c478bd9Sstevel@tonic-gate/* t_close.c */
4857c478bd9Sstevel@tonic-gateint t_close(int);
4867c478bd9Sstevel@tonic-gate
4877c478bd9Sstevel@tonic-gate/* t_connect.c */
4887c478bd9Sstevel@tonic-gateint t_connect(int, struct t_call *, struct t_call *);
4897c478bd9Sstevel@tonic-gate
4907c478bd9Sstevel@tonic-gate/* t_error.c */
4917c478bd9Sstevel@tonic-gatevoid t_error(const char *);
4927c478bd9Sstevel@tonic-gate
4937c478bd9Sstevel@tonic-gate/* t_free.c */
4947c478bd9Sstevel@tonic-gateint t_free(char *, int);
4957c478bd9Sstevel@tonic-gate
4967c478bd9Sstevel@tonic-gate/* t_getinfo.c */
4977c478bd9Sstevel@tonic-gateint t_getinfo(int, struct t_info *);
4987c478bd9Sstevel@tonic-gate
4997c478bd9Sstevel@tonic-gate/* t_getname.c */
5007c478bd9Sstevel@tonic-gateint t_getname(int, struct netbuf *, int);
5017c478bd9Sstevel@tonic-gate
5027c478bd9Sstevel@tonic-gate/* t_getstate.c */
5037c478bd9Sstevel@tonic-gateint t_getstate(int);
5047c478bd9Sstevel@tonic-gate
5057c478bd9Sstevel@tonic-gate/* t_listen.c */
5067c478bd9Sstevel@tonic-gateint t_listen(int, struct t_call *);
5077c478bd9Sstevel@tonic-gate
5087c478bd9Sstevel@tonic-gate/* t_look.c */
5097c478bd9Sstevel@tonic-gateint t_look(int);
5107c478bd9Sstevel@tonic-gate
5117c478bd9Sstevel@tonic-gate/* t_open.c */
5127c478bd9Sstevel@tonic-gateint t_open(const char *, int, struct t_info *);
5137c478bd9Sstevel@tonic-gate
5147c478bd9Sstevel@tonic-gate/* t_optmgmt.c */
5157c478bd9Sstevel@tonic-gateint t_optmgmt(int, struct t_optmgmt *, struct t_optmgmt *);
5167c478bd9Sstevel@tonic-gate
5177c478bd9Sstevel@tonic-gate/* t_rcv.c */
5187c478bd9Sstevel@tonic-gateint t_rcv(int, char *, unsigned, int *);
5197c478bd9Sstevel@tonic-gate
5207c478bd9Sstevel@tonic-gate/* t_rcvconnect.c */
5217c478bd9Sstevel@tonic-gateint t_rcvconnect(int, struct t_call *);
5227c478bd9Sstevel@tonic-gate
5237c478bd9Sstevel@tonic-gate/* t_rcvdis.c */
5247c478bd9Sstevel@tonic-gateint t_rcvdis(int, struct t_discon *);
5257c478bd9Sstevel@tonic-gate
5267c478bd9Sstevel@tonic-gate/* t_rcvrel.c */
5277c478bd9Sstevel@tonic-gateint t_rcvrel(int);
5287c478bd9Sstevel@tonic-gate
5297c478bd9Sstevel@tonic-gate/* t_rcvudata.c */
5307c478bd9Sstevel@tonic-gateint t_rcvudata(int, struct t_unitdata *, int *);
5317c478bd9Sstevel@tonic-gate
5327c478bd9Sstevel@tonic-gate/* t_rcvuderr.c */
5337c478bd9Sstevel@tonic-gateint t_rcvuderr(int, struct t_uderr *);
5347c478bd9Sstevel@tonic-gate
5357c478bd9Sstevel@tonic-gate/* t_snd.c */
5367c478bd9Sstevel@tonic-gateint t_snd(int, char *, unsigned, int);
5377c478bd9Sstevel@tonic-gate
5387c478bd9Sstevel@tonic-gate/* t_snddis */
5397c478bd9Sstevel@tonic-gateint t_snddis(int, struct t_call *);
5407c478bd9Sstevel@tonic-gate
5417c478bd9Sstevel@tonic-gate/* t_sndrel.c */
5427c478bd9Sstevel@tonic-gateint t_sndrel(int);
5437c478bd9Sstevel@tonic-gate
5447c478bd9Sstevel@tonic-gate/* t_sndudata.c */
5457c478bd9Sstevel@tonic-gateint t_sndudata(int, struct t_unitdata *);
5467c478bd9Sstevel@tonic-gate
5477c478bd9Sstevel@tonic-gate/* t_strerror.c */
5487c478bd9Sstevel@tonic-gatechar *_t_strerror(int);
5497c478bd9Sstevel@tonic-gate
5507c478bd9Sstevel@tonic-gate/* t_sync.c */
5517c478bd9Sstevel@tonic-gateint t_sync(int);
5527c478bd9Sstevel@tonic-gate
5537c478bd9Sstevel@tonic-gate/* t_unbind.c */
5547c478bd9Sstevel@tonic-gateint t_unbind(int);
5557c478bd9Sstevel@tonic-gate
5567c478bd9Sstevel@tonic-gate/*
5577c478bd9Sstevel@tonic-gate * struct t_iovec is defined in <xti.h>. But <xti.h> cannot be included
5587c478bd9Sstevel@tonic-gate * because inclusion of <xti.h> and <tiuser.h> are mututally exclusive
5597c478bd9Sstevel@tonic-gate * and <tiuser.h> is exposed by the inclusion of <rpc/rpc.h>. Needs to
5607c478bd9Sstevel@tonic-gate * be seen how to build llib-lnsl.ln from multiple source files to avoid
5617c478bd9Sstevel@tonic-gate * this problem.
5627c478bd9Sstevel@tonic-gate */
5637c478bd9Sstevel@tonic-gatestruct t_iovec {
5647c478bd9Sstevel@tonic-gate	void	*iov_base;
5657c478bd9Sstevel@tonic-gate	size_t	iov_len;
5667c478bd9Sstevel@tonic-gate};
5677c478bd9Sstevel@tonic-gate
5687c478bd9Sstevel@tonic-gate/* t_sndv.c */
5697c478bd9Sstevel@tonic-gateint t_sndv(int, const struct t_iovec *,  unsigned int, int);
5707c478bd9Sstevel@tonic-gate
5717c478bd9Sstevel@tonic-gate/* t_sndvudata.c */
5727c478bd9Sstevel@tonic-gateint t_sndvudata(int, struct t_unitdata *, struct t_iovec *, unsigned int);
5737c478bd9Sstevel@tonic-gate
5747c478bd9Sstevel@tonic-gate/* t_sndreldata.c */
5757c478bd9Sstevel@tonic-gateint t_sndreldata(int, struct t_discon *);
5767c478bd9Sstevel@tonic-gate
5777c478bd9Sstevel@tonic-gate/* t_rcvv.c */
5787c478bd9Sstevel@tonic-gateint t_rcvv(int, struct t_iovec *, unsigned int, int *);
5797c478bd9Sstevel@tonic-gate
5807c478bd9Sstevel@tonic-gate/* t_rcvvudata.c */
5817c478bd9Sstevel@tonic-gateint t_rcvvudata(int, struct t_unitdata *, struct t_iovec *,
5827c478bd9Sstevel@tonic-gate        unsigned int, int *);
5837c478bd9Sstevel@tonic-gate
5847c478bd9Sstevel@tonic-gate/* t_rcvreldata.c */
5857c478bd9Sstevel@tonic-gateextern int t_rcvreldata(int, struct t_discon *);
5867c478bd9Sstevel@tonic-gate
5877c478bd9Sstevel@tonic-gate/* t_sysconf.c */
5887c478bd9Sstevel@tonic-gateint t_sysconf(int);
5897c478bd9Sstevel@tonic-gate
5907c478bd9Sstevel@tonic-gate/* xti_wrappers.c */
5917c478bd9Sstevel@tonic-gateint _xti_accept(int, int, struct t_call *);
5927c478bd9Sstevel@tonic-gateint _xti_xns5_accept(int, int, struct t_call *);
5937c478bd9Sstevel@tonic-gatechar *_xti_alloc(int, int, int);
5947c478bd9Sstevel@tonic-gateint _xti_bind(int, struct t_bind *, struct t_bind *);
5957c478bd9Sstevel@tonic-gateint _xti_close(int);
5967c478bd9Sstevel@tonic-gateint _xti_connect(int, struct t_call *, struct t_call *);
5977c478bd9Sstevel@tonic-gateint _xti_error(char *);
5987c478bd9Sstevel@tonic-gateint _xti_free(char *, int);
5997c478bd9Sstevel@tonic-gateint _xti_getinfo(int, struct t_info *);
6007c478bd9Sstevel@tonic-gateint _xti_getprotaddr(int, struct t_bind *, struct t_bind *);
6017c478bd9Sstevel@tonic-gateint _xti_getstate(int);
6027c478bd9Sstevel@tonic-gateint _xti_listen(int, struct t_call *);
6037c478bd9Sstevel@tonic-gateint _xti_look(int);
6047c478bd9Sstevel@tonic-gateint _xti_open(char *, int, struct t_info *);
6057c478bd9Sstevel@tonic-gateint _xti_optmgmt(int, struct t_optmgmt *, struct t_optmgmt *);
6067c478bd9Sstevel@tonic-gateint _xti_rcv(int, char *, unsigned int, int *);
6077c478bd9Sstevel@tonic-gateint _xti_rcvconnect(int, struct t_call *);
6087c478bd9Sstevel@tonic-gateint _xti_rcvdis(int, struct t_discon *);
6097c478bd9Sstevel@tonic-gateint _xti_rcvrel(int);
6107c478bd9Sstevel@tonic-gateint _xti_rcvreldata(int, struct t_discon *);
6117c478bd9Sstevel@tonic-gateint _xti_rcvudata(int, struct t_unitdata *, int *);
6127c478bd9Sstevel@tonic-gateint _xti_rcvuderr(int, struct t_uderr *);
6137c478bd9Sstevel@tonic-gateint _xti_rcvv(int, struct t_iovec *, unsigned int, int *);
6147c478bd9Sstevel@tonic-gateint _xti_rcvvudata(int, struct t_unitdata *, struct t_iovec *,
6157c478bd9Sstevel@tonic-gate    unsigned int, int *);
6167c478bd9Sstevel@tonic-gateint _xti_snd(int, char *, unsigned int, int);
6177c478bd9Sstevel@tonic-gateint _xti_xns5_snd(int, char *, unsigned int, int);
6187c478bd9Sstevel@tonic-gateint _xti_snddis(int, struct t_call *);
6197c478bd9Sstevel@tonic-gateint _xti_sndrel(int);
6207c478bd9Sstevel@tonic-gateint _xti_sndreldata(int, struct t_discon *);
6217c478bd9Sstevel@tonic-gateint _xti_sndudata(int, struct t_unitdata *);
6227c478bd9Sstevel@tonic-gateint _xti_sndv(int, const struct t_iovec *, unsigned int, int);
6237c478bd9Sstevel@tonic-gateint _xti_sndvudata(int, struct t_unitdata *, struct t_iovec *, unsigned int);
6247c478bd9Sstevel@tonic-gatechar *_xti_strerror(int);
6257c478bd9Sstevel@tonic-gateint _xti_sync(int);
6267c478bd9Sstevel@tonic-gateint _xti_sysconf(int);
6277c478bd9Sstevel@tonic-gateint _xti_unbind(int);
6287c478bd9Sstevel@tonic-gate
6297c478bd9Sstevel@tonic-gate/*
6307c478bd9Sstevel@tonic-gate * usr/src/lib/libnsl/nss routines
6317c478bd9Sstevel@tonic-gate */
6327c478bd9Sstevel@tonic-gate
6337c478bd9Sstevel@tonic-gate/* gethostby_door.c */
6347c478bd9Sstevel@tonic-gate
6357c478bd9Sstevel@tonic-gate/* gethostbyname_r.c */
6367c478bd9Sstevel@tonic-gatestruct hostent *_uncached_gethostbyname_r(const char *nam,
6377c478bd9Sstevel@tonic-gate				struct hostent *result,
6387c478bd9Sstevel@tonic-gate				char *buffer, int buflen, int *h_errnop);
6397c478bd9Sstevel@tonic-gatestruct hostent *_uncached_gethostbyaddr_r(const char *addr, int length,
6407c478bd9Sstevel@tonic-gate				int type, struct hostent *result,
6417c478bd9Sstevel@tonic-gate				char *buffer, int buflen, int *h_errnop);
6427c478bd9Sstevel@tonic-gatestruct hostent *gethostbyname_r(const char *nam, struct hostent *result,
6437c478bd9Sstevel@tonic-gate				char *buffer, int buflen, int *h_errnop);
6447c478bd9Sstevel@tonic-gatestruct hostent *gethostbyaddr_r(const char *addr, int length, int type,
6457c478bd9Sstevel@tonic-gate				struct hostent *result,
6467c478bd9Sstevel@tonic-gate				char *buffer, int buflen, int *h_errnop);
6477c478bd9Sstevel@tonic-gate
6487c478bd9Sstevel@tonic-gate/* gethostent.c */
6497c478bd9Sstevel@tonic-gatestruct hostent *gethostbyname(const char *nam);
6507c478bd9Sstevel@tonic-gatestruct hostent *gethostbyaddr(const void *addr, socklen_t len, int type);
6517c478bd9Sstevel@tonic-gatestruct hostent *gethostent(void);
6527c478bd9Sstevel@tonic-gate
6537c478bd9Sstevel@tonic-gate/* gethostent_r.c */
6547c478bd9Sstevel@tonic-gateint sethostent(int stay);
6557c478bd9Sstevel@tonic-gateint endhostent(void);
6567c478bd9Sstevel@tonic-gatestruct hostent *gethostent_r(struct hostent *result, char *buffer, int buflen,
6577c478bd9Sstevel@tonic-gate				int *h_errnop);
6587c478bd9Sstevel@tonic-gate
6597c478bd9Sstevel@tonic-gate/* getipnodeby.c */
6607c478bd9Sstevel@tonic-gatevoid freehostent(struct hostent *hent);
6617c478bd9Sstevel@tonic-gatestruct hostent *getipnodebyaddr(const void *src, size_t len, int type,
6627c478bd9Sstevel@tonic-gate				int *error_num);
6637c478bd9Sstevel@tonic-gatestruct hostent *getipnodebyname(const char *name, int af, int flags,
6647c478bd9Sstevel@tonic-gate				int *error_num);
6657c478bd9Sstevel@tonic-gate
6667c478bd9Sstevel@tonic-gate/* getrpcent.c */
6677c478bd9Sstevel@tonic-gatestruct rpcent *getrpcbyname(const char *nam);
6687c478bd9Sstevel@tonic-gatestruct rpcent *getrpcbynumber(const int num);
6697c478bd9Sstevel@tonic-gatestruct rpcent *getrpcent(void);
6707c478bd9Sstevel@tonic-gate
6717c478bd9Sstevel@tonic-gate/* getrpcent_r.c */
6727c478bd9Sstevel@tonic-gatestruct rpcent *getrpcbyname_r(const char *name, struct rpcent *result,
6737c478bd9Sstevel@tonic-gate				char *buffer, int buflen);
6747c478bd9Sstevel@tonic-gatestruct rpcent *getrpcbynumber_r(const int number, struct rpcent *result,
6757c478bd9Sstevel@tonic-gate				char *buffer, int buflen);
6767c478bd9Sstevel@tonic-gatevoid setrpcent(const int stay);
6777c478bd9Sstevel@tonic-gatevoid endrpcent(void);
6787c478bd9Sstevel@tonic-gatestruct rpcent *getrpcent_r(struct rpcent *result, char *buffer, int buflen);
6797c478bd9Sstevel@tonic-gate
6807c478bd9Sstevel@tonic-gate/* inet_ntop.c */
6817c478bd9Sstevel@tonic-gateconst char *inet_ntop(int af, const void *src, char *dst, socklen_t size);
6827c478bd9Sstevel@tonic-gate
6837c478bd9Sstevel@tonic-gate/* inet_pton.c */
6847c478bd9Sstevel@tonic-gateint inet_pton(int af, const char *src, void *dst);
6857c478bd9Sstevel@tonic-gate
6867c478bd9Sstevel@tonic-gate/* netdir_inet.c */
6877c478bd9Sstevel@tonic-gateint _get_hostserv_inetnetdir_byname(struct netconfig *nconf,
6887c478bd9Sstevel@tonic-gate				struct nss_netdirbyname_in *args,
6897c478bd9Sstevel@tonic-gate				union nss_netdirbyname_out *res);
6907c478bd9Sstevel@tonic-gateint _get_hostserv_inetnetdir_byaddr(struct netconfig *nconf,
6917c478bd9Sstevel@tonic-gate				struct nss_netdirbyaddr_in *args,
6927c478bd9Sstevel@tonic-gate				union nss_netdirbyaddr_out *res);
6937c478bd9Sstevel@tonic-gateint __nss2herrno(nss_status_t nsstat);
6947c478bd9Sstevel@tonic-gatenss_status_t _herrno2nss(int h_errno);
6957c478bd9Sstevel@tonic-gatestruct hostent *_switch_gethostbyname_r(const char *name,
6967c478bd9Sstevel@tonic-gate				struct hostent *result,
6977c478bd9Sstevel@tonic-gate				char *buffer, int buflen, int *h_errnop);
6987c478bd9Sstevel@tonic-gatestruct hostent *_switch_gethostbyaddr_r(const char *addr, int len, int type,
6997c478bd9Sstevel@tonic-gate				struct hostent *result,
7007c478bd9Sstevel@tonic-gate				char *buffer, int buflen, int *h_errnop);
7017c478bd9Sstevel@tonic-gateint str2servent(const char *instr, int lenstr, void *ent,
7027c478bd9Sstevel@tonic-gate				char *buffer, int buflen);
7037c478bd9Sstevel@tonic-gatevoid *__inet_get_local_interfaces(void);
7047c478bd9Sstevel@tonic-gatevoid __inet_free_local_interfaces(void *p);
7057c478bd9Sstevel@tonic-gateint __inet_address_is_local(void *p, struct in_addr addr);
7067c478bd9Sstevel@tonic-gateint __inet_uaddr_is_local(void *p, struct netconfig *nc, char *uaddr);
7077c478bd9Sstevel@tonic-gateint __inet_address_count(void *p);
7087c478bd9Sstevel@tonic-gateulong_t __inet_get_addr(void *p, int n);
7097c478bd9Sstevel@tonic-gatechar *__inet_get_uaddr(void *p, struct netconfig *nc, int n);
7107c478bd9Sstevel@tonic-gatechar *__inet_get_networka(void *p, int n);
7117c478bd9Sstevel@tonic-gate
7127c478bd9Sstevel@tonic-gate/* netdir_inet_sundry.c */
7137c478bd9Sstevel@tonic-gate
7147c478bd9Sstevel@tonic-gate/*
7157c478bd9Sstevel@tonic-gate * usr/src/lib/libnsl/rpc routines
7167c478bd9Sstevel@tonic-gate */
7177c478bd9Sstevel@tonic-gate
7187c478bd9Sstevel@tonic-gate/* auth_des.c */
7197c478bd9Sstevel@tonic-gateAUTH *authdes_seccreate(const char *servername, uint_t win,
7207c478bd9Sstevel@tonic-gate			const char *timehost, const des_block *ckey);
7217c478bd9Sstevel@tonic-gate
7227c478bd9Sstevel@tonic-gate/* auth_none.c */
7237c478bd9Sstevel@tonic-gateAUTH *authnone_create(void);
7247c478bd9Sstevel@tonic-gate
7257c478bd9Sstevel@tonic-gate/* auth_sys.c */
7267c478bd9Sstevel@tonic-gateAUTH *authsys_create(const char *machname, uid_t uid, gid_t gid, int len,
7277c478bd9Sstevel@tonic-gate			const gid_t *aup_gids);
7287c478bd9Sstevel@tonic-gateAUTH *authsys_create_default(void);
7297c478bd9Sstevel@tonic-gate
7307c478bd9Sstevel@tonic-gate/* auth_time.c */
7317c478bd9Sstevel@tonic-gate
7327c478bd9Sstevel@tonic-gate/* authdes_prot.c */
7337c478bd9Sstevel@tonic-gatebool_t xdr_authdes_cred(XDR *xdrs, struct authdes_cred *cred);
7347c478bd9Sstevel@tonic-gatebool_t xdr_authdes_verf(XDR *xdrs, struct authdes_verf *verf);
7357c478bd9Sstevel@tonic-gate
7367c478bd9Sstevel@tonic-gate/* authsys_prot.c */
7377c478bd9Sstevel@tonic-gatebool_t xdr_authsys_parms(XDR *xdrs, struct authsys_parms *p);
7387c478bd9Sstevel@tonic-gatebool_t xdr_uid_t(XDR *xdrs, uid_t *ip);
7397c478bd9Sstevel@tonic-gatebool_t xdr_gid_t(XDR *xdrs, gid_t *ip);
7407c478bd9Sstevel@tonic-gate
7417c478bd9Sstevel@tonic-gate/* clnt_bcast.c */
7427c478bd9Sstevel@tonic-gateenum clnt_stat rpc_broadcast_exp(rpcprog_t prog, rpcvers_t vers, rpcproc_t proc,
7437c478bd9Sstevel@tonic-gate		xdrproc_t xargs, caddr_t argsp, xdrproc_t xresults,
7447c478bd9Sstevel@tonic-gate		caddr_t resultsp, resultproc_t eachresult, int inittime,
7457c478bd9Sstevel@tonic-gate		int waittime, const char *netclass);
7467c478bd9Sstevel@tonic-gateenum clnt_stat rpc_broadcast(rpcprog_t prog, rpcvers_t vers, rpcproc_t proc,
7477c478bd9Sstevel@tonic-gate		xdrproc_t xargs, caddr_t argsp, xdrproc_t xresults,
7487c478bd9Sstevel@tonic-gate		caddr_t resultsp, resultproc_t eachresult,
7497c478bd9Sstevel@tonic-gate		const char *netclass);
7507c478bd9Sstevel@tonic-gate
7517c478bd9Sstevel@tonic-gate/* clnt_dg.c */
7527c478bd9Sstevel@tonic-gateCLIENT *clnt_dg_create(int fd, struct netbuf *svcaddr, rpcprog_t program,
7537c478bd9Sstevel@tonic-gate		rpcvers_t version, uint_t sendsz, uint_t recvsz);
7547c478bd9Sstevel@tonic-gate
7557c478bd9Sstevel@tonic-gate/* clnt_door.c */
7567c478bd9Sstevel@tonic-gateCLIENT *clnt_door_create(rpcprog_t program, rpcvers_t version, uint_t sendsz);
7577c478bd9Sstevel@tonic-gate
7587c478bd9Sstevel@tonic-gate/* clnt_generic.c */
7597c478bd9Sstevel@tonic-gateCLIENT *clnt_create_vers(const char *hostname, rpcprog_t prog,
7607c478bd9Sstevel@tonic-gate		rpcvers_t *vers_out, rpcvers_t vers_low,
7617c478bd9Sstevel@tonic-gate		rpcvers_t vers_high, const char *nettype);
7627c478bd9Sstevel@tonic-gateCLIENT *clnt_create_vers_timed(const char *hostname, rpcprog_t prog,
7637c478bd9Sstevel@tonic-gate		rpcvers_t *vers_out, rpcvers_t vers_low,
7647c478bd9Sstevel@tonic-gate		rpcvers_t vers_high, const char *nettype,
7657c478bd9Sstevel@tonic-gate		const struct timeval *tp);
7667c478bd9Sstevel@tonic-gateCLIENT *clnt_create(const char *hostname, rpcprog_t prog, rpcvers_t vers,
7677c478bd9Sstevel@tonic-gate		const char *nettype);
7687c478bd9Sstevel@tonic-gateCLIENT *clnt_create_timed(const char *hostname, rpcprog_t prog, rpcvers_t vers,
7697c478bd9Sstevel@tonic-gate		const char *netclass, const struct timeval *tp);
7707c478bd9Sstevel@tonic-gateCLIENT *clnt_tp_create(const char *hostname, rpcprog_t prog, rpcvers_t vers,
7717c478bd9Sstevel@tonic-gate		const struct netconfig *nconf);
7727c478bd9Sstevel@tonic-gateCLIENT *clnt_tp_create_timed(const char *hostname, rpcprog_t prog,
7737c478bd9Sstevel@tonic-gate		rpcvers_t vers, const struct netconfig *nconf,
7747c478bd9Sstevel@tonic-gate		const struct timeval *tp);
7757c478bd9Sstevel@tonic-gateCLIENT *clnt_tli_create(int fd, const struct netconfig *nconf,
7767c478bd9Sstevel@tonic-gate		struct netbuf *svcaddr, rpcprog_t prog, rpcvers_t vers,
7777c478bd9Sstevel@tonic-gate		uint_t sendsz, uint_t recvsz);
7787c478bd9Sstevel@tonic-gate
7797c478bd9Sstevel@tonic-gate/* clnt_perror.c */
7807c478bd9Sstevel@tonic-gatechar *clnt_sperror(const CLIENT *cl, const char *s);
7817c478bd9Sstevel@tonic-gatevoid clnt_perror(const CLIENT *cl, const char *s);
7827c478bd9Sstevel@tonic-gatevoid clnt_perrno(enum clnt_stat num);
7837c478bd9Sstevel@tonic-gatechar *clnt_spcreateerror(const char *s);
7847c478bd9Sstevel@tonic-gatevoid clnt_pcreateerror(const char *s);
7857c478bd9Sstevel@tonic-gateconst char *clnt_sperrno(const enum clnt_stat stat);
7867c478bd9Sstevel@tonic-gate
7877c478bd9Sstevel@tonic-gate/* clnt_raw.c */
7887c478bd9Sstevel@tonic-gateCLIENT *clnt_raw_create(rpcprog_t prog, rpcvers_t vers);
7897c478bd9Sstevel@tonic-gate
7907c478bd9Sstevel@tonic-gate/* clnt_simple.c */
7917c478bd9Sstevel@tonic-gateenum clnt_stat rpc_call(const char *host, rpcprog_t prognum, rpcvers_t versnum,
7927c478bd9Sstevel@tonic-gate		rpcproc_t procnum, xdrproc_t inproc, const char *in,
7937c478bd9Sstevel@tonic-gate		xdrproc_t outproc, char *out, const char *netclass);
7947c478bd9Sstevel@tonic-gate
7957c478bd9Sstevel@tonic-gate/* clnt_vc.c */
7967c478bd9Sstevel@tonic-gateCLIENT *clnt_vc_create(int fd, struct netbuf *svcaddr, rpcprog_t prog,
7977c478bd9Sstevel@tonic-gate		rpcvers_t vers, uint_t sendsz, uint_t recvsz);
7987c478bd9Sstevel@tonic-gate
7997c478bd9Sstevel@tonic-gate/* getdname.c */
8007c478bd9Sstevel@tonic-gateint getdomainname(char *name, int namelen);
8017c478bd9Sstevel@tonic-gateint setdomainname(char *domain, int len);
8027c478bd9Sstevel@tonic-gate
8037c478bd9Sstevel@tonic-gate/* gethostname.c */
8047c478bd9Sstevel@tonic-gateint gethostname(char *hname, int hlen);
8057c478bd9Sstevel@tonic-gate
8067c478bd9Sstevel@tonic-gate/* inet_ntoa.c */
8077c478bd9Sstevel@tonic-gatechar *inet_ntoa_r(struct in_addr in, char b[]);
8087c478bd9Sstevel@tonic-gatechar *inet_ntoa(struct in_addr in);
8097c478bd9Sstevel@tonic-gatein_addr_t inet_addr(const char *cp);
8107c478bd9Sstevel@tonic-gatein_addr_t inet_netof(struct in_addr in);
8117c478bd9Sstevel@tonic-gate
8127c478bd9Sstevel@tonic-gate/* key_call.c */
8137c478bd9Sstevel@tonic-gateint key_setsecret(const char *secretkey);
8147c478bd9Sstevel@tonic-gateint key_secretkey_is_set(void);
815*61961e0fSrobinsonint key_encryptsession_pk(const char *remotename, netobj *remotekey,
8167c478bd9Sstevel@tonic-gate				des_block *deskey);
817*61961e0fSrobinsonint key_decryptsession_pk(const char *remotename, netobj *remotekey,
8187c478bd9Sstevel@tonic-gate				des_block *deskey);
8197c478bd9Sstevel@tonic-gate
8207c478bd9Sstevel@tonic-gateint key_encryptsession(const char *remotename, des_block *deskey);
8217c478bd9Sstevel@tonic-gateint key_decryptsession(const char *remotename, des_block *deskey);
8227c478bd9Sstevel@tonic-gateint key_gendes(des_block *key);
8237c478bd9Sstevel@tonic-gateint key_setnet(struct key_netstarg *arg);
8247c478bd9Sstevel@tonic-gateint key_get_conv(char *pkey, des_block *deskey);
8257c478bd9Sstevel@tonic-gateint key_call(ulong_t proc, xdrproc_t xdr_arg, char *arg, xdrproc_t xdr_rslt,
8267c478bd9Sstevel@tonic-gate				char *rslt);
8277c478bd9Sstevel@tonic-gate
8287c478bd9Sstevel@tonic-gate/* key_prot.c */
829*61961e0fSrobinsonbool_t xdr_keystatus(XDR *xdrs, keystatus *objp);
830*61961e0fSrobinsonbool_t xdr_keybuf(XDR *xdrs, keybuf objp);
831*61961e0fSrobinsonbool_t xdr_netnamestr(XDR *xdrs, netnamestr *objp);
832*61961e0fSrobinsonbool_t xdr_cryptkeyarg(XDR *xdrs, cryptkeyarg *objp);
833*61961e0fSrobinsonbool_t xdr_cryptkeyarg2(XDR *xdrs, cryptkeyarg2 *objp);
834*61961e0fSrobinsonbool_t xdr_cryptkeyres(XDR *xdrs, cryptkeyres *objp);
835*61961e0fSrobinsonbool_t xdr_unixcred(XDR *xdrs, unixcred *objp);
836*61961e0fSrobinsonbool_t xdr_getcredres(XDR *xdrs, getcredres *objp);
837*61961e0fSrobinsonbool_t xdr_key_netstarg(XDR *xdrs, key_netstarg *objp);
838*61961e0fSrobinsonbool_t xdr_key_netstres(XDR *xdrs, key_netstres *objp);
8397c478bd9Sstevel@tonic-gate
8407c478bd9Sstevel@tonic-gate/* mt_misc.c */
8417c478bd9Sstevel@tonic-gate#ifdef rpc_createerr
8427c478bd9Sstevel@tonic-gate#undef rpc_createerr
8437c478bd9Sstevel@tonic-gate#endif
8447c478bd9Sstevel@tonic-gatestruct rpc_createerr *__rpc_createerr(void);
8457c478bd9Sstevel@tonic-gate
8467c478bd9Sstevel@tonic-gate/* netname.c */
8477c478bd9Sstevel@tonic-gateint getnetname(char *name);
8487c478bd9Sstevel@tonic-gateint __getnetnamebyuid(char *name, uid_t uid);
8497c478bd9Sstevel@tonic-gateint user2netname(char *netname, const uid_t uid, const char *domain);
8507c478bd9Sstevel@tonic-gateint host2netname(char *netname, const char *host, const char *domain);
8517c478bd9Sstevel@tonic-gate
8527c478bd9Sstevel@tonic-gate/* netnamer.c */
8537c478bd9Sstevel@tonic-gateint netname2user(const char *netname, uid_t *uidp, gid_t *gidp,
8547c478bd9Sstevel@tonic-gate					int *gidlenp, gid_t *gidlist);
8557c478bd9Sstevel@tonic-gateint netname2host(const char *netname, char *hostname, int hostlen);
8567c478bd9Sstevel@tonic-gate
8577c478bd9Sstevel@tonic-gate/* openchild.c */
8587c478bd9Sstevel@tonic-gate
8597c478bd9Sstevel@tonic-gate/* pmap_clnt.c */
8607c478bd9Sstevel@tonic-gateint pmap_set(rpcprog_t program, rpcvers_t version, rpcprot_t protocol, ushort_t port);
8617c478bd9Sstevel@tonic-gatebool_t pmap_unset(rpcprog_t program, rpcvers_t version);
8627c478bd9Sstevel@tonic-gateushort_t pmap_getport(struct sockaddr_in *address, rpcprog_t program,
8637c478bd9Sstevel@tonic-gate			rpcvers_t version, rpcprot_t protocol);
8647c478bd9Sstevel@tonic-gatestruct pmaplist *pmap_getmaps(struct sockaddr_in *address);
8657c478bd9Sstevel@tonic-gateenum clnt_stat pmap_rmtcall(struct sockaddr_in *addr, rpcprog_t prog,
8667c478bd9Sstevel@tonic-gate			rpcvers_t vers, rpcproc_t proc, xdrproc_t xdrargs,
8677c478bd9Sstevel@tonic-gate			caddr_t argsp, xdrproc_t xdrres, caddr_t resp,
8687c478bd9Sstevel@tonic-gate			struct timeval tout, rpcport_t *port_ptr);
8697c478bd9Sstevel@tonic-gate
8707c478bd9Sstevel@tonic-gate/* pmap_prot.c */
8717c478bd9Sstevel@tonic-gatebool_t xdr_pmap(XDR *xdrs, struct pmap *objp);
8727c478bd9Sstevel@tonic-gatebool_t xdr_pmaplist_ptr(XDR *xdrs, pmaplist_ptr *rp);
8737c478bd9Sstevel@tonic-gatebool_t xdr_pmaplist(XDR *xdrs, PMAPLIST **rp);
8747c478bd9Sstevel@tonic-gatebool_t xdr_rmtcallargs(XDR *xdrs, struct p_rmtcallargs *cap);
8757c478bd9Sstevel@tonic-gatebool_t xdr_rmtcallres(XDR *xdrs, struct p_rmtcallres *crp);
8767c478bd9Sstevel@tonic-gate
8777c478bd9Sstevel@tonic-gate/* rpc_callmsg.c */
8787c478bd9Sstevel@tonic-gatebool_t xdr_callmsg(XDR *xdrs, struct rpc_msg *cmsg);
8797c478bd9Sstevel@tonic-gate
8807c478bd9Sstevel@tonic-gate/* rpc_comdata.c */
8817c478bd9Sstevel@tonic-gate
8827c478bd9Sstevel@tonic-gate/* rpc_generic.c */
8837c478bd9Sstevel@tonic-gateint __rpc_dtbsize(void);
8847c478bd9Sstevel@tonic-gateuint_t __rpc_get_t_size(t_scalar_t size, t_scalar_t bufsize);
8857c478bd9Sstevel@tonic-gateuint_t __rpc_get_a_size(t_scalar_t size);
8867c478bd9Sstevel@tonic-gatestruct netconfig *__rpc_getconfip(char *nettype);
8877c478bd9Sstevel@tonic-gatevoid *__rpc_setconf(char *nettype);
8887c478bd9Sstevel@tonic-gatestruct netconfig *__rpc_getconf(void *vhandle);
8897c478bd9Sstevel@tonic-gatevoid __rpc_endconf(void *vhandle);
8907c478bd9Sstevel@tonic-gatestruct netconfig *__rpcfd_to_nconf(int fd, int servtype);
8917c478bd9Sstevel@tonic-gateint __rpc_matchserv(int servtype, unsigned int nc_semantics);
8927c478bd9Sstevel@tonic-gate
8937c478bd9Sstevel@tonic-gate/* rpc_prot.c */
8947c478bd9Sstevel@tonic-gatebool_t xdr_opaque_auth(XDR *xdrs, struct opaque_auth *ap);
8957c478bd9Sstevel@tonic-gatebool_t xdr_des_block(XDR *xdrs, des_block *blkp);
8967c478bd9Sstevel@tonic-gatebool_t xdr_accepted_reply(XDR *xdrs, struct accepted_reply *ar);
8977c478bd9Sstevel@tonic-gatebool_t xdr_rejected_reply(XDR *xdrs, struct rejected_reply *rr);
8987c478bd9Sstevel@tonic-gatebool_t xdr_replymsg(XDR *xdrs, struct rpc_msg *rmsg);
8997c478bd9Sstevel@tonic-gatebool_t xdr_callhdr(XDR *xdrs, struct rpc_msg *cmsg);
9007c478bd9Sstevel@tonic-gatevoid __seterr_reply(struct rpc_msg *msg, struct rpc_err *error);
9017c478bd9Sstevel@tonic-gate
9027c478bd9Sstevel@tonic-gate/* rpc_sel2poll.c */
9037c478bd9Sstevel@tonic-gateint __rpc_select_to_poll(int fdmax, fd_set *fdset, struct pollfd *p0);
9047c478bd9Sstevel@tonic-gateint __rpc_timeval_to_msec(struct timeval *t);
9057c478bd9Sstevel@tonic-gate
9067c478bd9Sstevel@tonic-gate/* rpc_soc.c */
9077c478bd9Sstevel@tonic-gateCLIENT *clntudp_bufcreate(struct sockaddr_in *raddr, rpcprog_t prog,
9087c478bd9Sstevel@tonic-gate			rpcvers_t vers, struct timeval wait, int *sockp,
9097c478bd9Sstevel@tonic-gate			uint_t sendsz, uint_t recvsz);
9107c478bd9Sstevel@tonic-gateCLIENT *clntudp_create(struct sockaddr_in *raddr, rpcprog_t program,
9117c478bd9Sstevel@tonic-gate			rpcvers_t version, struct timeval wait, int *sockp);
9127c478bd9Sstevel@tonic-gateCLIENT *clnttcp_create(struct sockaddr_in *raddr, rpcprog_t prog,
9137c478bd9Sstevel@tonic-gate			rpcvers_t vers, int *sockp, uint_t sendsz,
9147c478bd9Sstevel@tonic-gate			uint_t recvsz);
9157c478bd9Sstevel@tonic-gateCLIENT *clntraw_create(rpcprog_t prog, rpcvers_t vers);
9167c478bd9Sstevel@tonic-gateSVCXPRT *svctcp_create(int fd, uint_t sendsize, uint_t recvsize);
9177c478bd9Sstevel@tonic-gateSVCXPRT *svcudp_bufcreate(int fd, uint_t sendsize, uint_t recvsize);
9187c478bd9Sstevel@tonic-gateSVCXPRT *svcfd_create(int fd, uint_t sendsize, uint_t recvsize);
9197c478bd9Sstevel@tonic-gateSVCXPRT *svcudp_create(int fd);
9207c478bd9Sstevel@tonic-gateSVCXPRT *svcraw_create(void);
9217c478bd9Sstevel@tonic-gateint __rpc_bindresvport(int fd, struct sockaddr_in *sin, int *portp, int qlen);
9227c478bd9Sstevel@tonic-gatevoid get_myaddress(struct sockaddr_in *addr);
9237c478bd9Sstevel@tonic-gateushort_t getrpcport(char *host, rpcprog_t prognum, rpcvers_t versnum, rpcprot_t proto);
9247c478bd9Sstevel@tonic-gateint callrpc(char *host, rpcprog_t prognum, rpcvers_t versnum, rpcproc_t procnum,
9257c478bd9Sstevel@tonic-gate		xdrproc_t inproc, char *in, xdrproc_t outproc, char *out);
9267c478bd9Sstevel@tonic-gateint registerrpc(rpcprog_t prognum, rpcvers_t versnum, rpcproc_t procnum,
9277c478bd9Sstevel@tonic-gate		char *(*progname)(), xdrproc_t inproc, xdrproc_t outproc);
9287c478bd9Sstevel@tonic-gateenum clnt_stat clnt_broadcast(rpcprog_t prog, rpcvers_t vers, rpcproc_t proc,
9297c478bd9Sstevel@tonic-gate		xdrproc_t xargs, caddr_t argsp, xdrproc_t xresults,
9307c478bd9Sstevel@tonic-gate		caddr_t resultsp, resultproc_t eachresult);
9317c478bd9Sstevel@tonic-gateAUTH *authdes_create(char *servername, uint_t window,
9327c478bd9Sstevel@tonic-gate		struct sockaddr_in *syncaddr, des_block *ckey);
9337c478bd9Sstevel@tonic-gate
9347c478bd9Sstevel@tonic-gate/* rpc_td.c */
9357c478bd9Sstevel@tonic-gate
9367c478bd9Sstevel@tonic-gate/* rpcb_clnt.c */
9377c478bd9Sstevel@tonic-gatebool_t __rpc_control(int request, void *info);
9387c478bd9Sstevel@tonic-gatebool_t rpcb_set(rpcprog_t program, rpcvers_t version,
9397c478bd9Sstevel@tonic-gate		const struct netconfig *nconf, const struct netbuf *address);
9407c478bd9Sstevel@tonic-gatebool_t rpcb_unset(rpcprog_t program, rpcvers_t version,
9417c478bd9Sstevel@tonic-gate		const struct netconfig *nconf);
9427c478bd9Sstevel@tonic-gateint rpcb_getaddr(rpcprog_t program, rpcvers_t version,
9437c478bd9Sstevel@tonic-gate		const struct netconfig *nconf, struct netbuf *address,
9447c478bd9Sstevel@tonic-gate		const char *host);
9457c478bd9Sstevel@tonic-gaterpcblist *rpcb_getmaps(const struct netconfig *nconf, const char *host);
9467c478bd9Sstevel@tonic-gateenum clnt_stat rpcb_rmtcall(const struct netconfig *nconf, const char *host,
9477c478bd9Sstevel@tonic-gate		rpcprog_t prog, rpcvers_t vers, rpcproc_t proc,
9487c478bd9Sstevel@tonic-gate		xdrproc_t xdrargs, caddr_t argsp, xdrproc_t xdrres,
9497c478bd9Sstevel@tonic-gate		caddr_t resp, struct timeval tout,
9507c478bd9Sstevel@tonic-gate		struct netbuf *addr_ptr);
9517c478bd9Sstevel@tonic-gatebool_t rpcb_gettime(const char *host, time_t *timep);
9527c478bd9Sstevel@tonic-gatechar *rpcb_taddr2uaddr(struct netconfig *nconf, struct netbuf *taddr);
9537c478bd9Sstevel@tonic-gatestruct netbuf *rpcb_uaddr2taddr(struct netconfig *nconf, char *uaddr);
9547c478bd9Sstevel@tonic-gate
9557c478bd9Sstevel@tonic-gate/* rpcb_prot.c */
9567c478bd9Sstevel@tonic-gatebool_t xdr_rpcb(XDR *xdrs, RPCB *objp);
9577c478bd9Sstevel@tonic-gatebool_t xdr_rpcblist_ptr(XDR *xdrs, rpcblist_ptr *rp);
9587c478bd9Sstevel@tonic-gatebool_t xdr_rpcblist(XDR *xdrs, RPCBLIST **rp);
9597c478bd9Sstevel@tonic-gatebool_t xdr_rpcb_entry(XDR *xdrs, rpcb_entry *objp);
9607c478bd9Sstevel@tonic-gatebool_t xdr_rpcb_entry_list_ptr(XDR *xdrs, rpcb_entry_list_ptr *rp);
9617c478bd9Sstevel@tonic-gatebool_t xdr_rpcb_rmtcallargs(XDR *xdrs, struct r_rpcb_rmtcallargs *objp);
9627c478bd9Sstevel@tonic-gatebool_t xdr_rpcb_rmtcallres(XDR *xdrs, struct r_rpcb_rmtcallres *objp);
9637c478bd9Sstevel@tonic-gatebool_t xdr_netbuf(XDR *xdrs, struct netbuf *objp);
9647c478bd9Sstevel@tonic-gate
9657c478bd9Sstevel@tonic-gate/* rpcb_st_xdr.c */
9667c478bd9Sstevel@tonic-gatebool_t xdr_rpcbs_addrlist(XDR *xdrs, rpcbs_addrlist *objp);
9677c478bd9Sstevel@tonic-gatebool_t xdr_rpcbs_addrlist(XDR *xdrs, rpcbs_addrlist *objp);
9687c478bd9Sstevel@tonic-gate
9697c478bd9Sstevel@tonic-gatebool_t xdr_rpcbs_rmtcalllist(XDR *xdrs, rpcbs_rmtcalllist *objp);
9707c478bd9Sstevel@tonic-gatebool_t xdr_rpcbs_proc(XDR *xdrs, rpcbs_proc objp);
9717c478bd9Sstevel@tonic-gatebool_t xdr_rpcbs_addrlist_ptr(XDR *xdrs, rpcbs_addrlist_ptr *objp);
9727c478bd9Sstevel@tonic-gatebool_t xdr_rpcbs_rmtcalllist_ptr(XDR *xdrs, rpcbs_rmtcalllist_ptr *objp);
9737c478bd9Sstevel@tonic-gatebool_t xdr_rpcb_stat(XDR *xdrs, rpcb_stat *objp);
9747c478bd9Sstevel@tonic-gatebool_t xdr_rpcb_stat_byvers(XDR *xdrs, rpcb_stat_byvers objp);
9757c478bd9Sstevel@tonic-gate
9767c478bd9Sstevel@tonic-gate/* rpcdname.c */
9777c478bd9Sstevel@tonic-gateint __rpc_get_default_domain(char **domain);
9787c478bd9Sstevel@tonic-gate
9797c478bd9Sstevel@tonic-gate/* rpcsec_gss_if.c */
9807c478bd9Sstevel@tonic-gateAUTH *rpc_gss_seccreate(CLIENT *clnt, char *principal, char *mechanism,
9817c478bd9Sstevel@tonic-gate		rpc_gss_service_t service_type, char *qop,
9827c478bd9Sstevel@tonic-gate		rpc_gss_options_req_t *options_req,
9837c478bd9Sstevel@tonic-gate		rpc_gss_options_ret_t *options_ret);
9847c478bd9Sstevel@tonic-gatebool_t rpc_gss_set_defaults(AUTH *auth, rpc_gss_service_t service, char *qop);
9857c478bd9Sstevel@tonic-gatebool_t rpc_gss_get_principal_name(rpc_gss_principal_t *principal, char
9867c478bd9Sstevel@tonic-gate		*mechanism, char *user_name, char *node, char *secdomain);
9877c478bd9Sstevel@tonic-gatechar **rpc_gss_get_mechanisms(void);
9887c478bd9Sstevel@tonic-gatechar **rpc_gss_get_mech_info(char *mechanism, rpc_gss_service_t *service);
9897c478bd9Sstevel@tonic-gatebool_t rpc_gss_get_versions(u_int *vers_hi, u_int *vers_lo);
9907c478bd9Sstevel@tonic-gatebool_t rpc_gss_is_installed(char *mechanism);
9917c478bd9Sstevel@tonic-gatebool_t rpc_gss_set_svc_name(char *principal, char *mechanism, uint_t req_time,
9927c478bd9Sstevel@tonic-gate		uint_t program, uint_t version);
9937c478bd9Sstevel@tonic-gatebool_t rpc_gss_set_callback(rpc_gss_callback_t *cb);
9947c478bd9Sstevel@tonic-gatebool_t rpc_gss_getcred(struct svc_req *req, rpc_gss_rawcred_t **rcred,
9957c478bd9Sstevel@tonic-gate		rpc_gss_ucred_t **ucred, void **cookie);
9967c478bd9Sstevel@tonic-gatebool_t rpc_gss_mech_to_oid(char *mech, rpc_gss_OID *oid);
9977c478bd9Sstevel@tonic-gatebool_t rpc_gss_qop_to_num(char *qop, char *mech, u_int *num);
9987c478bd9Sstevel@tonic-gateint rpc_gss_max_data_length(AUTH *rpcgss_handle, int max_tp_unit_len);
9997c478bd9Sstevel@tonic-gateint rpc_gss_svc_max_data_length(struct svc_req *req, int max_tp_unit_len);
10007c478bd9Sstevel@tonic-gatevoid rpc_gss_get_error(rpc_gss_error_t *error);
10017c478bd9Sstevel@tonic-gate
10027c478bd9Sstevel@tonic-gate/* rtime_tli.c */
10037c478bd9Sstevel@tonic-gateint rtime_tli(char *host, struct timeval *timep, struct timeval *timeout);
10047c478bd9Sstevel@tonic-gate
10057c478bd9Sstevel@tonic-gate/* svc.c */
10067c478bd9Sstevel@tonic-gatevoid xprt_register(const SVCXPRT *xprt);
10077c478bd9Sstevel@tonic-gatevoid xprt_unregister(const SVCXPRT *xprt);
10087c478bd9Sstevel@tonic-gatebool_t svc_reg(const SVCXPRT *xprt, rpcprog_t prog, rpcvers_t vers,
10097c478bd9Sstevel@tonic-gate		void (*dispatch)(), const struct netconfig *nconf);
10107c478bd9Sstevel@tonic-gatevoid svc_unreg(rpcprog_t prog, rpcvers_t vers);
10117c478bd9Sstevel@tonic-gatebool_t svc_register(SVCXPRT *xprt, rpcprog_t prog, rpcvers_t vers,
10127c478bd9Sstevel@tonic-gate		void (*dispatch)(), int protocol);
10137c478bd9Sstevel@tonic-gatevoid svc_unregister(rpcprog_t prog, rpcvers_t vers);
10147c478bd9Sstevel@tonic-gatebool_t svc_sendreply(const SVCXPRT *xprt, xdrproc_t xdr_results,
10157c478bd9Sstevel@tonic-gate		caddr_t xdr_location);
10167c478bd9Sstevel@tonic-gatevoid svcerr_noproc(const SVCXPRT *xprt);
10177c478bd9Sstevel@tonic-gatevoid svcerr_decode(const SVCXPRT *xprt);
10187c478bd9Sstevel@tonic-gatevoid svcerr_systemerr(const SVCXPRT *xprt);
10197c478bd9Sstevel@tonic-gatevoid svcerr_auth(const SVCXPRT *xprt, enum auth_stat why);
10207c478bd9Sstevel@tonic-gatevoid svcerr_weakauth(const SVCXPRT *xprt);
10217c478bd9Sstevel@tonic-gatevoid svcerr_noprog(const SVCXPRT *xprt);
10227c478bd9Sstevel@tonic-gatevoid svcerr_progvers(const SVCXPRT *xprt, rpcvers_t low_vers,
10237c478bd9Sstevel@tonic-gate		rpcvers_t high_vers);
10247c478bd9Sstevel@tonic-gatevoid svc_getreq(int rdfds);
10257c478bd9Sstevel@tonic-gatevoid svc_getreqset(fd_set *readfds);
10267c478bd9Sstevel@tonic-gatevoid svc_getreq_poll(struct pollfd *pfdp, int pollretval);
10277c478bd9Sstevel@tonic-gatevoid svc_getreq_common(int fd);
10287c478bd9Sstevel@tonic-gateSVCXPRT *svc_xprt_alloc(void);
10297c478bd9Sstevel@tonic-gatevoid svc_xprt_free(SVCXPRT *xprt);
10307c478bd9Sstevel@tonic-gatebool_t svc_get_local_cred(SVCXPRT *xprt, svc_local_cred_t *lcred);
10317c478bd9Sstevel@tonic-gateSVCAUTH *__svc_get_svcauth(SVCXPRT *);
10327c478bd9Sstevel@tonic-gatevoid *__svc_set_proc_cleanup_cb(void *cb);
10337c478bd9Sstevel@tonic-gate
10347c478bd9Sstevel@tonic-gate/* svc_auth.c */
10357c478bd9Sstevel@tonic-gateenum auth_stat __authenticate(struct svc_req *rqst, struct rpc_msg *msg);
10367c478bd9Sstevel@tonic-gateint svc_auth_reg(int cred_flavor, enum auth_stat (*handler)());
10377c478bd9Sstevel@tonic-gate
10387c478bd9Sstevel@tonic-gate/* svc_auth_sys.c */
10397c478bd9Sstevel@tonic-gate
10407c478bd9Sstevel@tonic-gate/* svc_dg.c */
10417c478bd9Sstevel@tonic-gateSVCXPRT *svc_dg_create(int fd, uint_t sendsize, uint_t recvsize);
10427c478bd9Sstevel@tonic-gateint svc_dg_enablecache(SVCXPRT *xprt, uint_t size);
10437c478bd9Sstevel@tonic-gate
10447c478bd9Sstevel@tonic-gate/* svc_door.c */
10457c478bd9Sstevel@tonic-gateSVCXPRT *svc_door_create(void (*dispatch)(), rpcprog_t prognum,
10467c478bd9Sstevel@tonic-gate			rpcvers_t versnum, uint_t sendsize);
10477c478bd9Sstevel@tonic-gate
10487c478bd9Sstevel@tonic-gate/* svc_generic.c */
10497c478bd9Sstevel@tonic-gateint svc_create(void (*dispatch)(), rpcprog_t prognum, rpcvers_t versnum,
10507c478bd9Sstevel@tonic-gate			const char *nettype);
10517c478bd9Sstevel@tonic-gateSVCXPRT *svc_tp_create(void (*dispatch)(), rpcprog_t prognum, rpcvers_t versnum,
10527c478bd9Sstevel@tonic-gate			const struct netconfig *nconf);
10537c478bd9Sstevel@tonic-gateSVCXPRT *svc_tli_create(int fd, const struct netconfig *nconf,
10547c478bd9Sstevel@tonic-gate			const struct t_bind *bindaddr, uint_t sendsz,
10557c478bd9Sstevel@tonic-gate			uint_t recvsz);
10567c478bd9Sstevel@tonic-gate
10577c478bd9Sstevel@tonic-gate/* svc_raw.c */
10587c478bd9Sstevel@tonic-gateSVCXPRT *svc_raw_create(void);
10597c478bd9Sstevel@tonic-gate
10607c478bd9Sstevel@tonic-gate/* svc_run.c */
10617c478bd9Sstevel@tonic-gatevoid svc_run(void);
10627c478bd9Sstevel@tonic-gatevoid svc_exit(void);
10637c478bd9Sstevel@tonic-gatevoid svc_done(SVCXPRT *xprt);
10647c478bd9Sstevel@tonic-gatebool_t rpc_control(int op, void *info);
10657c478bd9Sstevel@tonic-gate
10667c478bd9Sstevel@tonic-gate/* svc_simple.c */
10677c478bd9Sstevel@tonic-gateint rpc_reg(rpcprog_t prognum, rpcvers_t versnum, rpcproc_t procnum,
10687c478bd9Sstevel@tonic-gate		char *(*progname)(), xdrproc_t inproc, xdrproc_t outproc,
10697c478bd9Sstevel@tonic-gate		const char *nettype);
10707c478bd9Sstevel@tonic-gate
10717c478bd9Sstevel@tonic-gate/* svc_vc.c */
10727c478bd9Sstevel@tonic-gateSVCXPRT *svc_vc_create(int fd, uint_t sendsize, uint_t recvsize);
10737c478bd9Sstevel@tonic-gateSVCXPRT *svc_fd_create(int fd, uint_t sendsize, uint_t recvsize);
10747c478bd9Sstevel@tonic-gatevoid __svc_nisplus_fdcleanup_hack(void);
10757c478bd9Sstevel@tonic-gatevoid __svc_nisplus_enable_timestamps(void);
10767c478bd9Sstevel@tonic-gatevoid __svc_nisplus_purge_since(long since);
10777c478bd9Sstevel@tonic-gatebool_t __svc_vc_dupcache_init(SVCXPRT *xprt, void *condition, int basis);
10787c478bd9Sstevel@tonic-gateint __svc_vc_dup(struct svc_req *req, caddr_t *resp_buf, uint_t *resp_bufsz);
10797c478bd9Sstevel@tonic-gateint __svc_vc_dupdone(struct svc_req *req, caddr_t resp_buf, uint_t resp_bufsz,
10807c478bd9Sstevel@tonic-gate				int status);
10817c478bd9Sstevel@tonic-gate
10827c478bd9Sstevel@tonic-gate/* svcauth_des.c */
10837c478bd9Sstevel@tonic-gateint authdes_getucred(const struct authdes_cred *adc, uid_t *uid, gid_t *gid,
10847c478bd9Sstevel@tonic-gate				short *grouplen, gid_t *groups);
10857c478bd9Sstevel@tonic-gateenum auth_stat __svcauth_des(struct svc_req *rqst, struct rpc_msg *msg);
10867c478bd9Sstevel@tonic-gate
10877c478bd9Sstevel@tonic-gate/* ti_opts.c */
10887c478bd9Sstevel@tonic-gateint __rpc_negotiate_uid(int fd);
10897c478bd9Sstevel@tonic-gateint __rpc_get_local_uid(SVCXPRT *trans, uid_t *uid_out);
10907c478bd9Sstevel@tonic-gate
10917c478bd9Sstevel@tonic-gate/* xdr.c */
10927c478bd9Sstevel@tonic-gatevoid xdr_free(xdrproc_t proc, char *objp);
10937c478bd9Sstevel@tonic-gatebool_t xdr_void(void);
10947c478bd9Sstevel@tonic-gatebool_t xdr_int(XDR *xdrs, int *ip);
10957c478bd9Sstevel@tonic-gatebool_t xdr_u_int(XDR *xdrs, uint_t *up);
10967c478bd9Sstevel@tonic-gatebool_t xdr_long(XDR *xdrs, long *lp);
10977c478bd9Sstevel@tonic-gatebool_t xdr_u_long(XDR *xdrs, ulong_t *ulp);
10987c478bd9Sstevel@tonic-gatebool_t xdr_short(XDR *xdrs, short *sp);
10997c478bd9Sstevel@tonic-gatebool_t xdr_u_short(XDR *xdrs, ushort_t *sp);
11007c478bd9Sstevel@tonic-gatebool_t xdr_char(XDR *xdrs, char *cp);
11017c478bd9Sstevel@tonic-gatebool_t xdr_u_char(XDR *xdrs, uchar_t *cp);
11027c478bd9Sstevel@tonic-gatebool_t xdr_bool(XDR *xdrs, bool_t *bp);
11037c478bd9Sstevel@tonic-gatebool_t xdr_enum(XDR *xdrs, enum_t *ep);
11047c478bd9Sstevel@tonic-gatebool_t xdr_opaque(XDR *xdrs, caddr_t cp, uint_t cnt);
11057c478bd9Sstevel@tonic-gatebool_t xdr_bytes(XDR *xdrs, char **cpp, uint_t *sizep, uint_t maxsize);
11067c478bd9Sstevel@tonic-gatebool_t xdr_netobj(XDR *xdrs, struct netobj *np);
11077c478bd9Sstevel@tonic-gatebool_t xdr_union(XDR *xdrs, enum_t *dscmp, char *unp,
11087c478bd9Sstevel@tonic-gate			const struct xdr_discrim *choices, xdrproc_t dfault);
11097c478bd9Sstevel@tonic-gatebool_t xdr_string(XDR *xdrs, char **cpp, uint_t maxsize);
11107c478bd9Sstevel@tonic-gatebool_t xdr_hyper(XDR *xdrs, longlong_t *hp);
11117c478bd9Sstevel@tonic-gatebool_t xdr_u_hyper(XDR *xdrs, u_longlong_t *hp);
11127c478bd9Sstevel@tonic-gatebool_t xdr_longlong_t(XDR *xdrs, longlong_t *hp);
11137c478bd9Sstevel@tonic-gatebool_t xdr_u_longlong_t(XDR *xdrs, u_longlong_t *hp);
11147c478bd9Sstevel@tonic-gatebool_t xdr_ulonglong_t(XDR *xdrs, u_longlong_t *hp);
11157c478bd9Sstevel@tonic-gatebool_t xdr_wrapstring(XDR *xdrs, char **cpp);
11167c478bd9Sstevel@tonic-gate
11177c478bd9Sstevel@tonic-gate/* xdr_array.c */
11187c478bd9Sstevel@tonic-gatebool_t xdr_array(XDR *xdrs, caddr_t *addrp, uint_t *sizep, uint_t maxsize,
11197c478bd9Sstevel@tonic-gate				uint_t elsize, xdrproc_t elproc);
11207c478bd9Sstevel@tonic-gatebool_t xdr_vector(XDR *xdrs, char *basep, uint_t nelem, uint_t elemsize,
11217c478bd9Sstevel@tonic-gate				xdrproc_t xdr_elem);
11227c478bd9Sstevel@tonic-gate
11237c478bd9Sstevel@tonic-gate/* xdr_float.c */
11247c478bd9Sstevel@tonic-gatebool_t xdr_float(XDR *xdrs, float *fp);
11257c478bd9Sstevel@tonic-gatebool_t xdr_double(XDR *xdrs, double *dp);
11267c478bd9Sstevel@tonic-gatebool_t xdr_quadruple(XDR *xdrs, long double *fp);
11277c478bd9Sstevel@tonic-gate
11287c478bd9Sstevel@tonic-gate/* xdr_mem.c */
11297c478bd9Sstevel@tonic-gatevoid xdrmem_create(XDR *xdrs, caddr_t addr, uint_t size, enum xdr_op op);
11307c478bd9Sstevel@tonic-gate
11317c478bd9Sstevel@tonic-gate/* xdr_rec.c */
11327c478bd9Sstevel@tonic-gatevoid xdrrec_create(XDR *xdrs, uint_t sendsize, uint_t recvsize,
11337c478bd9Sstevel@tonic-gate			caddr_t tcp_handle, int (*readit)(), int (*writeit)());
11347c478bd9Sstevel@tonic-gate
11357c478bd9Sstevel@tonic-gateuint_t xdrrec_readbytes(XDR *xdrs, caddr_t addr, uint_t l);
11367c478bd9Sstevel@tonic-gatebool_t xdrrec_skiprecord(XDR *xdrs);
11377c478bd9Sstevel@tonic-gatebool_t xdrrec_eof(XDR *xdrs);
11387c478bd9Sstevel@tonic-gatebool_t xdrrec_endofrecord(XDR *xdrs, bool_t sendnow);
11397c478bd9Sstevel@tonic-gate
11407c478bd9Sstevel@tonic-gate/* xdr_refer.c */
11417c478bd9Sstevel@tonic-gatebool_t xdr_reference(XDR *xdrs, caddr_t *pp, uint_t size, xdrproc_t proc);
11427c478bd9Sstevel@tonic-gatebool_t xdr_pointer(XDR *xdrs, char **objpp, uint_t obj_size, xdrproc_t xdr_obj);
11437c478bd9Sstevel@tonic-gate
11447c478bd9Sstevel@tonic-gate/* xdr_sizeof.c */
11457c478bd9Sstevel@tonic-gateunsigned int xdr_sizeof(xdrproc_t func, void *data);
11467c478bd9Sstevel@tonic-gate
11477c478bd9Sstevel@tonic-gate/* xdr_stdio.c */
11487c478bd9Sstevel@tonic-gatevoid xdrstdio_create(XDR *xdrs, FILE *file, enum xdr_op op);
11497c478bd9Sstevel@tonic-gate
11507c478bd9Sstevel@tonic-gate/* svid_funcs.c */
11517c478bd9Sstevel@tonic-gate#undef	auth_destroy
11527c478bd9Sstevel@tonic-gate#undef	clnt_call
11537c478bd9Sstevel@tonic-gate#undef	clnt_control
11547c478bd9Sstevel@tonic-gate#undef	clnt_destroy
11557c478bd9Sstevel@tonic-gate#undef	clnt_freeres
11567c478bd9Sstevel@tonic-gate#undef	clnt_geterr
11577c478bd9Sstevel@tonic-gate#undef	svc_destroy
11587c478bd9Sstevel@tonic-gate#undef	svc_freeargs
11597c478bd9Sstevel@tonic-gate#undef	svc_getargs
11607c478bd9Sstevel@tonic-gate#undef	svc_getrpccaller
11617c478bd9Sstevel@tonic-gate#undef	xdr_destroy
11627c478bd9Sstevel@tonic-gate#undef	xdr_getpos
11637c478bd9Sstevel@tonic-gate#undef	xdr_inline
11647c478bd9Sstevel@tonic-gate#undef	xdr_setpos
11657c478bd9Sstevel@tonic-gatevoid auth_destroy(AUTH *auth);
11667c478bd9Sstevel@tonic-gateenum clnt_stat clnt_call(CLIENT *cl, rpcproc_t proc, xdrproc_t xargs,
11677c478bd9Sstevel@tonic-gate			caddr_t argsp, xdrproc_t xres, caddr_t resp,
11687c478bd9Sstevel@tonic-gate			struct timeval timeout);
11697c478bd9Sstevel@tonic-gatebool_t clnt_control(CLIENT *cl, uint_t rq, void *in);
11707c478bd9Sstevel@tonic-gatevoid clnt_destroy(CLIENT *cl);
11717c478bd9Sstevel@tonic-gatebool_t clnt_freeres(CLIENT *cl, xdrproc_t xres, caddr_t resp);
11727c478bd9Sstevel@tonic-gatevoid clnt_geterr(CLIENT *cl, struct rpc_err *errp);
11737c478bd9Sstevel@tonic-gatebool_t svc_control(SVCXPRT *xprt, const uint_t rq, void *in);
11747c478bd9Sstevel@tonic-gatebool_t svc_freeargs(SVCXPRT *xprt, xdrproc_t xargs, char *argsp);
11757c478bd9Sstevel@tonic-gatebool_t svc_getargs(SVCXPRT *xprt, xdrproc_t xargs, char *argsp);
11767c478bd9Sstevel@tonic-gatestruct netbuf *svc_getrpccaller(SVCXPRT *xprt);
11777c478bd9Sstevel@tonic-gatelong *xdr_inline(XDR *xdrs, int len);
11787c478bd9Sstevel@tonic-gatevoid xdr_destroy(XDR *xdrs);
11797c478bd9Sstevel@tonic-gateuint_t xdr_getpos(XDR *xdrs);
11807c478bd9Sstevel@tonic-gatebool_t xdr_setpos(XDR *xdrs, uint_t pos);
11817c478bd9Sstevel@tonic-gate
11827c478bd9Sstevel@tonic-gate/*
11837c478bd9Sstevel@tonic-gate * usr/src/lib/libnsl/saf routines
11847c478bd9Sstevel@tonic-gate */
11857c478bd9Sstevel@tonic-gate
11867c478bd9Sstevel@tonic-gate/* checkver.c */
11877c478bd9Sstevel@tonic-gateint check_version(int ver, char *fname);
11887c478bd9Sstevel@tonic-gate
11897c478bd9Sstevel@tonic-gate/* doconfig.c */
11907c478bd9Sstevel@tonic-gateint doconfig(int fd, char *script, long rflag);
11917c478bd9Sstevel@tonic-gate
11927c478bd9Sstevel@tonic-gate/*
11937c478bd9Sstevel@tonic-gate * usr/src/lib/libnsl/yp routines
11947c478bd9Sstevel@tonic-gate */
11957c478bd9Sstevel@tonic-gate
11967c478bd9Sstevel@tonic-gate/* dbm.c */
11977c478bd9Sstevel@tonic-gateint dbminit(char *file);
11987c478bd9Sstevel@tonic-gateint dbmclose(void);
11997c478bd9Sstevel@tonic-gatedatum fetch(datum key);
12007c478bd9Sstevel@tonic-gateint delete(datum key);
12017c478bd9Sstevel@tonic-gateint store(datum key, datum dat);
12027c478bd9Sstevel@tonic-gatedatum firstkey(void);
12037c478bd9Sstevel@tonic-gatedatum nextkey(datum key);
12047c478bd9Sstevel@tonic-gatedatum firsthash(long hash);
12057c478bd9Sstevel@tonic-gatedatum makdatum(char *buf, int n);
12067c478bd9Sstevel@tonic-gatelong hashinc(long hash);
12077c478bd9Sstevel@tonic-gatelong calchash(datum item);
12087c478bd9Sstevel@tonic-gate
12097c478bd9Sstevel@tonic-gate/* yp_all.c */
12107c478bd9Sstevel@tonic-gateint yp_all(char *domain, char *map, struct ypall_callback *callback);
12117c478bd9Sstevel@tonic-gateint __yp_all_rsvdport(char *domain, char *map, struct ypall_callback *callback);
12127c478bd9Sstevel@tonic-gate
12137c478bd9Sstevel@tonic-gate/* yp_b_clnt.c */
12147c478bd9Sstevel@tonic-gateenum ypbind_resptype {
12157c478bd9Sstevel@tonic-gate	YPBIND_SUCC_VAL = 1,
12167c478bd9Sstevel@tonic-gate	YPBIND_FAIL_VAL = 2
12177c478bd9Sstevel@tonic-gate};
12187c478bd9Sstevel@tonic-gatetypedef enum ypbind_resptype ypbind_resptype;
12197c478bd9Sstevel@tonic-gatestruct ypbind_resp {
12207c478bd9Sstevel@tonic-gate	ypbind_resptype ypbind_status;
12217c478bd9Sstevel@tonic-gate	union {
12227c478bd9Sstevel@tonic-gate		uint_t ypbind_error;
12237c478bd9Sstevel@tonic-gate		struct ypbind_binding *ypbind_bindinfo;
12247c478bd9Sstevel@tonic-gate	} ypbind_resp_u;
12257c478bd9Sstevel@tonic-gate};
12267c478bd9Sstevel@tonic-gatetypedef struct ypbind_resp ypbind_resp;
12277c478bd9Sstevel@tonic-gatestruct ypbind_domain {
12287c478bd9Sstevel@tonic-gate	char *ypbind_domainname;
12297c478bd9Sstevel@tonic-gate	rpcvers_t ypbind_vers;
12307c478bd9Sstevel@tonic-gate};
12317c478bd9Sstevel@tonic-gatetypedef struct ypbind_domain ypbind_domain;
12327c478bd9Sstevel@tonic-gatestruct ypbind_setdom {
12337c478bd9Sstevel@tonic-gate	char *ypsetdom_domain;
12347c478bd9Sstevel@tonic-gate	struct ypbind_binding *ypsetdom_bindinfo;
12357c478bd9Sstevel@tonic-gate};
12367c478bd9Sstevel@tonic-gatetypedef struct ypbind_setdom ypbind_setdom;
12377c478bd9Sstevel@tonic-gateypbind_resp *ypbindproc_domain_3(ypbind_domain *argp, CLIENT *clnt);
12387c478bd9Sstevel@tonic-gate
12397c478bd9Sstevel@tonic-gate/* yp_b_xdr.c */
12407c478bd9Sstevel@tonic-gatebool_t xdr_ypbind_domain(XDR *xdrs, ypbind_domain *objp);
12417c478bd9Sstevel@tonic-gatebool_t xdr_ypbind_resp(XDR *xdrs, ypbind_resp *objp);
12427c478bd9Sstevel@tonic-gatebool_t xdr_ypbind_setdom(XDR *xdrs, ypbind_setdom *objp);
12437c478bd9Sstevel@tonic-gatebool_t xdr_ypbind_resptype(XDR *xdrs, ypbind_resptype *objp);
12447c478bd9Sstevel@tonic-gate
12457c478bd9Sstevel@tonic-gate/* yp_bind.c */
12467c478bd9Sstevel@tonic-gatestruct dom_binding {
12477c478bd9Sstevel@tonic-gate	struct dom_binding *dom_pnext;
12487c478bd9Sstevel@tonic-gate	char *dom_domain;
12497c478bd9Sstevel@tonic-gate	struct ypbind_binding *dom_binding;
12507c478bd9Sstevel@tonic-gate	CLIENT *dom_client;
12517c478bd9Sstevel@tonic-gate	int cache_bad;
12527c478bd9Sstevel@tonic-gate	int fd;
12537c478bd9Sstevel@tonic-gate	dev_t rdev;
12547c478bd9Sstevel@tonic-gate	int ref_count;
12557c478bd9Sstevel@tonic-gate	int need_free;
12567c478bd9Sstevel@tonic-gate	mutex_t server_name_lock;
12577c478bd9Sstevel@tonic-gate};
12587c478bd9Sstevel@tonic-gateint __yp_dobind(char *domain, struct dom_binding **binding);
12597c478bd9Sstevel@tonic-gateint __yp_rel_binding(struct dom_binding *binding);
12607c478bd9Sstevel@tonic-gatevoid yp_unbind(char *domain);
12617c478bd9Sstevel@tonic-gateint __yp_add_binding(char *domain, char *addr);
12627c478bd9Sstevel@tonic-gateint yp_bind(char *domain);
12637c478bd9Sstevel@tonic-gateint yp_get_default_domain(char **domain);
12647c478bd9Sstevel@tonic-gateint usingypmap(char **ddn, char *map);
12657c478bd9Sstevel@tonic-gateCLIENT *__clnt_create_loopback(rpcprog_t prog, rpcvers_t vers, int err);
12667c478bd9Sstevel@tonic-gate
12677c478bd9Sstevel@tonic-gate/* yp_enum.c */
12687c478bd9Sstevel@tonic-gateint yp_first(char *domain, char *map, char **key, int *keylen,
12697c478bd9Sstevel@tonic-gate					char **val, int  *vallen);
12707c478bd9Sstevel@tonic-gateint yp_next(char *domain, char *map, char *inkey, int inkeylen,
12717c478bd9Sstevel@tonic-gate		char **outkey, int  *outkeylen, char **val, int *vallen);
12727c478bd9Sstevel@tonic-gate
12737c478bd9Sstevel@tonic-gate/* yp_master.c */
12747c478bd9Sstevel@tonic-gateint yp_master(char *domain, char *map, char **master);
12757c478bd9Sstevel@tonic-gateint __yp_master_rsvdport(char *domain, char *map, char **master);
12767c478bd9Sstevel@tonic-gate
12777c478bd9Sstevel@tonic-gate/* yp_match.c */
12787c478bd9Sstevel@tonic-gateint yp_match(char *domain, char *map, char *key, int keylen,
12797c478bd9Sstevel@tonic-gate						char **val, int  *vallen);
12807c478bd9Sstevel@tonic-gateint yp_match_rsvdport(char *domain, char *map, char *key, int keylen,
12817c478bd9Sstevel@tonic-gate						char **val, int  *vallen);
12827c478bd9Sstevel@tonic-gatevoid __empty_yp_cache(void);
12837c478bd9Sstevel@tonic-gate
12847c478bd9Sstevel@tonic-gate/* yp_order.c */
12857c478bd9Sstevel@tonic-gateint yp_order(char *domain, char *map, unsigned long *order);
12867c478bd9Sstevel@tonic-gate
12877c478bd9Sstevel@tonic-gate/* yp_rsvd.c */
12887c478bd9Sstevel@tonic-gateCLIENT *__yp_clnt_create_rsvdport(const char *hostname,
12897c478bd9Sstevel@tonic-gate			rpcprog_t prog, rpcvers_t vers,
12907c478bd9Sstevel@tonic-gate			const char *nettype,
12917c478bd9Sstevel@tonic-gate			const uint_t sendsz, const uint_t recvsz);
12927c478bd9Sstevel@tonic-gate
12937c478bd9Sstevel@tonic-gate/* yp_update.c */
12947c478bd9Sstevel@tonic-gateint yp_update(char *domain, char *map, unsigned op,
12957c478bd9Sstevel@tonic-gate			char *key, int keylen, char *data, int datalen);
12967c478bd9Sstevel@tonic-gate
12977c478bd9Sstevel@tonic-gate/* yp_xdr.c */
12987c478bd9Sstevel@tonic-gatebool xdr_datum(XDR * xdrs, datum *pdatum);
12997c478bd9Sstevel@tonic-gatebool xdr_ypdomain_wrap_string(XDR *xdrs, char **ppstring);
13007c478bd9Sstevel@tonic-gatebool xdr_ypmap_wrap_string(XDR *xdrs, char **ppstring);
13017c478bd9Sstevel@tonic-gatebool xdr_ypreq_key(XDR *xdrs, struct ypreq_key *ps);
13027c478bd9Sstevel@tonic-gatebool xdr_ypreq_nokey(XDR *xdrs, struct ypreq_nokey *ps);
13037c478bd9Sstevel@tonic-gatebool xdr_ypresp_val(XDR *xdrs, struct ypresp_val *ps);
13047c478bd9Sstevel@tonic-gatebool xdr_ypresp_key_val(XDR *xdrs, struct ypresp_key_val *ps);
13057c478bd9Sstevel@tonic-gatebool xdr_ypowner_wrap_string(XDR *xdrs, char **ppstring);
13067c478bd9Sstevel@tonic-gatebool xdr_ypmap_parms(XDR *xdrs, struct ypmap_parms *ps);
13077c478bd9Sstevel@tonic-gatebool xdr_ypresp_master(XDR *xdrs, struct ypresp_master *ps);
13087c478bd9Sstevel@tonic-gatebool xdr_ypresp_order(XDR * xdrs, struct ypresp_order *ps);
13097c478bd9Sstevel@tonic-gatebool xdr_ypresp_maplist(XDR *xdrs, struct ypresp_maplist *ps);
13107c478bd9Sstevel@tonic-gatebool xdr_yppushresp_xfr(XDR *xdrs, struct yppushresp_xfr *ps);
13117c478bd9Sstevel@tonic-gatebool xdr_ypreq_newxfr(XDR *xdrs, struct ypreq_newxfr *ps);
13127c478bd9Sstevel@tonic-gatebool xdr_ypreq_xfr(XDR *xdrs, struct ypreq_xfr *ps);
13137c478bd9Sstevel@tonic-gatebool xdr_ypall(XDR *xdrs, struct ypall_callback *callback);
13147c478bd9Sstevel@tonic-gate
13157c478bd9Sstevel@tonic-gate/* yperr_string.c */
13167c478bd9Sstevel@tonic-gatechar *yperr_string(int code);
13177c478bd9Sstevel@tonic-gate
13187c478bd9Sstevel@tonic-gate/* yppasswd_xdr.c */
13197c478bd9Sstevel@tonic-gatebool_t xdr_yppasswd(XDR *xdrsp, struct yppasswd *pp);
13207c478bd9Sstevel@tonic-gate
13217c478bd9Sstevel@tonic-gate/* ypprot_err.c */
13227c478bd9Sstevel@tonic-gateint ypprot_err(int yp_protocol_error);
13237c478bd9Sstevel@tonic-gate
13247c478bd9Sstevel@tonic-gate/* ypupd.c */
13257c478bd9Sstevel@tonic-gatebool_t xdr_yp_buf(XDR *xdrs, yp_buf *objp);
13267c478bd9Sstevel@tonic-gatebool_t xdr_ypupdate_args(XDR *xdrs, ypupdate_args *objp);
13277c478bd9Sstevel@tonic-gatebool_t xdr_ypdelete_args(XDR *xdrs, ypdelete_args *objp);
13287c478bd9Sstevel@tonic-gate
13297c478bd9Sstevel@tonic-gate/* nis_sec_mechs.c */
13307c478bd9Sstevel@tonic-gatechar *__nis_keyalg2authtype(keylen_t keylen, algtype_t algtype,
13317c478bd9Sstevel@tonic-gate	char *authtype, size_t authtype_len);
1332