xref: /titanic_44/usr/src/cmd/fs.d/nfs/lib/nfs_resolve.h (revision 6ba597c56d749c61b4f783157f63196d7b2445f0)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License (the "License").
6  * You may not use this file except in compliance with the License.
7  *
8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9  * or http://www.opensolaris.org/os/licensing.
10  * See the License for the specific language governing permissions
11  * and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL HEADER in each
14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15  * If applicable, add the following below this CDDL HEADER, with the
16  * fields enclosed by brackets "[]" replaced with your own identifying
17  * information: Portions Copyright [yyyy] [name of copyright owner]
18  *
19  * CDDL HEADER END
20  */
21 /*
22  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23  * Use is subject to license terms.
24  */
25 
26 #ifndef	_NFS_RESOLVE_H
27 #define	_NFS_RESOLVE_H
28 
29 /* number of transports to try */
30 #define	MNT_PREF_LISTLEN	2
31 #define	FIRST_TRY		1
32 #define	SECOND_TRY		2
33 
34 extern struct knetconfig *get_knconf(struct netconfig *);
35 extern void free_knconf(struct knetconfig *);
36 extern bool_t xdr_nfs_fsl_info(XDR *, struct nfs_fsl_info *);
37 extern struct netconfig *get_netconfig(NCONF_HANDLE *, ushort_t, char *);
38 extern int setup_nb_parms(struct netconfig *, struct t_bind *, struct t_info *,
39     char *, int, bool_t, ushort_t, rpcprog_t, rpcvers_t, int);
40 extern void cleanup_tli_parms(struct t_bind *, int);
41 extern struct nfs_fsl_info *get_nfs4ref_info(char *, int, int);
42 extern void free_nfs4ref_info(struct nfs_fsl_info *);
43 extern struct netbuf *get_server_addr(char *, rpcprog_t, rpcvers_t,
44     struct netconfig *, ushort_t, struct t_info *, caddr_t *,
45     bool_t, char *, enum clnt_stat *);
46 extern struct netbuf *resolve_netconf(char *, rpcprog_t, rpcvers_t,
47     struct netconfig **, ushort_t, struct t_info *,
48     caddr_t *, bool_t, char *, enum clnt_stat *);
49 
50 #endif /* _NFS_RESOLVE_H */
51