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