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/* 237d1e8394SAshok Kumar T * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 247c478bd9Sstevel@tonic-gate * Use is subject to license terms. 25*9b241b4eSYuri Pankov * 26*9b241b4eSYuri Pankov * Copyright 2011 Nexenta Systems, Inc. All rights reserved. 277c478bd9Sstevel@tonic-gate */ 287c478bd9Sstevel@tonic-gate 297c478bd9Sstevel@tonic-gate 307257d1b4Sraf/* LINTLIBRARY */ 317257d1b4Sraf/* PROTOLIB1 */ 327257d1b4Sraf 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/nislib.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/gen routines 1827c478bd9Sstevel@tonic-gate */ 1837c478bd9Sstevel@tonic-gate 1847c478bd9Sstevel@tonic-gate/* nis_subr.c */ 1857c478bd9Sstevel@tonic-gatename_pos nis_dir_cmp(nis_name n1, nis_name n2); 1867c478bd9Sstevel@tonic-gatenis_name nis_local_group(void); 1877c478bd9Sstevel@tonic-gatenis_name nis_domain_of(char *s); 1887c478bd9Sstevel@tonic-gatenis_name nis_leaf_of_r(const nis_name s, char *buf, size_t bufsize); 1897c478bd9Sstevel@tonic-gatenis_name nis_leaf_of(char *s); 1907c478bd9Sstevel@tonic-gatenis_name nis_name_of(char *s); 1917c478bd9Sstevel@tonic-gatenis_name nis_local_directory(void); 1927c478bd9Sstevel@tonic-gatenis_name nis_local_host(void); 1937c478bd9Sstevel@tonic-gatevoid nis_destroy_object(nis_object *obj); 1947c478bd9Sstevel@tonic-gatenis_object *nis_clone_object(nis_object *obj, nis_object *dest); 1957c478bd9Sstevel@tonic-gatenis_object *nis_read_obj(char *f); 1967c478bd9Sstevel@tonic-gateint nis_write_obj(char *f, nis_object *o); 1977c478bd9Sstevel@tonic-gatevoid *nis_get_static_storage(struct nis_sdata *bs, u_int el, u_int nel); 19836e852a1SRaja Andra/* 19936e852a1SRaja Andra * char *nis_old_data(char *s); 20036e852a1SRaja Andra * char *nis_data(char *s); 20136e852a1SRaja Andra */ 2027c478bd9Sstevel@tonic-gate 2037c478bd9Sstevel@tonic-gate/* nis_xdr.c */ 2047c478bd9Sstevel@tonic-gatebool_t xdr_nis_attr(XDR *xdrs, nis_attr *objp); 2057c478bd9Sstevel@tonic-gatebool_t xdr_nis_name(XDR *xdrs, nis_name *objp); 2067c478bd9Sstevel@tonic-gatebool_t xdr_endpoint(XDR *xdrs, endpoint *objp); 2077c478bd9Sstevel@tonic-gatebool_t xdr_nis_server(XDR *xdrs, nis_server *objp); 2087c478bd9Sstevel@tonic-gatebool_t xdr_directory_obj(XDR *xdrs, directory_obj *objp); 2097c478bd9Sstevel@tonic-gatebool_t xdr_entry_obj(XDR *xdrs, entry_obj *objp); 2107c478bd9Sstevel@tonic-gatebool_t xdr_table_obj(XDR *xdrs, table_obj *objp); 2117c478bd9Sstevel@tonic-gatebool_t xdr_objdata(XDR *xdrs, objdata *objp); 2127c478bd9Sstevel@tonic-gatebool_t xdr_nis_oid(XDR *xdrs, nis_oid *objp); 2137c478bd9Sstevel@tonic-gatebool_t xdr_nis_object(XDR *xdrs, nis_object *objp); 2147c478bd9Sstevel@tonic-gatebool_t xdr_nis_object(XDR *xdrs, nis_object *objp); 2157c478bd9Sstevel@tonic-gatebool_t xdr_log_entry_t(XDR *xdrs, log_entry_t *objp); 2167c478bd9Sstevel@tonic-gatebool_t xdr_log_entry(XDR *xdrs, log_entry *objp); 2177c478bd9Sstevel@tonic-gatebool_t xdr_nis_tag(XDR *xdrs, nis_tag *objp); 2187c478bd9Sstevel@tonic-gatebool_t xdr_nis_bound_endpoint(XDR *xdrs, nis_bound_endpoint *objp); 2197c478bd9Sstevel@tonic-gatebool_t xdr_nis_bound_directory(XDR *xdrs, nis_bound_directory *objp); 2207c478bd9Sstevel@tonic-gatebool_t xdr_nis_active_endpoint(XDR *xdrs, nis_active_endpoint *objp); 2217c478bd9Sstevel@tonic-gate 2227c478bd9Sstevel@tonic-gate/* thr_misc.c */ 2237c478bd9Sstevel@tonic-gate 2247c478bd9Sstevel@tonic-gate/* 2257c478bd9Sstevel@tonic-gate * usr/src/lib/libnsl/nsl routines 2267c478bd9Sstevel@tonic-gate */ 2277c478bd9Sstevel@tonic-gate 2287c478bd9Sstevel@tonic-gate/* _conn_util.c */ 2297c478bd9Sstevel@tonic-gate 2307c478bd9Sstevel@tonic-gate/* _data2.c */ 2317c478bd9Sstevel@tonic-gate 2327c478bd9Sstevel@tonic-gate/* _errlst.c */ 2337c478bd9Sstevel@tonic-gateint *__t_errno(void); 2347c478bd9Sstevel@tonic-gate 2357c478bd9Sstevel@tonic-gate/* _utility.c */ 2367c478bd9Sstevel@tonic-gate 2377c478bd9Sstevel@tonic-gate/* t_accept.c */ 2387c478bd9Sstevel@tonic-gateint t_accept(int, int, struct t_call *); 2397c478bd9Sstevel@tonic-gate 2407c478bd9Sstevel@tonic-gate/* t_alloc.c */ 2417c478bd9Sstevel@tonic-gatechar *t_alloc(int, int, int); 2427c478bd9Sstevel@tonic-gate 2437c478bd9Sstevel@tonic-gate/* t_bind.c */ 2447c478bd9Sstevel@tonic-gateint t_bind(int, struct t_bind *, struct t_bind *); 2457c478bd9Sstevel@tonic-gate 2467c478bd9Sstevel@tonic-gate/* t_close.c */ 2477c478bd9Sstevel@tonic-gateint t_close(int); 2487c478bd9Sstevel@tonic-gate 2497c478bd9Sstevel@tonic-gate/* t_connect.c */ 2507c478bd9Sstevel@tonic-gateint t_connect(int, struct t_call *, struct t_call *); 2517c478bd9Sstevel@tonic-gate 2527c478bd9Sstevel@tonic-gate/* t_error.c */ 2537c478bd9Sstevel@tonic-gatevoid t_error(const char *); 2547c478bd9Sstevel@tonic-gate 2557c478bd9Sstevel@tonic-gate/* t_free.c */ 2567c478bd9Sstevel@tonic-gateint t_free(char *, int); 2577c478bd9Sstevel@tonic-gate 2587c478bd9Sstevel@tonic-gate/* t_getinfo.c */ 2597c478bd9Sstevel@tonic-gateint t_getinfo(int, struct t_info *); 2607c478bd9Sstevel@tonic-gate 2617c478bd9Sstevel@tonic-gate/* t_getname.c */ 2627c478bd9Sstevel@tonic-gateint t_getname(int, struct netbuf *, int); 2637c478bd9Sstevel@tonic-gate 2647c478bd9Sstevel@tonic-gate/* t_getstate.c */ 2657c478bd9Sstevel@tonic-gateint t_getstate(int); 2667c478bd9Sstevel@tonic-gate 2677c478bd9Sstevel@tonic-gate/* t_listen.c */ 2687c478bd9Sstevel@tonic-gateint t_listen(int, struct t_call *); 2697c478bd9Sstevel@tonic-gate 2707c478bd9Sstevel@tonic-gate/* t_look.c */ 2717c478bd9Sstevel@tonic-gateint t_look(int); 2727c478bd9Sstevel@tonic-gate 2737c478bd9Sstevel@tonic-gate/* t_open.c */ 2747c478bd9Sstevel@tonic-gateint t_open(const char *, int, struct t_info *); 2757c478bd9Sstevel@tonic-gate 2767c478bd9Sstevel@tonic-gate/* t_optmgmt.c */ 2777c478bd9Sstevel@tonic-gateint t_optmgmt(int, struct t_optmgmt *, struct t_optmgmt *); 2787c478bd9Sstevel@tonic-gate 2797c478bd9Sstevel@tonic-gate/* t_rcv.c */ 2807c478bd9Sstevel@tonic-gateint t_rcv(int, char *, unsigned, int *); 2817c478bd9Sstevel@tonic-gate 2827c478bd9Sstevel@tonic-gate/* t_rcvconnect.c */ 2837c478bd9Sstevel@tonic-gateint t_rcvconnect(int, struct t_call *); 2847c478bd9Sstevel@tonic-gate 2857c478bd9Sstevel@tonic-gate/* t_rcvdis.c */ 2867c478bd9Sstevel@tonic-gateint t_rcvdis(int, struct t_discon *); 2877c478bd9Sstevel@tonic-gate 2887c478bd9Sstevel@tonic-gate/* t_rcvrel.c */ 2897c478bd9Sstevel@tonic-gateint t_rcvrel(int); 2907c478bd9Sstevel@tonic-gate 2917c478bd9Sstevel@tonic-gate/* t_rcvudata.c */ 2927c478bd9Sstevel@tonic-gateint t_rcvudata(int, struct t_unitdata *, int *); 2937c478bd9Sstevel@tonic-gate 2947c478bd9Sstevel@tonic-gate/* t_rcvuderr.c */ 2957c478bd9Sstevel@tonic-gateint t_rcvuderr(int, struct t_uderr *); 2967c478bd9Sstevel@tonic-gate 2977c478bd9Sstevel@tonic-gate/* t_snd.c */ 2987c478bd9Sstevel@tonic-gateint t_snd(int, char *, unsigned, int); 2997c478bd9Sstevel@tonic-gate 3007c478bd9Sstevel@tonic-gate/* t_snddis */ 3017c478bd9Sstevel@tonic-gateint t_snddis(int, struct t_call *); 3027c478bd9Sstevel@tonic-gate 3037c478bd9Sstevel@tonic-gate/* t_sndrel.c */ 3047c478bd9Sstevel@tonic-gateint t_sndrel(int); 3057c478bd9Sstevel@tonic-gate 3067c478bd9Sstevel@tonic-gate/* t_sndudata.c */ 3077c478bd9Sstevel@tonic-gateint t_sndudata(int, struct t_unitdata *); 3087c478bd9Sstevel@tonic-gate 3097c478bd9Sstevel@tonic-gate/* t_strerror.c */ 3107257d1b4Srafchar *t_strerror(int); 3117c478bd9Sstevel@tonic-gate 3127c478bd9Sstevel@tonic-gate/* t_sync.c */ 3137c478bd9Sstevel@tonic-gateint t_sync(int); 3147c478bd9Sstevel@tonic-gate 3157c478bd9Sstevel@tonic-gate/* t_unbind.c */ 3167c478bd9Sstevel@tonic-gateint t_unbind(int); 3177c478bd9Sstevel@tonic-gate 3187c478bd9Sstevel@tonic-gate/* 3197c478bd9Sstevel@tonic-gate * struct t_iovec is defined in <xti.h>. But <xti.h> cannot be included 3207c478bd9Sstevel@tonic-gate * because inclusion of <xti.h> and <tiuser.h> are mututally exclusive 3217c478bd9Sstevel@tonic-gate * and <tiuser.h> is exposed by the inclusion of <rpc/rpc.h>. Needs to 3227c478bd9Sstevel@tonic-gate * be seen how to build llib-lnsl.ln from multiple source files to avoid 3237c478bd9Sstevel@tonic-gate * this problem. 3247c478bd9Sstevel@tonic-gate */ 3257c478bd9Sstevel@tonic-gatestruct t_iovec { 3267c478bd9Sstevel@tonic-gate void *iov_base; 3277c478bd9Sstevel@tonic-gate size_t iov_len; 3287c478bd9Sstevel@tonic-gate}; 3297c478bd9Sstevel@tonic-gate 3307c478bd9Sstevel@tonic-gate/* t_sndv.c */ 3317c478bd9Sstevel@tonic-gateint t_sndv(int, const struct t_iovec *, unsigned int, int); 3327c478bd9Sstevel@tonic-gate 3337c478bd9Sstevel@tonic-gate/* t_sndvudata.c */ 3347c478bd9Sstevel@tonic-gateint t_sndvudata(int, struct t_unitdata *, struct t_iovec *, unsigned int); 3357c478bd9Sstevel@tonic-gate 3367c478bd9Sstevel@tonic-gate/* t_sndreldata.c */ 3377c478bd9Sstevel@tonic-gateint t_sndreldata(int, struct t_discon *); 3387c478bd9Sstevel@tonic-gate 3397c478bd9Sstevel@tonic-gate/* t_rcvv.c */ 3407c478bd9Sstevel@tonic-gateint t_rcvv(int, struct t_iovec *, unsigned int, int *); 3417c478bd9Sstevel@tonic-gate 3427c478bd9Sstevel@tonic-gate/* t_rcvvudata.c */ 3437c478bd9Sstevel@tonic-gateint t_rcvvudata(int, struct t_unitdata *, struct t_iovec *, 3447c478bd9Sstevel@tonic-gate unsigned int, int *); 3457c478bd9Sstevel@tonic-gate 3467c478bd9Sstevel@tonic-gate/* t_rcvreldata.c */ 3477c478bd9Sstevel@tonic-gateextern int t_rcvreldata(int, struct t_discon *); 3487c478bd9Sstevel@tonic-gate 3497c478bd9Sstevel@tonic-gate/* t_sysconf.c */ 3507c478bd9Sstevel@tonic-gateint t_sysconf(int); 3517c478bd9Sstevel@tonic-gate 3527c478bd9Sstevel@tonic-gate/* xti_wrappers.c */ 3537c478bd9Sstevel@tonic-gateint _xti_accept(int, int, struct t_call *); 3547c478bd9Sstevel@tonic-gateint _xti_xns5_accept(int, int, struct t_call *); 3557c478bd9Sstevel@tonic-gatechar *_xti_alloc(int, int, int); 3567c478bd9Sstevel@tonic-gateint _xti_bind(int, struct t_bind *, struct t_bind *); 3577c478bd9Sstevel@tonic-gateint _xti_close(int); 3587c478bd9Sstevel@tonic-gateint _xti_connect(int, struct t_call *, struct t_call *); 3597c478bd9Sstevel@tonic-gateint _xti_error(char *); 3607c478bd9Sstevel@tonic-gateint _xti_free(char *, int); 3617c478bd9Sstevel@tonic-gateint _xti_getinfo(int, struct t_info *); 3627c478bd9Sstevel@tonic-gateint _xti_getprotaddr(int, struct t_bind *, struct t_bind *); 3637c478bd9Sstevel@tonic-gateint _xti_getstate(int); 3647c478bd9Sstevel@tonic-gateint _xti_listen(int, struct t_call *); 3657c478bd9Sstevel@tonic-gateint _xti_look(int); 3667c478bd9Sstevel@tonic-gateint _xti_open(char *, int, struct t_info *); 3677c478bd9Sstevel@tonic-gateint _xti_optmgmt(int, struct t_optmgmt *, struct t_optmgmt *); 3687c478bd9Sstevel@tonic-gateint _xti_rcv(int, char *, unsigned int, int *); 3697c478bd9Sstevel@tonic-gateint _xti_rcvconnect(int, struct t_call *); 3707c478bd9Sstevel@tonic-gateint _xti_rcvdis(int, struct t_discon *); 3717c478bd9Sstevel@tonic-gateint _xti_rcvrel(int); 3727c478bd9Sstevel@tonic-gateint _xti_rcvreldata(int, struct t_discon *); 3737c478bd9Sstevel@tonic-gateint _xti_rcvudata(int, struct t_unitdata *, int *); 3747c478bd9Sstevel@tonic-gateint _xti_rcvuderr(int, struct t_uderr *); 3757c478bd9Sstevel@tonic-gateint _xti_rcvv(int, struct t_iovec *, unsigned int, int *); 3767c478bd9Sstevel@tonic-gateint _xti_rcvvudata(int, struct t_unitdata *, struct t_iovec *, 3777c478bd9Sstevel@tonic-gate unsigned int, int *); 3787c478bd9Sstevel@tonic-gateint _xti_snd(int, char *, unsigned int, int); 3797c478bd9Sstevel@tonic-gateint _xti_xns5_snd(int, char *, unsigned int, int); 3807c478bd9Sstevel@tonic-gateint _xti_snddis(int, struct t_call *); 3817c478bd9Sstevel@tonic-gateint _xti_sndrel(int); 3827c478bd9Sstevel@tonic-gateint _xti_sndreldata(int, struct t_discon *); 3837c478bd9Sstevel@tonic-gateint _xti_sndudata(int, struct t_unitdata *); 3847c478bd9Sstevel@tonic-gateint _xti_sndv(int, const struct t_iovec *, unsigned int, int); 3857c478bd9Sstevel@tonic-gateint _xti_sndvudata(int, struct t_unitdata *, struct t_iovec *, unsigned int); 3867c478bd9Sstevel@tonic-gatechar *_xti_strerror(int); 3877c478bd9Sstevel@tonic-gateint _xti_sync(int); 3887c478bd9Sstevel@tonic-gateint _xti_sysconf(int); 3897c478bd9Sstevel@tonic-gateint _xti_unbind(int); 3907c478bd9Sstevel@tonic-gate 3917c478bd9Sstevel@tonic-gate/* 3927c478bd9Sstevel@tonic-gate * usr/src/lib/libnsl/nss routines 3937c478bd9Sstevel@tonic-gate */ 3947c478bd9Sstevel@tonic-gate 3957c478bd9Sstevel@tonic-gate/* gethostby_door.c */ 3967c478bd9Sstevel@tonic-gate 3977c478bd9Sstevel@tonic-gate/* gethostbyname_r.c */ 3987c478bd9Sstevel@tonic-gatestruct hostent *_uncached_gethostbyname_r(const char *nam, 3997c478bd9Sstevel@tonic-gate struct hostent *result, 4007c478bd9Sstevel@tonic-gate char *buffer, int buflen, int *h_errnop); 4017c478bd9Sstevel@tonic-gatestruct hostent *_uncached_gethostbyaddr_r(const char *addr, int length, 4027c478bd9Sstevel@tonic-gate int type, struct hostent *result, 4037c478bd9Sstevel@tonic-gate char *buffer, int buflen, int *h_errnop); 4047c478bd9Sstevel@tonic-gatestruct hostent *gethostbyname_r(const char *nam, struct hostent *result, 4057c478bd9Sstevel@tonic-gate char *buffer, int buflen, int *h_errnop); 4067c478bd9Sstevel@tonic-gatestruct hostent *gethostbyaddr_r(const char *addr, int length, int type, 4077c478bd9Sstevel@tonic-gate struct hostent *result, 4087c478bd9Sstevel@tonic-gate char *buffer, int buflen, int *h_errnop); 4097c478bd9Sstevel@tonic-gate 4107c478bd9Sstevel@tonic-gate/* gethostent.c */ 4117c478bd9Sstevel@tonic-gatestruct hostent *gethostbyname(const char *nam); 4127c478bd9Sstevel@tonic-gatestruct hostent *gethostbyaddr(const void *addr, socklen_t len, int type); 4137c478bd9Sstevel@tonic-gatestruct hostent *gethostent(void); 4147c478bd9Sstevel@tonic-gate 4157c478bd9Sstevel@tonic-gate/* gethostent_r.c */ 4167c478bd9Sstevel@tonic-gateint sethostent(int stay); 4177c478bd9Sstevel@tonic-gateint endhostent(void); 4187c478bd9Sstevel@tonic-gatestruct hostent *gethostent_r(struct hostent *result, char *buffer, int buflen, 4197c478bd9Sstevel@tonic-gate int *h_errnop); 4207c478bd9Sstevel@tonic-gate 4217c478bd9Sstevel@tonic-gate/* getipnodeby.c */ 4227c478bd9Sstevel@tonic-gatevoid freehostent(struct hostent *hent); 4237c478bd9Sstevel@tonic-gatestruct hostent *getipnodebyaddr(const void *src, size_t len, int type, 4247c478bd9Sstevel@tonic-gate int *error_num); 4257c478bd9Sstevel@tonic-gatestruct hostent *getipnodebyname(const char *name, int af, int flags, 4267c478bd9Sstevel@tonic-gate int *error_num); 4277c478bd9Sstevel@tonic-gate 4287c478bd9Sstevel@tonic-gate/* getrpcent.c */ 4297c478bd9Sstevel@tonic-gatestruct rpcent *getrpcbyname(const char *nam); 4307c478bd9Sstevel@tonic-gatestruct rpcent *getrpcbynumber(const int num); 4317c478bd9Sstevel@tonic-gatestruct rpcent *getrpcent(void); 4327c478bd9Sstevel@tonic-gate 4337c478bd9Sstevel@tonic-gate/* getrpcent_r.c */ 4347c478bd9Sstevel@tonic-gatestruct rpcent *getrpcbyname_r(const char *name, struct rpcent *result, 4357c478bd9Sstevel@tonic-gate char *buffer, int buflen); 4367c478bd9Sstevel@tonic-gatestruct rpcent *getrpcbynumber_r(const int number, struct rpcent *result, 4377c478bd9Sstevel@tonic-gate char *buffer, int buflen); 4387c478bd9Sstevel@tonic-gatevoid setrpcent(const int stay); 4397c478bd9Sstevel@tonic-gatevoid endrpcent(void); 4407c478bd9Sstevel@tonic-gatestruct rpcent *getrpcent_r(struct rpcent *result, char *buffer, int buflen); 4417c478bd9Sstevel@tonic-gate 442*9b241b4eSYuri Pankov/* inet_matchaddr.c */ 443*9b241b4eSYuri Pankovboolean_t inet_matchaddr(const void *, const char *); 444*9b241b4eSYuri Pankov 4457c478bd9Sstevel@tonic-gate/* inet_ntop.c */ 4467c478bd9Sstevel@tonic-gateconst char *inet_ntop(int af, const void *src, char *dst, socklen_t size); 4477c478bd9Sstevel@tonic-gate 4487c478bd9Sstevel@tonic-gate/* inet_pton.c */ 4497c478bd9Sstevel@tonic-gateint inet_pton(int af, const char *src, void *dst); 4507c478bd9Sstevel@tonic-gate 4517c478bd9Sstevel@tonic-gate/* netdir_inet.c */ 4527c478bd9Sstevel@tonic-gateint _get_hostserv_inetnetdir_byname(struct netconfig *nconf, 4537c478bd9Sstevel@tonic-gate struct nss_netdirbyname_in *args, 4547c478bd9Sstevel@tonic-gate union nss_netdirbyname_out *res); 4557c478bd9Sstevel@tonic-gateint _get_hostserv_inetnetdir_byaddr(struct netconfig *nconf, 4567c478bd9Sstevel@tonic-gate struct nss_netdirbyaddr_in *args, 4577c478bd9Sstevel@tonic-gate union nss_netdirbyaddr_out *res); 4587c478bd9Sstevel@tonic-gateint __nss2herrno(nss_status_t nsstat); 4597c478bd9Sstevel@tonic-gatenss_status_t _herrno2nss(int h_errno); 4607c478bd9Sstevel@tonic-gatestruct hostent *_switch_gethostbyname_r(const char *name, 4617c478bd9Sstevel@tonic-gate struct hostent *result, 4627c478bd9Sstevel@tonic-gate char *buffer, int buflen, int *h_errnop); 4637c478bd9Sstevel@tonic-gatestruct hostent *_switch_gethostbyaddr_r(const char *addr, int len, int type, 4647c478bd9Sstevel@tonic-gate struct hostent *result, 4657c478bd9Sstevel@tonic-gate char *buffer, int buflen, int *h_errnop); 4667c478bd9Sstevel@tonic-gateint str2servent(const char *instr, int lenstr, void *ent, 4677c478bd9Sstevel@tonic-gate char *buffer, int buflen); 4687c478bd9Sstevel@tonic-gatevoid *__inet_get_local_interfaces(void); 4697c478bd9Sstevel@tonic-gatevoid __inet_free_local_interfaces(void *p); 4707c478bd9Sstevel@tonic-gateint __inet_address_is_local(void *p, struct in_addr addr); 4717c478bd9Sstevel@tonic-gateint __inet_uaddr_is_local(void *p, struct netconfig *nc, char *uaddr); 4727c478bd9Sstevel@tonic-gateint __inet_address_count(void *p); 4737c478bd9Sstevel@tonic-gateulong_t __inet_get_addr(void *p, int n); 4747c478bd9Sstevel@tonic-gatechar *__inet_get_uaddr(void *p, struct netconfig *nc, int n); 4757c478bd9Sstevel@tonic-gatechar *__inet_get_networka(void *p, int n); 4767c478bd9Sstevel@tonic-gate 4777c478bd9Sstevel@tonic-gate/* netdir_inet_sundry.c */ 4787c478bd9Sstevel@tonic-gate 4797c478bd9Sstevel@tonic-gate/* 4807c478bd9Sstevel@tonic-gate * usr/src/lib/libnsl/rpc routines 4817c478bd9Sstevel@tonic-gate */ 4827c478bd9Sstevel@tonic-gate 4837c478bd9Sstevel@tonic-gate/* auth_des.c */ 4847c478bd9Sstevel@tonic-gateAUTH *authdes_seccreate(const char *servername, uint_t win, 4857c478bd9Sstevel@tonic-gate const char *timehost, const des_block *ckey); 4867c478bd9Sstevel@tonic-gate 4877c478bd9Sstevel@tonic-gate/* auth_none.c */ 4887c478bd9Sstevel@tonic-gateAUTH *authnone_create(void); 4897c478bd9Sstevel@tonic-gate 4907c478bd9Sstevel@tonic-gate/* auth_sys.c */ 4917c478bd9Sstevel@tonic-gateAUTH *authsys_create(const char *machname, uid_t uid, gid_t gid, int len, 4927c478bd9Sstevel@tonic-gate const gid_t *aup_gids); 4937c478bd9Sstevel@tonic-gateAUTH *authsys_create_default(void); 4947c478bd9Sstevel@tonic-gate 4957c478bd9Sstevel@tonic-gate/* auth_time.c */ 4967c478bd9Sstevel@tonic-gate 4977c478bd9Sstevel@tonic-gate/* authdes_prot.c */ 4987c478bd9Sstevel@tonic-gatebool_t xdr_authdes_cred(XDR *xdrs, struct authdes_cred *cred); 4997c478bd9Sstevel@tonic-gatebool_t xdr_authdes_verf(XDR *xdrs, struct authdes_verf *verf); 5007c478bd9Sstevel@tonic-gate 5017c478bd9Sstevel@tonic-gate/* authsys_prot.c */ 5027c478bd9Sstevel@tonic-gatebool_t xdr_authsys_parms(XDR *xdrs, struct authsys_parms *p); 5037c478bd9Sstevel@tonic-gatebool_t xdr_uid_t(XDR *xdrs, uid_t *ip); 5047c478bd9Sstevel@tonic-gatebool_t xdr_gid_t(XDR *xdrs, gid_t *ip); 5057c478bd9Sstevel@tonic-gate 5067c478bd9Sstevel@tonic-gate/* clnt_bcast.c */ 5077c478bd9Sstevel@tonic-gateenum clnt_stat rpc_broadcast_exp(rpcprog_t prog, rpcvers_t vers, rpcproc_t proc, 5087c478bd9Sstevel@tonic-gate xdrproc_t xargs, caddr_t argsp, xdrproc_t xresults, 5097c478bd9Sstevel@tonic-gate caddr_t resultsp, resultproc_t eachresult, int inittime, 5107c478bd9Sstevel@tonic-gate int waittime, const char *netclass); 5117c478bd9Sstevel@tonic-gateenum clnt_stat rpc_broadcast(rpcprog_t prog, rpcvers_t vers, rpcproc_t proc, 5127c478bd9Sstevel@tonic-gate xdrproc_t xargs, caddr_t argsp, xdrproc_t xresults, 5137c478bd9Sstevel@tonic-gate caddr_t resultsp, resultproc_t eachresult, 5147c478bd9Sstevel@tonic-gate const char *netclass); 5157c478bd9Sstevel@tonic-gate 5167c478bd9Sstevel@tonic-gate/* clnt_dg.c */ 5177c478bd9Sstevel@tonic-gateCLIENT *clnt_dg_create(int fd, struct netbuf *svcaddr, rpcprog_t program, 5187c478bd9Sstevel@tonic-gate rpcvers_t version, uint_t sendsz, uint_t recvsz); 5197c478bd9Sstevel@tonic-gate 5207c478bd9Sstevel@tonic-gate/* clnt_door.c */ 5217c478bd9Sstevel@tonic-gateCLIENT *clnt_door_create(rpcprog_t program, rpcvers_t version, uint_t sendsz); 5227c478bd9Sstevel@tonic-gate 5237c478bd9Sstevel@tonic-gate/* clnt_generic.c */ 5247c478bd9Sstevel@tonic-gateCLIENT *clnt_create_vers(const char *hostname, rpcprog_t prog, 5257c478bd9Sstevel@tonic-gate rpcvers_t *vers_out, rpcvers_t vers_low, 5267c478bd9Sstevel@tonic-gate rpcvers_t vers_high, const char *nettype); 5277c478bd9Sstevel@tonic-gateCLIENT *clnt_create_vers_timed(const char *hostname, rpcprog_t prog, 5287c478bd9Sstevel@tonic-gate rpcvers_t *vers_out, rpcvers_t vers_low, 5297c478bd9Sstevel@tonic-gate rpcvers_t vers_high, const char *nettype, 5307c478bd9Sstevel@tonic-gate const struct timeval *tp); 5317c478bd9Sstevel@tonic-gateCLIENT *clnt_create(const char *hostname, rpcprog_t prog, rpcvers_t vers, 5327c478bd9Sstevel@tonic-gate const char *nettype); 5337c478bd9Sstevel@tonic-gateCLIENT *clnt_create_timed(const char *hostname, rpcprog_t prog, rpcvers_t vers, 5347c478bd9Sstevel@tonic-gate const char *netclass, const struct timeval *tp); 5357c478bd9Sstevel@tonic-gateCLIENT *clnt_tp_create(const char *hostname, rpcprog_t prog, rpcvers_t vers, 5367c478bd9Sstevel@tonic-gate const struct netconfig *nconf); 5377c478bd9Sstevel@tonic-gateCLIENT *clnt_tp_create_timed(const char *hostname, rpcprog_t prog, 5387c478bd9Sstevel@tonic-gate rpcvers_t vers, const struct netconfig *nconf, 5397c478bd9Sstevel@tonic-gate const struct timeval *tp); 5407c478bd9Sstevel@tonic-gateCLIENT *clnt_tli_create(int fd, const struct netconfig *nconf, 5417c478bd9Sstevel@tonic-gate struct netbuf *svcaddr, rpcprog_t prog, rpcvers_t vers, 5427c478bd9Sstevel@tonic-gate uint_t sendsz, uint_t recvsz); 5437c478bd9Sstevel@tonic-gate 5447c478bd9Sstevel@tonic-gate/* clnt_perror.c */ 5457c478bd9Sstevel@tonic-gatechar *clnt_sperror(const CLIENT *cl, const char *s); 5467c478bd9Sstevel@tonic-gatevoid clnt_perror(const CLIENT *cl, const char *s); 5477c478bd9Sstevel@tonic-gatevoid clnt_perrno(enum clnt_stat num); 5487c478bd9Sstevel@tonic-gatechar *clnt_spcreateerror(const char *s); 5497c478bd9Sstevel@tonic-gatevoid clnt_pcreateerror(const char *s); 5507c478bd9Sstevel@tonic-gateconst char *clnt_sperrno(const enum clnt_stat stat); 5517c478bd9Sstevel@tonic-gate 5527c478bd9Sstevel@tonic-gate/* clnt_raw.c */ 5537c478bd9Sstevel@tonic-gateCLIENT *clnt_raw_create(rpcprog_t prog, rpcvers_t vers); 5547c478bd9Sstevel@tonic-gate 5557c478bd9Sstevel@tonic-gate/* clnt_simple.c */ 5567c478bd9Sstevel@tonic-gateenum clnt_stat rpc_call(const char *host, rpcprog_t prognum, rpcvers_t versnum, 5577c478bd9Sstevel@tonic-gate rpcproc_t procnum, xdrproc_t inproc, const char *in, 5587c478bd9Sstevel@tonic-gate xdrproc_t outproc, char *out, const char *netclass); 5597c478bd9Sstevel@tonic-gate 5607c478bd9Sstevel@tonic-gate/* clnt_vc.c */ 5617c478bd9Sstevel@tonic-gateCLIENT *clnt_vc_create(int fd, struct netbuf *svcaddr, rpcprog_t prog, 5627c478bd9Sstevel@tonic-gate rpcvers_t vers, uint_t sendsz, uint_t recvsz); 5637c478bd9Sstevel@tonic-gate 5647c478bd9Sstevel@tonic-gate/* getdname.c */ 5657c478bd9Sstevel@tonic-gateint getdomainname(char *name, int namelen); 5667c478bd9Sstevel@tonic-gateint setdomainname(char *domain, int len); 5677c478bd9Sstevel@tonic-gate 5687c478bd9Sstevel@tonic-gate/* gethostname.c */ 5697c478bd9Sstevel@tonic-gateint gethostname(char *hname, int hlen); 5707c478bd9Sstevel@tonic-gate 5717c478bd9Sstevel@tonic-gate/* inet_ntoa.c */ 5727c478bd9Sstevel@tonic-gatechar *inet_ntoa_r(struct in_addr in, char b[]); 5737c478bd9Sstevel@tonic-gatechar *inet_ntoa(struct in_addr in); 5747c478bd9Sstevel@tonic-gatein_addr_t inet_addr(const char *cp); 5757c478bd9Sstevel@tonic-gatein_addr_t inet_netof(struct in_addr in); 5767c478bd9Sstevel@tonic-gate 5777c478bd9Sstevel@tonic-gate/* key_call.c */ 5787c478bd9Sstevel@tonic-gateint key_setsecret(const char *secretkey); 5797c478bd9Sstevel@tonic-gateint key_secretkey_is_set(void); 58061961e0fSrobinsonint key_encryptsession_pk(const char *remotename, netobj *remotekey, 5817c478bd9Sstevel@tonic-gate des_block *deskey); 58261961e0fSrobinsonint key_decryptsession_pk(const char *remotename, netobj *remotekey, 5837c478bd9Sstevel@tonic-gate des_block *deskey); 5847c478bd9Sstevel@tonic-gate 5857c478bd9Sstevel@tonic-gateint key_encryptsession(const char *remotename, des_block *deskey); 5867c478bd9Sstevel@tonic-gateint key_decryptsession(const char *remotename, des_block *deskey); 5877c478bd9Sstevel@tonic-gateint key_gendes(des_block *key); 5887c478bd9Sstevel@tonic-gateint key_setnet(struct key_netstarg *arg); 5897c478bd9Sstevel@tonic-gateint key_get_conv(char *pkey, des_block *deskey); 5907c478bd9Sstevel@tonic-gateint key_call(ulong_t proc, xdrproc_t xdr_arg, char *arg, xdrproc_t xdr_rslt, 5917c478bd9Sstevel@tonic-gate char *rslt); 5927c478bd9Sstevel@tonic-gate 5937c478bd9Sstevel@tonic-gate/* key_prot.c */ 59461961e0fSrobinsonbool_t xdr_keystatus(XDR *xdrs, keystatus *objp); 59561961e0fSrobinsonbool_t xdr_keybuf(XDR *xdrs, keybuf objp); 59661961e0fSrobinsonbool_t xdr_netnamestr(XDR *xdrs, netnamestr *objp); 59761961e0fSrobinsonbool_t xdr_cryptkeyarg(XDR *xdrs, cryptkeyarg *objp); 59861961e0fSrobinsonbool_t xdr_cryptkeyarg2(XDR *xdrs, cryptkeyarg2 *objp); 59961961e0fSrobinsonbool_t xdr_cryptkeyres(XDR *xdrs, cryptkeyres *objp); 60061961e0fSrobinsonbool_t xdr_unixcred(XDR *xdrs, unixcred *objp); 60161961e0fSrobinsonbool_t xdr_getcredres(XDR *xdrs, getcredres *objp); 60261961e0fSrobinsonbool_t xdr_key_netstarg(XDR *xdrs, key_netstarg *objp); 60361961e0fSrobinsonbool_t xdr_key_netstres(XDR *xdrs, key_netstres *objp); 6047c478bd9Sstevel@tonic-gate 6057c478bd9Sstevel@tonic-gate/* mt_misc.c */ 6067c478bd9Sstevel@tonic-gate#ifdef rpc_createerr 6077c478bd9Sstevel@tonic-gate#undef rpc_createerr 6087c478bd9Sstevel@tonic-gate#endif 6097c478bd9Sstevel@tonic-gatestruct rpc_createerr *__rpc_createerr(void); 6107c478bd9Sstevel@tonic-gate 6117c478bd9Sstevel@tonic-gate/* netname.c */ 6127c478bd9Sstevel@tonic-gateint getnetname(char *name); 6137c478bd9Sstevel@tonic-gateint __getnetnamebyuid(char *name, uid_t uid); 6147c478bd9Sstevel@tonic-gateint user2netname(char *netname, const uid_t uid, const char *domain); 6157c478bd9Sstevel@tonic-gateint host2netname(char *netname, const char *host, const char *domain); 6167c478bd9Sstevel@tonic-gate 6177c478bd9Sstevel@tonic-gate/* netnamer.c */ 6187c478bd9Sstevel@tonic-gateint netname2user(const char *netname, uid_t *uidp, gid_t *gidp, 6197c478bd9Sstevel@tonic-gate int *gidlenp, gid_t *gidlist); 6207c478bd9Sstevel@tonic-gateint netname2host(const char *netname, char *hostname, int hostlen); 6217c478bd9Sstevel@tonic-gate 6227c478bd9Sstevel@tonic-gate/* openchild.c */ 6237c478bd9Sstevel@tonic-gate 6247c478bd9Sstevel@tonic-gate/* pmap_clnt.c */ 6257c478bd9Sstevel@tonic-gateint pmap_set(rpcprog_t program, rpcvers_t version, rpcprot_t protocol, ushort_t port); 6267c478bd9Sstevel@tonic-gatebool_t pmap_unset(rpcprog_t program, rpcvers_t version); 6277c478bd9Sstevel@tonic-gateushort_t pmap_getport(struct sockaddr_in *address, rpcprog_t program, 6287c478bd9Sstevel@tonic-gate rpcvers_t version, rpcprot_t protocol); 6297c478bd9Sstevel@tonic-gatestruct pmaplist *pmap_getmaps(struct sockaddr_in *address); 6307c478bd9Sstevel@tonic-gateenum clnt_stat pmap_rmtcall(struct sockaddr_in *addr, rpcprog_t prog, 6317c478bd9Sstevel@tonic-gate rpcvers_t vers, rpcproc_t proc, xdrproc_t xdrargs, 6327c478bd9Sstevel@tonic-gate caddr_t argsp, xdrproc_t xdrres, caddr_t resp, 6337c478bd9Sstevel@tonic-gate struct timeval tout, rpcport_t *port_ptr); 6347c478bd9Sstevel@tonic-gate 6357c478bd9Sstevel@tonic-gate/* pmap_prot.c */ 6367c478bd9Sstevel@tonic-gatebool_t xdr_pmap(XDR *xdrs, struct pmap *objp); 6377c478bd9Sstevel@tonic-gatebool_t xdr_pmaplist_ptr(XDR *xdrs, pmaplist_ptr *rp); 6387c478bd9Sstevel@tonic-gatebool_t xdr_pmaplist(XDR *xdrs, PMAPLIST **rp); 6397c478bd9Sstevel@tonic-gatebool_t xdr_rmtcallargs(XDR *xdrs, struct p_rmtcallargs *cap); 6407c478bd9Sstevel@tonic-gatebool_t xdr_rmtcallres(XDR *xdrs, struct p_rmtcallres *crp); 6417c478bd9Sstevel@tonic-gate 6427c478bd9Sstevel@tonic-gate/* rpc_callmsg.c */ 6437c478bd9Sstevel@tonic-gatebool_t xdr_callmsg(XDR *xdrs, struct rpc_msg *cmsg); 6447c478bd9Sstevel@tonic-gate 6457c478bd9Sstevel@tonic-gate/* rpc_comdata.c */ 6467c478bd9Sstevel@tonic-gate 6477c478bd9Sstevel@tonic-gate/* rpc_generic.c */ 6487c478bd9Sstevel@tonic-gateint __rpc_dtbsize(void); 6497c478bd9Sstevel@tonic-gateuint_t __rpc_get_t_size(t_scalar_t size, t_scalar_t bufsize); 6507c478bd9Sstevel@tonic-gateuint_t __rpc_get_a_size(t_scalar_t size); 6517c478bd9Sstevel@tonic-gatestruct netconfig *__rpc_getconfip(char *nettype); 6527c478bd9Sstevel@tonic-gatevoid *__rpc_setconf(char *nettype); 6537c478bd9Sstevel@tonic-gatestruct netconfig *__rpc_getconf(void *vhandle); 6547c478bd9Sstevel@tonic-gatevoid __rpc_endconf(void *vhandle); 6557c478bd9Sstevel@tonic-gatestruct netconfig *__rpcfd_to_nconf(int fd, int servtype); 6567c478bd9Sstevel@tonic-gateint __rpc_matchserv(int servtype, unsigned int nc_semantics); 6577c478bd9Sstevel@tonic-gate 6587c478bd9Sstevel@tonic-gate/* rpc_prot.c */ 6597c478bd9Sstevel@tonic-gatebool_t xdr_opaque_auth(XDR *xdrs, struct opaque_auth *ap); 6607c478bd9Sstevel@tonic-gatebool_t xdr_des_block(XDR *xdrs, des_block *blkp); 6617c478bd9Sstevel@tonic-gatebool_t xdr_accepted_reply(XDR *xdrs, struct accepted_reply *ar); 6627c478bd9Sstevel@tonic-gatebool_t xdr_rejected_reply(XDR *xdrs, struct rejected_reply *rr); 6637c478bd9Sstevel@tonic-gatebool_t xdr_replymsg(XDR *xdrs, struct rpc_msg *rmsg); 6647c478bd9Sstevel@tonic-gatebool_t xdr_callhdr(XDR *xdrs, struct rpc_msg *cmsg); 6657c478bd9Sstevel@tonic-gatevoid __seterr_reply(struct rpc_msg *msg, struct rpc_err *error); 6667c478bd9Sstevel@tonic-gate 6677c478bd9Sstevel@tonic-gate/* rpc_sel2poll.c */ 6687c478bd9Sstevel@tonic-gateint __rpc_select_to_poll(int fdmax, fd_set *fdset, struct pollfd *p0); 6697c478bd9Sstevel@tonic-gateint __rpc_timeval_to_msec(struct timeval *t); 6707c478bd9Sstevel@tonic-gate 6717c478bd9Sstevel@tonic-gate/* rpc_soc.c */ 6727c478bd9Sstevel@tonic-gateCLIENT *clntudp_bufcreate(struct sockaddr_in *raddr, rpcprog_t prog, 6737c478bd9Sstevel@tonic-gate rpcvers_t vers, struct timeval wait, int *sockp, 6747c478bd9Sstevel@tonic-gate uint_t sendsz, uint_t recvsz); 6757c478bd9Sstevel@tonic-gateCLIENT *clntudp_create(struct sockaddr_in *raddr, rpcprog_t program, 6767c478bd9Sstevel@tonic-gate rpcvers_t version, struct timeval wait, int *sockp); 6777c478bd9Sstevel@tonic-gateCLIENT *clnttcp_create(struct sockaddr_in *raddr, rpcprog_t prog, 6787c478bd9Sstevel@tonic-gate rpcvers_t vers, int *sockp, uint_t sendsz, 6797c478bd9Sstevel@tonic-gate uint_t recvsz); 6807c478bd9Sstevel@tonic-gateCLIENT *clntraw_create(rpcprog_t prog, rpcvers_t vers); 6817c478bd9Sstevel@tonic-gateSVCXPRT *svctcp_create(int fd, uint_t sendsize, uint_t recvsize); 6827c478bd9Sstevel@tonic-gateSVCXPRT *svcudp_bufcreate(int fd, uint_t sendsize, uint_t recvsize); 6837c478bd9Sstevel@tonic-gateSVCXPRT *svcfd_create(int fd, uint_t sendsize, uint_t recvsize); 6847c478bd9Sstevel@tonic-gateSVCXPRT *svcudp_create(int fd); 6857c478bd9Sstevel@tonic-gateSVCXPRT *svcraw_create(void); 6867c478bd9Sstevel@tonic-gateint __rpc_bindresvport(int fd, struct sockaddr_in *sin, int *portp, int qlen); 6877c478bd9Sstevel@tonic-gatevoid get_myaddress(struct sockaddr_in *addr); 6887c478bd9Sstevel@tonic-gateushort_t getrpcport(char *host, rpcprog_t prognum, rpcvers_t versnum, rpcprot_t proto); 6897c478bd9Sstevel@tonic-gateint callrpc(char *host, rpcprog_t prognum, rpcvers_t versnum, rpcproc_t procnum, 6907c478bd9Sstevel@tonic-gate xdrproc_t inproc, char *in, xdrproc_t outproc, char *out); 6917c478bd9Sstevel@tonic-gateint registerrpc(rpcprog_t prognum, rpcvers_t versnum, rpcproc_t procnum, 6927c478bd9Sstevel@tonic-gate char *(*progname)(), xdrproc_t inproc, xdrproc_t outproc); 6937c478bd9Sstevel@tonic-gateenum clnt_stat clnt_broadcast(rpcprog_t prog, rpcvers_t vers, rpcproc_t proc, 6947c478bd9Sstevel@tonic-gate xdrproc_t xargs, caddr_t argsp, xdrproc_t xresults, 6957c478bd9Sstevel@tonic-gate caddr_t resultsp, resultproc_t eachresult); 6967c478bd9Sstevel@tonic-gateAUTH *authdes_create(char *servername, uint_t window, 6977c478bd9Sstevel@tonic-gate struct sockaddr_in *syncaddr, des_block *ckey); 6987c478bd9Sstevel@tonic-gate 6997c478bd9Sstevel@tonic-gate/* rpc_td.c */ 7007c478bd9Sstevel@tonic-gate 7017c478bd9Sstevel@tonic-gate/* rpcb_clnt.c */ 7027c478bd9Sstevel@tonic-gatebool_t __rpc_control(int request, void *info); 7037c478bd9Sstevel@tonic-gatebool_t rpcb_set(rpcprog_t program, rpcvers_t version, 7047c478bd9Sstevel@tonic-gate const struct netconfig *nconf, const struct netbuf *address); 7057c478bd9Sstevel@tonic-gatebool_t rpcb_unset(rpcprog_t program, rpcvers_t version, 7067c478bd9Sstevel@tonic-gate const struct netconfig *nconf); 7077c478bd9Sstevel@tonic-gateint rpcb_getaddr(rpcprog_t program, rpcvers_t version, 7087c478bd9Sstevel@tonic-gate const struct netconfig *nconf, struct netbuf *address, 7097c478bd9Sstevel@tonic-gate const char *host); 7107c478bd9Sstevel@tonic-gaterpcblist *rpcb_getmaps(const struct netconfig *nconf, const char *host); 7117c478bd9Sstevel@tonic-gateenum clnt_stat rpcb_rmtcall(const struct netconfig *nconf, const char *host, 7127c478bd9Sstevel@tonic-gate rpcprog_t prog, rpcvers_t vers, rpcproc_t proc, 7137c478bd9Sstevel@tonic-gate xdrproc_t xdrargs, caddr_t argsp, xdrproc_t xdrres, 7147c478bd9Sstevel@tonic-gate caddr_t resp, struct timeval tout, 7157c478bd9Sstevel@tonic-gate struct netbuf *addr_ptr); 7167c478bd9Sstevel@tonic-gatebool_t rpcb_gettime(const char *host, time_t *timep); 7177c478bd9Sstevel@tonic-gatechar *rpcb_taddr2uaddr(struct netconfig *nconf, struct netbuf *taddr); 7187c478bd9Sstevel@tonic-gatestruct netbuf *rpcb_uaddr2taddr(struct netconfig *nconf, char *uaddr); 7197c478bd9Sstevel@tonic-gate 7207c478bd9Sstevel@tonic-gate/* rpcb_prot.c */ 7217c478bd9Sstevel@tonic-gatebool_t xdr_rpcb(XDR *xdrs, RPCB *objp); 7227c478bd9Sstevel@tonic-gatebool_t xdr_rpcblist_ptr(XDR *xdrs, rpcblist_ptr *rp); 7237c478bd9Sstevel@tonic-gatebool_t xdr_rpcblist(XDR *xdrs, RPCBLIST **rp); 7247c478bd9Sstevel@tonic-gatebool_t xdr_rpcb_entry(XDR *xdrs, rpcb_entry *objp); 7257c478bd9Sstevel@tonic-gatebool_t xdr_rpcb_entry_list_ptr(XDR *xdrs, rpcb_entry_list_ptr *rp); 7267c478bd9Sstevel@tonic-gatebool_t xdr_rpcb_rmtcallargs(XDR *xdrs, struct r_rpcb_rmtcallargs *objp); 7277c478bd9Sstevel@tonic-gatebool_t xdr_rpcb_rmtcallres(XDR *xdrs, struct r_rpcb_rmtcallres *objp); 7287c478bd9Sstevel@tonic-gatebool_t xdr_netbuf(XDR *xdrs, struct netbuf *objp); 7297c478bd9Sstevel@tonic-gate 7307c478bd9Sstevel@tonic-gate/* rpcb_st_xdr.c */ 7317c478bd9Sstevel@tonic-gatebool_t xdr_rpcbs_addrlist(XDR *xdrs, rpcbs_addrlist *objp); 7327c478bd9Sstevel@tonic-gatebool_t xdr_rpcbs_addrlist(XDR *xdrs, rpcbs_addrlist *objp); 7337c478bd9Sstevel@tonic-gate 7347c478bd9Sstevel@tonic-gatebool_t xdr_rpcbs_rmtcalllist(XDR *xdrs, rpcbs_rmtcalllist *objp); 7357c478bd9Sstevel@tonic-gatebool_t xdr_rpcbs_proc(XDR *xdrs, rpcbs_proc objp); 7367c478bd9Sstevel@tonic-gatebool_t xdr_rpcbs_addrlist_ptr(XDR *xdrs, rpcbs_addrlist_ptr *objp); 7377c478bd9Sstevel@tonic-gatebool_t xdr_rpcbs_rmtcalllist_ptr(XDR *xdrs, rpcbs_rmtcalllist_ptr *objp); 7387c478bd9Sstevel@tonic-gatebool_t xdr_rpcb_stat(XDR *xdrs, rpcb_stat *objp); 7397c478bd9Sstevel@tonic-gatebool_t xdr_rpcb_stat_byvers(XDR *xdrs, rpcb_stat_byvers objp); 7407c478bd9Sstevel@tonic-gate 7417c478bd9Sstevel@tonic-gate/* rpcdname.c */ 7427c478bd9Sstevel@tonic-gateint __rpc_get_default_domain(char **domain); 7437c478bd9Sstevel@tonic-gate 7447c478bd9Sstevel@tonic-gate/* rpcsec_gss_if.c */ 7457c478bd9Sstevel@tonic-gateAUTH *rpc_gss_seccreate(CLIENT *clnt, char *principal, char *mechanism, 7467c478bd9Sstevel@tonic-gate rpc_gss_service_t service_type, char *qop, 7477c478bd9Sstevel@tonic-gate rpc_gss_options_req_t *options_req, 7487c478bd9Sstevel@tonic-gate rpc_gss_options_ret_t *options_ret); 7497c478bd9Sstevel@tonic-gatebool_t rpc_gss_set_defaults(AUTH *auth, rpc_gss_service_t service, char *qop); 7507c478bd9Sstevel@tonic-gatebool_t rpc_gss_get_principal_name(rpc_gss_principal_t *principal, char 7517c478bd9Sstevel@tonic-gate *mechanism, char *user_name, char *node, char *secdomain); 7527c478bd9Sstevel@tonic-gatechar **rpc_gss_get_mechanisms(void); 7537c478bd9Sstevel@tonic-gatechar **rpc_gss_get_mech_info(char *mechanism, rpc_gss_service_t *service); 7547c478bd9Sstevel@tonic-gatebool_t rpc_gss_get_versions(u_int *vers_hi, u_int *vers_lo); 7557c478bd9Sstevel@tonic-gatebool_t rpc_gss_is_installed(char *mechanism); 7567c478bd9Sstevel@tonic-gatebool_t rpc_gss_set_svc_name(char *principal, char *mechanism, uint_t req_time, 7577c478bd9Sstevel@tonic-gate uint_t program, uint_t version); 7587c478bd9Sstevel@tonic-gatebool_t rpc_gss_set_callback(rpc_gss_callback_t *cb); 7597c478bd9Sstevel@tonic-gatebool_t rpc_gss_getcred(struct svc_req *req, rpc_gss_rawcred_t **rcred, 7607c478bd9Sstevel@tonic-gate rpc_gss_ucred_t **ucred, void **cookie); 7617c478bd9Sstevel@tonic-gatebool_t rpc_gss_mech_to_oid(char *mech, rpc_gss_OID *oid); 7627c478bd9Sstevel@tonic-gatebool_t rpc_gss_qop_to_num(char *qop, char *mech, u_int *num); 7637c478bd9Sstevel@tonic-gateint rpc_gss_max_data_length(AUTH *rpcgss_handle, int max_tp_unit_len); 7647c478bd9Sstevel@tonic-gateint rpc_gss_svc_max_data_length(struct svc_req *req, int max_tp_unit_len); 7657c478bd9Sstevel@tonic-gatevoid rpc_gss_get_error(rpc_gss_error_t *error); 7667c478bd9Sstevel@tonic-gate 7677c478bd9Sstevel@tonic-gate/* rtime_tli.c */ 7687c478bd9Sstevel@tonic-gateint rtime_tli(char *host, struct timeval *timep, struct timeval *timeout); 7697c478bd9Sstevel@tonic-gate 7707c478bd9Sstevel@tonic-gate/* svc.c */ 7717c478bd9Sstevel@tonic-gatevoid xprt_register(const SVCXPRT *xprt); 7727c478bd9Sstevel@tonic-gatevoid xprt_unregister(const SVCXPRT *xprt); 7737c478bd9Sstevel@tonic-gatebool_t svc_reg(const SVCXPRT *xprt, rpcprog_t prog, rpcvers_t vers, 7747c478bd9Sstevel@tonic-gate void (*dispatch)(), const struct netconfig *nconf); 7757c478bd9Sstevel@tonic-gatevoid svc_unreg(rpcprog_t prog, rpcvers_t vers); 7767c478bd9Sstevel@tonic-gatebool_t svc_register(SVCXPRT *xprt, rpcprog_t prog, rpcvers_t vers, 7777c478bd9Sstevel@tonic-gate void (*dispatch)(), int protocol); 7787c478bd9Sstevel@tonic-gatevoid svc_unregister(rpcprog_t prog, rpcvers_t vers); 7797c478bd9Sstevel@tonic-gatebool_t svc_sendreply(const SVCXPRT *xprt, xdrproc_t xdr_results, 7807c478bd9Sstevel@tonic-gate caddr_t xdr_location); 7817c478bd9Sstevel@tonic-gatevoid svcerr_noproc(const SVCXPRT *xprt); 7827c478bd9Sstevel@tonic-gatevoid svcerr_decode(const SVCXPRT *xprt); 7837c478bd9Sstevel@tonic-gatevoid svcerr_systemerr(const SVCXPRT *xprt); 7847c478bd9Sstevel@tonic-gatevoid svcerr_auth(const SVCXPRT *xprt, enum auth_stat why); 7857c478bd9Sstevel@tonic-gatevoid svcerr_weakauth(const SVCXPRT *xprt); 7867c478bd9Sstevel@tonic-gatevoid svcerr_noprog(const SVCXPRT *xprt); 7877c478bd9Sstevel@tonic-gatevoid svcerr_progvers(const SVCXPRT *xprt, rpcvers_t low_vers, 7887c478bd9Sstevel@tonic-gate rpcvers_t high_vers); 7897c478bd9Sstevel@tonic-gatevoid svc_getreq(int rdfds); 7907c478bd9Sstevel@tonic-gatevoid svc_getreqset(fd_set *readfds); 7917c478bd9Sstevel@tonic-gatevoid svc_getreq_poll(struct pollfd *pfdp, int pollretval); 7927c478bd9Sstevel@tonic-gatevoid svc_getreq_common(int fd); 7937c478bd9Sstevel@tonic-gateSVCXPRT *svc_xprt_alloc(void); 7947c478bd9Sstevel@tonic-gatevoid svc_xprt_free(SVCXPRT *xprt); 7957c478bd9Sstevel@tonic-gatebool_t svc_get_local_cred(SVCXPRT *xprt, svc_local_cred_t *lcred); 7967c478bd9Sstevel@tonic-gateSVCAUTH *__svc_get_svcauth(SVCXPRT *); 7977c478bd9Sstevel@tonic-gatevoid *__svc_set_proc_cleanup_cb(void *cb); 7987c478bd9Sstevel@tonic-gate 7997c478bd9Sstevel@tonic-gate/* svc_auth.c */ 8007c478bd9Sstevel@tonic-gateenum auth_stat __authenticate(struct svc_req *rqst, struct rpc_msg *msg); 8017c478bd9Sstevel@tonic-gateint svc_auth_reg(int cred_flavor, enum auth_stat (*handler)()); 8027c478bd9Sstevel@tonic-gate 8037c478bd9Sstevel@tonic-gate/* svc_auth_sys.c */ 8047c478bd9Sstevel@tonic-gate 8057c478bd9Sstevel@tonic-gate/* svc_dg.c */ 8067c478bd9Sstevel@tonic-gateSVCXPRT *svc_dg_create(int fd, uint_t sendsize, uint_t recvsize); 8077c478bd9Sstevel@tonic-gateint svc_dg_enablecache(SVCXPRT *xprt, uint_t size); 8087c478bd9Sstevel@tonic-gate 8097c478bd9Sstevel@tonic-gate/* svc_door.c */ 8107c478bd9Sstevel@tonic-gateSVCXPRT *svc_door_create(void (*dispatch)(), rpcprog_t prognum, 8117c478bd9Sstevel@tonic-gate rpcvers_t versnum, uint_t sendsize); 8127c478bd9Sstevel@tonic-gate 8137c478bd9Sstevel@tonic-gate/* svc_generic.c */ 8147c478bd9Sstevel@tonic-gateint svc_create(void (*dispatch)(), rpcprog_t prognum, rpcvers_t versnum, 8157c478bd9Sstevel@tonic-gate const char *nettype); 8167c478bd9Sstevel@tonic-gateSVCXPRT *svc_tp_create(void (*dispatch)(), rpcprog_t prognum, rpcvers_t versnum, 8177c478bd9Sstevel@tonic-gate const struct netconfig *nconf); 8187c478bd9Sstevel@tonic-gateSVCXPRT *svc_tli_create(int fd, const struct netconfig *nconf, 8197c478bd9Sstevel@tonic-gate const struct t_bind *bindaddr, uint_t sendsz, 8207c478bd9Sstevel@tonic-gate uint_t recvsz); 8217c478bd9Sstevel@tonic-gate 8227c478bd9Sstevel@tonic-gate/* svc_raw.c */ 8237c478bd9Sstevel@tonic-gateSVCXPRT *svc_raw_create(void); 8247c478bd9Sstevel@tonic-gate 8257c478bd9Sstevel@tonic-gate/* svc_run.c */ 8267c478bd9Sstevel@tonic-gatevoid svc_run(void); 8277c478bd9Sstevel@tonic-gatevoid svc_exit(void); 8287c478bd9Sstevel@tonic-gatevoid svc_done(SVCXPRT *xprt); 8297c478bd9Sstevel@tonic-gatebool_t rpc_control(int op, void *info); 8307c478bd9Sstevel@tonic-gate 8317c478bd9Sstevel@tonic-gate/* svc_simple.c */ 8327c478bd9Sstevel@tonic-gateint rpc_reg(rpcprog_t prognum, rpcvers_t versnum, rpcproc_t procnum, 8337c478bd9Sstevel@tonic-gate char *(*progname)(), xdrproc_t inproc, xdrproc_t outproc, 8347c478bd9Sstevel@tonic-gate const char *nettype); 8357c478bd9Sstevel@tonic-gate 8367c478bd9Sstevel@tonic-gate/* svc_vc.c */ 8377c478bd9Sstevel@tonic-gateSVCXPRT *svc_vc_create(int fd, uint_t sendsize, uint_t recvsize); 8387c478bd9Sstevel@tonic-gateSVCXPRT *svc_fd_create(int fd, uint_t sendsize, uint_t recvsize); 8397c478bd9Sstevel@tonic-gatebool_t __svc_vc_dupcache_init(SVCXPRT *xprt, void *condition, int basis); 8407c478bd9Sstevel@tonic-gateint __svc_vc_dup(struct svc_req *req, caddr_t *resp_buf, uint_t *resp_bufsz); 8417c478bd9Sstevel@tonic-gateint __svc_vc_dupdone(struct svc_req *req, caddr_t resp_buf, uint_t resp_bufsz, 8427c478bd9Sstevel@tonic-gate int status); 8437c478bd9Sstevel@tonic-gate 8447c478bd9Sstevel@tonic-gate/* svcauth_des.c */ 8457c478bd9Sstevel@tonic-gateint authdes_getucred(const struct authdes_cred *adc, uid_t *uid, gid_t *gid, 8467c478bd9Sstevel@tonic-gate short *grouplen, gid_t *groups); 8477c478bd9Sstevel@tonic-gateenum auth_stat __svcauth_des(struct svc_req *rqst, struct rpc_msg *msg); 8487c478bd9Sstevel@tonic-gate 8497c478bd9Sstevel@tonic-gate/* ti_opts.c */ 8507c478bd9Sstevel@tonic-gateint __rpc_negotiate_uid(int fd); 8517c478bd9Sstevel@tonic-gateint __rpc_get_local_uid(SVCXPRT *trans, uid_t *uid_out); 8527c478bd9Sstevel@tonic-gate 8537c478bd9Sstevel@tonic-gate/* xdr.c */ 8547c478bd9Sstevel@tonic-gatevoid xdr_free(xdrproc_t proc, char *objp); 8557c478bd9Sstevel@tonic-gatebool_t xdr_void(void); 8567c478bd9Sstevel@tonic-gatebool_t xdr_int(XDR *xdrs, int *ip); 8577c478bd9Sstevel@tonic-gatebool_t xdr_u_int(XDR *xdrs, uint_t *up); 8587c478bd9Sstevel@tonic-gatebool_t xdr_long(XDR *xdrs, long *lp); 8597c478bd9Sstevel@tonic-gatebool_t xdr_u_long(XDR *xdrs, ulong_t *ulp); 8607c478bd9Sstevel@tonic-gatebool_t xdr_short(XDR *xdrs, short *sp); 8617c478bd9Sstevel@tonic-gatebool_t xdr_u_short(XDR *xdrs, ushort_t *sp); 8627c478bd9Sstevel@tonic-gatebool_t xdr_char(XDR *xdrs, char *cp); 8637c478bd9Sstevel@tonic-gatebool_t xdr_u_char(XDR *xdrs, uchar_t *cp); 8647c478bd9Sstevel@tonic-gatebool_t xdr_bool(XDR *xdrs, bool_t *bp); 8657c478bd9Sstevel@tonic-gatebool_t xdr_enum(XDR *xdrs, enum_t *ep); 8667c478bd9Sstevel@tonic-gatebool_t xdr_opaque(XDR *xdrs, caddr_t cp, uint_t cnt); 8677c478bd9Sstevel@tonic-gatebool_t xdr_bytes(XDR *xdrs, char **cpp, uint_t *sizep, uint_t maxsize); 8687c478bd9Sstevel@tonic-gatebool_t xdr_netobj(XDR *xdrs, struct netobj *np); 8697c478bd9Sstevel@tonic-gatebool_t xdr_union(XDR *xdrs, enum_t *dscmp, char *unp, 8707c478bd9Sstevel@tonic-gate const struct xdr_discrim *choices, xdrproc_t dfault); 8717c478bd9Sstevel@tonic-gatebool_t xdr_string(XDR *xdrs, char **cpp, uint_t maxsize); 8727c478bd9Sstevel@tonic-gatebool_t xdr_hyper(XDR *xdrs, longlong_t *hp); 8737c478bd9Sstevel@tonic-gatebool_t xdr_u_hyper(XDR *xdrs, u_longlong_t *hp); 8747c478bd9Sstevel@tonic-gatebool_t xdr_longlong_t(XDR *xdrs, longlong_t *hp); 8757c478bd9Sstevel@tonic-gatebool_t xdr_u_longlong_t(XDR *xdrs, u_longlong_t *hp); 8767c478bd9Sstevel@tonic-gatebool_t xdr_ulonglong_t(XDR *xdrs, u_longlong_t *hp); 8777c478bd9Sstevel@tonic-gatebool_t xdr_wrapstring(XDR *xdrs, char **cpp); 8787c478bd9Sstevel@tonic-gate 8797c478bd9Sstevel@tonic-gate/* xdr_array.c */ 8807c478bd9Sstevel@tonic-gatebool_t xdr_array(XDR *xdrs, caddr_t *addrp, uint_t *sizep, uint_t maxsize, 8817c478bd9Sstevel@tonic-gate uint_t elsize, xdrproc_t elproc); 8827c478bd9Sstevel@tonic-gatebool_t xdr_vector(XDR *xdrs, char *basep, uint_t nelem, uint_t elemsize, 8837c478bd9Sstevel@tonic-gate xdrproc_t xdr_elem); 8847c478bd9Sstevel@tonic-gate 8857c478bd9Sstevel@tonic-gate/* xdr_float.c */ 8867c478bd9Sstevel@tonic-gatebool_t xdr_float(XDR *xdrs, float *fp); 8877c478bd9Sstevel@tonic-gatebool_t xdr_double(XDR *xdrs, double *dp); 8887c478bd9Sstevel@tonic-gatebool_t xdr_quadruple(XDR *xdrs, long double *fp); 8897c478bd9Sstevel@tonic-gate 8907c478bd9Sstevel@tonic-gate/* xdr_mem.c */ 8917c478bd9Sstevel@tonic-gatevoid xdrmem_create(XDR *xdrs, caddr_t addr, uint_t size, enum xdr_op op); 8927c478bd9Sstevel@tonic-gate 8937c478bd9Sstevel@tonic-gate/* xdr_rec.c */ 8947c478bd9Sstevel@tonic-gatevoid xdrrec_create(XDR *xdrs, uint_t sendsize, uint_t recvsize, 8957c478bd9Sstevel@tonic-gate caddr_t tcp_handle, int (*readit)(), int (*writeit)()); 8967c478bd9Sstevel@tonic-gate 8977c478bd9Sstevel@tonic-gateuint_t xdrrec_readbytes(XDR *xdrs, caddr_t addr, uint_t l); 8987c478bd9Sstevel@tonic-gatebool_t xdrrec_skiprecord(XDR *xdrs); 8997c478bd9Sstevel@tonic-gatebool_t xdrrec_eof(XDR *xdrs); 9007c478bd9Sstevel@tonic-gatebool_t xdrrec_endofrecord(XDR *xdrs, bool_t sendnow); 9017c478bd9Sstevel@tonic-gate 9027c478bd9Sstevel@tonic-gate/* xdr_refer.c */ 9037c478bd9Sstevel@tonic-gatebool_t xdr_reference(XDR *xdrs, caddr_t *pp, uint_t size, xdrproc_t proc); 9047c478bd9Sstevel@tonic-gatebool_t xdr_pointer(XDR *xdrs, char **objpp, uint_t obj_size, xdrproc_t xdr_obj); 9057c478bd9Sstevel@tonic-gate 9067c478bd9Sstevel@tonic-gate/* xdr_sizeof.c */ 9077c478bd9Sstevel@tonic-gateunsigned int xdr_sizeof(xdrproc_t func, void *data); 9087c478bd9Sstevel@tonic-gate 9097c478bd9Sstevel@tonic-gate/* xdr_stdio.c */ 9107c478bd9Sstevel@tonic-gatevoid xdrstdio_create(XDR *xdrs, FILE *file, enum xdr_op op); 9117c478bd9Sstevel@tonic-gate 9127c478bd9Sstevel@tonic-gate/* svid_funcs.c */ 9137c478bd9Sstevel@tonic-gate#undef auth_destroy 9147c478bd9Sstevel@tonic-gate#undef clnt_call 9157c478bd9Sstevel@tonic-gate#undef clnt_control 9167c478bd9Sstevel@tonic-gate#undef clnt_destroy 9177c478bd9Sstevel@tonic-gate#undef clnt_freeres 9187c478bd9Sstevel@tonic-gate#undef clnt_geterr 9197c478bd9Sstevel@tonic-gate#undef svc_destroy 9207c478bd9Sstevel@tonic-gate#undef svc_freeargs 9217c478bd9Sstevel@tonic-gate#undef svc_getargs 9227c478bd9Sstevel@tonic-gate#undef svc_getrpccaller 9237c478bd9Sstevel@tonic-gate#undef xdr_destroy 9247c478bd9Sstevel@tonic-gate#undef xdr_getpos 9257c478bd9Sstevel@tonic-gate#undef xdr_inline 9267c478bd9Sstevel@tonic-gate#undef xdr_setpos 9277c478bd9Sstevel@tonic-gatevoid auth_destroy(AUTH *auth); 9287c478bd9Sstevel@tonic-gateenum clnt_stat clnt_call(CLIENT *cl, rpcproc_t proc, xdrproc_t xargs, 9297c478bd9Sstevel@tonic-gate caddr_t argsp, xdrproc_t xres, caddr_t resp, 9307c478bd9Sstevel@tonic-gate struct timeval timeout); 9317c478bd9Sstevel@tonic-gatebool_t clnt_control(CLIENT *cl, uint_t rq, void *in); 9327c478bd9Sstevel@tonic-gatevoid clnt_destroy(CLIENT *cl); 9337c478bd9Sstevel@tonic-gatebool_t clnt_freeres(CLIENT *cl, xdrproc_t xres, caddr_t resp); 9347c478bd9Sstevel@tonic-gatevoid clnt_geterr(CLIENT *cl, struct rpc_err *errp); 9357c478bd9Sstevel@tonic-gatebool_t svc_control(SVCXPRT *xprt, const uint_t rq, void *in); 9367c478bd9Sstevel@tonic-gatebool_t svc_freeargs(SVCXPRT *xprt, xdrproc_t xargs, char *argsp); 9377c478bd9Sstevel@tonic-gatebool_t svc_getargs(SVCXPRT *xprt, xdrproc_t xargs, char *argsp); 9387c478bd9Sstevel@tonic-gatestruct netbuf *svc_getrpccaller(SVCXPRT *xprt); 9397c478bd9Sstevel@tonic-gatelong *xdr_inline(XDR *xdrs, int len); 9407c478bd9Sstevel@tonic-gatevoid xdr_destroy(XDR *xdrs); 9417c478bd9Sstevel@tonic-gateuint_t xdr_getpos(XDR *xdrs); 9427c478bd9Sstevel@tonic-gatebool_t xdr_setpos(XDR *xdrs, uint_t pos); 9437c478bd9Sstevel@tonic-gate 9447c478bd9Sstevel@tonic-gate/* 9457c478bd9Sstevel@tonic-gate * usr/src/lib/libnsl/saf routines 9467c478bd9Sstevel@tonic-gate */ 9477c478bd9Sstevel@tonic-gate 9487c478bd9Sstevel@tonic-gate/* checkver.c */ 9497c478bd9Sstevel@tonic-gateint check_version(int ver, char *fname); 9507c478bd9Sstevel@tonic-gate 9517c478bd9Sstevel@tonic-gate/* doconfig.c */ 9527c478bd9Sstevel@tonic-gateint doconfig(int fd, char *script, long rflag); 9537c478bd9Sstevel@tonic-gate 9547c478bd9Sstevel@tonic-gate/* 9557c478bd9Sstevel@tonic-gate * usr/src/lib/libnsl/yp routines 9567c478bd9Sstevel@tonic-gate */ 9577c478bd9Sstevel@tonic-gate 9587c478bd9Sstevel@tonic-gate/* dbm.c */ 9597c478bd9Sstevel@tonic-gateint dbminit(char *file); 9607c478bd9Sstevel@tonic-gateint dbmclose(void); 9617c478bd9Sstevel@tonic-gatedatum fetch(datum key); 9627c478bd9Sstevel@tonic-gateint delete(datum key); 9637c478bd9Sstevel@tonic-gateint store(datum key, datum dat); 9647c478bd9Sstevel@tonic-gatedatum firstkey(void); 9657c478bd9Sstevel@tonic-gatedatum nextkey(datum key); 9667c478bd9Sstevel@tonic-gatedatum firsthash(long hash); 9677c478bd9Sstevel@tonic-gatedatum makdatum(char *buf, int n); 9687c478bd9Sstevel@tonic-gatelong hashinc(long hash); 9697c478bd9Sstevel@tonic-gatelong calchash(datum item); 9707c478bd9Sstevel@tonic-gate 9717c478bd9Sstevel@tonic-gate/* yp_all.c */ 9727c478bd9Sstevel@tonic-gateint yp_all(char *domain, char *map, struct ypall_callback *callback); 9737c478bd9Sstevel@tonic-gateint __yp_all_rsvdport(char *domain, char *map, struct ypall_callback *callback); 9747c478bd9Sstevel@tonic-gate 9757c478bd9Sstevel@tonic-gate/* yp_b_clnt.c */ 9767c478bd9Sstevel@tonic-gateenum ypbind_resptype { 9777c478bd9Sstevel@tonic-gate YPBIND_SUCC_VAL = 1, 9787c478bd9Sstevel@tonic-gate YPBIND_FAIL_VAL = 2 9797c478bd9Sstevel@tonic-gate}; 9807c478bd9Sstevel@tonic-gatetypedef enum ypbind_resptype ypbind_resptype; 9817c478bd9Sstevel@tonic-gatestruct ypbind_resp { 9827c478bd9Sstevel@tonic-gate ypbind_resptype ypbind_status; 9837c478bd9Sstevel@tonic-gate union { 9847c478bd9Sstevel@tonic-gate uint_t ypbind_error; 9857c478bd9Sstevel@tonic-gate struct ypbind_binding *ypbind_bindinfo; 9867c478bd9Sstevel@tonic-gate } ypbind_resp_u; 9877c478bd9Sstevel@tonic-gate}; 9887c478bd9Sstevel@tonic-gatetypedef struct ypbind_resp ypbind_resp; 9897c478bd9Sstevel@tonic-gatestruct ypbind_domain { 9907c478bd9Sstevel@tonic-gate char *ypbind_domainname; 9917c478bd9Sstevel@tonic-gate rpcvers_t ypbind_vers; 9927c478bd9Sstevel@tonic-gate}; 9937c478bd9Sstevel@tonic-gatetypedef struct ypbind_domain ypbind_domain; 9947c478bd9Sstevel@tonic-gatestruct ypbind_setdom { 9957c478bd9Sstevel@tonic-gate char *ypsetdom_domain; 9967c478bd9Sstevel@tonic-gate struct ypbind_binding *ypsetdom_bindinfo; 9977c478bd9Sstevel@tonic-gate}; 9987c478bd9Sstevel@tonic-gatetypedef struct ypbind_setdom ypbind_setdom; 9997c478bd9Sstevel@tonic-gateypbind_resp *ypbindproc_domain_3(ypbind_domain *argp, CLIENT *clnt); 10007c478bd9Sstevel@tonic-gate 10017c478bd9Sstevel@tonic-gate/* yp_b_xdr.c */ 10027c478bd9Sstevel@tonic-gatebool_t xdr_ypbind_domain(XDR *xdrs, ypbind_domain *objp); 10037c478bd9Sstevel@tonic-gatebool_t xdr_ypbind_resp(XDR *xdrs, ypbind_resp *objp); 10047c478bd9Sstevel@tonic-gatebool_t xdr_ypbind_setdom(XDR *xdrs, ypbind_setdom *objp); 10057c478bd9Sstevel@tonic-gatebool_t xdr_ypbind_resptype(XDR *xdrs, ypbind_resptype *objp); 10067c478bd9Sstevel@tonic-gate 10077c478bd9Sstevel@tonic-gate/* yp_bind.c */ 10087c478bd9Sstevel@tonic-gatestruct dom_binding { 10097c478bd9Sstevel@tonic-gate struct dom_binding *dom_pnext; 10107c478bd9Sstevel@tonic-gate char *dom_domain; 10117c478bd9Sstevel@tonic-gate struct ypbind_binding *dom_binding; 10127c478bd9Sstevel@tonic-gate CLIENT *dom_client; 10137c478bd9Sstevel@tonic-gate int cache_bad; 10147c478bd9Sstevel@tonic-gate int fd; 10157c478bd9Sstevel@tonic-gate dev_t rdev; 10167c478bd9Sstevel@tonic-gate int ref_count; 10177c478bd9Sstevel@tonic-gate int need_free; 10187c478bd9Sstevel@tonic-gate mutex_t server_name_lock; 10197c478bd9Sstevel@tonic-gate}; 10207c478bd9Sstevel@tonic-gateint __yp_dobind(char *domain, struct dom_binding **binding); 10217c478bd9Sstevel@tonic-gateint __yp_rel_binding(struct dom_binding *binding); 10227c478bd9Sstevel@tonic-gatevoid yp_unbind(char *domain); 10237c478bd9Sstevel@tonic-gateint __yp_add_binding(char *domain, char *addr); 10247c478bd9Sstevel@tonic-gateint yp_bind(char *domain); 10257c478bd9Sstevel@tonic-gateint yp_get_default_domain(char **domain); 10267c478bd9Sstevel@tonic-gateint usingypmap(char **ddn, char *map); 10277c478bd9Sstevel@tonic-gateCLIENT *__clnt_create_loopback(rpcprog_t prog, rpcvers_t vers, int err); 10287c478bd9Sstevel@tonic-gate 10297c478bd9Sstevel@tonic-gate/* yp_enum.c */ 10307c478bd9Sstevel@tonic-gateint yp_first(char *domain, char *map, char **key, int *keylen, 10317c478bd9Sstevel@tonic-gate char **val, int *vallen); 10327c478bd9Sstevel@tonic-gateint yp_next(char *domain, char *map, char *inkey, int inkeylen, 10337c478bd9Sstevel@tonic-gate char **outkey, int *outkeylen, char **val, int *vallen); 10347c478bd9Sstevel@tonic-gate 10357c478bd9Sstevel@tonic-gate/* yp_master.c */ 10367c478bd9Sstevel@tonic-gateint yp_master(char *domain, char *map, char **master); 10377c478bd9Sstevel@tonic-gateint __yp_master_rsvdport(char *domain, char *map, char **master); 10387c478bd9Sstevel@tonic-gate 10397c478bd9Sstevel@tonic-gate/* yp_match.c */ 10407c478bd9Sstevel@tonic-gateint yp_match(char *domain, char *map, char *key, int keylen, 10417c478bd9Sstevel@tonic-gate char **val, int *vallen); 10427c478bd9Sstevel@tonic-gateint yp_match_rsvdport(char *domain, char *map, char *key, int keylen, 10437c478bd9Sstevel@tonic-gate char **val, int *vallen); 10447c478bd9Sstevel@tonic-gatevoid __empty_yp_cache(void); 10457c478bd9Sstevel@tonic-gate 10467c478bd9Sstevel@tonic-gate/* yp_order.c */ 10477c478bd9Sstevel@tonic-gateint yp_order(char *domain, char *map, unsigned long *order); 10487c478bd9Sstevel@tonic-gate 10497c478bd9Sstevel@tonic-gate/* yp_rsvd.c */ 10507c478bd9Sstevel@tonic-gateCLIENT *__yp_clnt_create_rsvdport(const char *hostname, 10517c478bd9Sstevel@tonic-gate rpcprog_t prog, rpcvers_t vers, 10527c478bd9Sstevel@tonic-gate const char *nettype, 10537c478bd9Sstevel@tonic-gate const uint_t sendsz, const uint_t recvsz); 10547c478bd9Sstevel@tonic-gate 10557c478bd9Sstevel@tonic-gate/* yp_update.c */ 10567c478bd9Sstevel@tonic-gateint yp_update(char *domain, char *map, unsigned op, 10577c478bd9Sstevel@tonic-gate char *key, int keylen, char *data, int datalen); 10587c478bd9Sstevel@tonic-gate 10597c478bd9Sstevel@tonic-gate/* yp_xdr.c */ 10607c478bd9Sstevel@tonic-gatebool xdr_datum(XDR * xdrs, datum *pdatum); 10617c478bd9Sstevel@tonic-gatebool xdr_ypdomain_wrap_string(XDR *xdrs, char **ppstring); 10627c478bd9Sstevel@tonic-gatebool xdr_ypmap_wrap_string(XDR *xdrs, char **ppstring); 10637c478bd9Sstevel@tonic-gatebool xdr_ypreq_key(XDR *xdrs, struct ypreq_key *ps); 10647c478bd9Sstevel@tonic-gatebool xdr_ypreq_nokey(XDR *xdrs, struct ypreq_nokey *ps); 10657c478bd9Sstevel@tonic-gatebool xdr_ypresp_val(XDR *xdrs, struct ypresp_val *ps); 10667c478bd9Sstevel@tonic-gatebool xdr_ypresp_key_val(XDR *xdrs, struct ypresp_key_val *ps); 10677c478bd9Sstevel@tonic-gatebool xdr_ypowner_wrap_string(XDR *xdrs, char **ppstring); 10687c478bd9Sstevel@tonic-gatebool xdr_ypmap_parms(XDR *xdrs, struct ypmap_parms *ps); 10697c478bd9Sstevel@tonic-gatebool xdr_ypresp_master(XDR *xdrs, struct ypresp_master *ps); 10707c478bd9Sstevel@tonic-gatebool xdr_ypresp_order(XDR * xdrs, struct ypresp_order *ps); 10717c478bd9Sstevel@tonic-gatebool xdr_ypresp_maplist(XDR *xdrs, struct ypresp_maplist *ps); 10727c478bd9Sstevel@tonic-gatebool xdr_yppushresp_xfr(XDR *xdrs, struct yppushresp_xfr *ps); 10737c478bd9Sstevel@tonic-gatebool xdr_ypreq_newxfr(XDR *xdrs, struct ypreq_newxfr *ps); 10747c478bd9Sstevel@tonic-gatebool xdr_ypreq_xfr(XDR *xdrs, struct ypreq_xfr *ps); 10757c478bd9Sstevel@tonic-gatebool xdr_ypall(XDR *xdrs, struct ypall_callback *callback); 10767c478bd9Sstevel@tonic-gate 10777c478bd9Sstevel@tonic-gate/* yperr_string.c */ 10787c478bd9Sstevel@tonic-gatechar *yperr_string(int code); 10797c478bd9Sstevel@tonic-gate 10807c478bd9Sstevel@tonic-gate/* yppasswd_xdr.c */ 10817c478bd9Sstevel@tonic-gatebool_t xdr_yppasswd(XDR *xdrsp, struct yppasswd *pp); 10827c478bd9Sstevel@tonic-gate 10837c478bd9Sstevel@tonic-gate/* ypprot_err.c */ 10847c478bd9Sstevel@tonic-gateint ypprot_err(int yp_protocol_error); 10857c478bd9Sstevel@tonic-gate 10867c478bd9Sstevel@tonic-gate/* ypupd.c */ 10877c478bd9Sstevel@tonic-gatebool_t xdr_yp_buf(XDR *xdrs, yp_buf *objp); 10887c478bd9Sstevel@tonic-gatebool_t xdr_ypupdate_args(XDR *xdrs, ypupdate_args *objp); 10897c478bd9Sstevel@tonic-gatebool_t xdr_ypdelete_args(XDR *xdrs, ypdelete_args *objp); 10907c478bd9Sstevel@tonic-gate 10917c478bd9Sstevel@tonic-gate/* nis_sec_mechs.c */ 10927c478bd9Sstevel@tonic-gatechar *__nis_keyalg2authtype(keylen_t keylen, algtype_t algtype, 10937c478bd9Sstevel@tonic-gate char *authtype, size_t authtype_len); 1094cb5caa98Sdjl 1095cb5caa98Sdjl/* usr/src/lib/libnsl/nss/parse.c */ 1096cb5caa98Sdjlchar *_strtok_escape(char *string, char *sepset, char **lasts); 1097