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