xref: /titanic_44/usr/src/uts/common/nfs/mount.h (revision 749f21d359d8fbd020c974a1a5227316221bfc9c)
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, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*
23  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 /*
28  *	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T
29  *		All Rights Reserved
30  */
31 
32 #ifndef	_NFS_MOUNT_H
33 #define	_NFS_MOUNT_H
34 
35 #pragma ident	"%Z%%M%	%I%	%E% SMI"
36 
37 #ifdef	__cplusplus
38 extern "C" {
39 #endif
40 
41 #include <sys/pathconf.h>			/* static pathconf kludge */
42 
43 
44 #define	NFS_ARGS_EXTA	1
45 #define	NFS_ARGS_EXTB	2
46 
47 /*
48  * extension data for nfs_args_ext == NFS_ARGS_EXTA.
49  */
50 struct nfs_args_extA {
51 	struct sec_data		*secdata;	/* security data */
52 };
53 
54 /*
55  * extension data for nfs_args_ext == NFS_ARGS_EXTB.
56  */
57 struct nfs_args_extB {
58 	struct sec_data		*secdata;	/* security data */
59 	struct nfs_args		*next;		/* link for failover */
60 };
61 
62 /*
63  * Union structure for future extension.
64  */
65 union nfs_ext {
66 	struct nfs_args_extA	nfs_extA;	/* nfs_args extension v1 */
67 	struct nfs_args_extB	nfs_extB;	/* nfs_args extension v2 */
68 };
69 
70 struct nfs_args {
71 	struct netbuf		*addr;		/* file server address */
72 	struct netbuf		*syncaddr;	/* secure NFS time sync addr */
73 	struct knetconfig	*knconf;	/* transport netconfig struct */
74 	char			*hostname;	/* server's hostname */
75 	char			*netname;	/* server's netname */
76 	caddr_t			fh;		/* File handle to be mounted */
77 	int			flags;		/* flags */
78 	int			wsize;		/* write size in bytes */
79 	int			rsize;		/* read size in bytes */
80 	int			timeo;		/* initial timeout in .1 secs */
81 	int			retrans;	/* times to retry send */
82 	int			acregmin;	/* attr cache file min secs */
83 	int			acregmax;	/* attr cache file max secs */
84 	int			acdirmin;	/* attr cache dir min secs */
85 	int			acdirmax;	/* attr cache dir max secs */
86 	struct pathcnf		*pathconf;	/* static pathconf kludge */
87 	int			nfs_args_ext;	/* the nfs_args extension id */
88 	union nfs_ext		nfs_ext_u;	/* extension union structure */
89 };
90 
91 #ifdef _SYSCALL32
92 struct nfs_args_extA32 {
93 	caddr32_t		secdata;	/* security data */
94 };
95 
96 struct nfs_args_extB32 {
97 	caddr32_t		secdata;	/* security data */
98 	caddr32_t		next;		/* link for failover */
99 };
100 
101 union nfs_ext32 {
102 	struct nfs_args_extA32	nfs_extA;	/* nfs_args extension v1 */
103 	struct nfs_args_extB32	nfs_extB;	/* nfs_args extension v2 */
104 };
105 
106 struct nfs_args32 {
107 	caddr32_t		addr;		/* file server address */
108 	caddr32_t		syncaddr;	/* secure NFS time sync addr */
109 	caddr32_t		knconf;		/* transport netconfig struct */
110 	caddr32_t		hostname;	/* server's hostname */
111 	caddr32_t		netname;	/* server's netname */
112 	caddr32_t		fh;		/* File handle to be mounted */
113 	int32_t			flags;		/* flags */
114 	int32_t			wsize;		/* write size in bytes */
115 	int32_t			rsize;		/* read size in bytes */
116 	int32_t			timeo;		/* initial timeout in .1 secs */
117 	int32_t			retrans;	/* times to retry send */
118 	int32_t			acregmin;	/* attr cache file min secs */
119 	int32_t			acregmax;	/* attr cache file max secs */
120 	int32_t			acdirmin;	/* attr cache dir min secs */
121 	int32_t			acdirmax;	/* attr cache dir max secs */
122 	caddr32_t		pathconf;	/* static pathconf kludge */
123 	int32_t			nfs_args_ext;	/* the nfs_args extension id */
124 	union nfs_ext32		nfs_ext_u;	/* extension union structure */
125 };
126 #endif /* _SYSCALL32 */
127 
128 /*
129  * NFS mount option flags
130  */
131 #define	NFSMNT_SOFT		0x001	/* soft mount (hard is default) */
132 #define	NFSMNT_WSIZE		0x002	/* set write size */
133 #define	NFSMNT_RSIZE		0x004	/* set read size */
134 #define	NFSMNT_TIMEO		0x008	/* set initial timeout */
135 #define	NFSMNT_RETRANS		0x010	/* set number of request retrys */
136 #define	NFSMNT_HOSTNAME		0x020	/* set hostname for error printf */
137 #define	NFSMNT_INT		0x040	/* allow interrupts on hard mount */
138 #define	NFSMNT_NOAC		0x080	/* don't cache attributes */
139 #define	NFSMNT_ACREGMIN		0x0100	/* set min secs for file attr cache */
140 #define	NFSMNT_ACREGMAX		0x0200	/* set max secs for file attr cache */
141 #define	NFSMNT_ACDIRMIN		0x0400	/* set min secs for dir attr cache */
142 #define	NFSMNT_ACDIRMAX		0x0800	/* set max secs for dir attr cache */
143 #define	NFSMNT_SECURE		0x1000	/* secure mount */
144 #define	NFSMNT_NOCTO		0x2000	/* no close-to-open consistency */
145 #define	NFSMNT_KNCONF		0x4000	/* transport's knetconfig structure */
146 #define	NFSMNT_GRPID		0x8000	/* System V-style gid inheritance */
147 #define	NFSMNT_RPCTIMESYNC	0x10000	/* use RPC to do secure NFS time sync */
148 #define	NFSMNT_KERBEROS		0x20000	/* use kerberos credentials */
149 #define	NFSMNT_POSIX		0x40000 /* static pathconf kludge info */
150 #define	NFSMNT_LLOCK		0x80000	/* Local locking (no lock manager) */
151 #define	NFSMNT_LOOPBACK		0x100000 /* Is a loopback mount */
152 #define	NFSMNT_SEMISOFT		0x200000 /* read soft, modify hard */
153 #define	NFSMNT_NOPRINT		0x400000 /* don't print messages */
154 #define	NFSMNT_NEWARGS		0x800000 /* using nfs_args extented structure */
155 #define	NFSMNT_DIRECTIO		0x1000000 /* do direct I/O */
156 #define	NFSMNT_PUBLIC		0x2000000 /* mount was done with url/public */
157 #define	NFSMNT_SECDEFAULT	0x4000000 /* mount using default sec flavor */
158 #define	NFSMNT_TRYRDMA		0x8000000 /* Try RDMA mount,no proto advised */
159 #define	NFSMNT_DORDMA		0x10000000 /* Do an RDMA mount, regardless */
160 
161 #ifdef	__cplusplus
162 }
163 #endif
164 
165 #endif	/* _NFS_MOUNT_H */
166