xref: /onnv-gate/usr/src/uts/common/nfs/mount.h (revision 11291:80bdcd03e626)
10Sstevel@tonic-gate /*
20Sstevel@tonic-gate  * CDDL HEADER START
30Sstevel@tonic-gate  *
40Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
55302Sth199096  * Common Development and Distribution License (the "License").
65302Sth199096  * You may not use this file except in compliance with the License.
70Sstevel@tonic-gate  *
80Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
90Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
100Sstevel@tonic-gate  * See the License for the specific language governing permissions
110Sstevel@tonic-gate  * and limitations under the License.
120Sstevel@tonic-gate  *
130Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
140Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
150Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
160Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
170Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
180Sstevel@tonic-gate  *
190Sstevel@tonic-gate  * CDDL HEADER END
200Sstevel@tonic-gate  */
210Sstevel@tonic-gate /*
22*11291SRobert.Thurlow@Sun.COM  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
230Sstevel@tonic-gate  * Use is subject to license terms.
240Sstevel@tonic-gate  */
250Sstevel@tonic-gate 
260Sstevel@tonic-gate /*
270Sstevel@tonic-gate  *	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T
280Sstevel@tonic-gate  *		All Rights Reserved
290Sstevel@tonic-gate  */
300Sstevel@tonic-gate 
310Sstevel@tonic-gate #ifndef	_NFS_MOUNT_H
320Sstevel@tonic-gate #define	_NFS_MOUNT_H
330Sstevel@tonic-gate 
340Sstevel@tonic-gate #ifdef	__cplusplus
350Sstevel@tonic-gate extern "C" {
360Sstevel@tonic-gate #endif
370Sstevel@tonic-gate 
380Sstevel@tonic-gate #include <sys/pathconf.h>			/* static pathconf kludge */
390Sstevel@tonic-gate 
400Sstevel@tonic-gate 
410Sstevel@tonic-gate #define	NFS_ARGS_EXTA	1
420Sstevel@tonic-gate #define	NFS_ARGS_EXTB	2
430Sstevel@tonic-gate 
440Sstevel@tonic-gate /*
450Sstevel@tonic-gate  * extension data for nfs_args_ext == NFS_ARGS_EXTA.
460Sstevel@tonic-gate  */
470Sstevel@tonic-gate struct nfs_args_extA {
480Sstevel@tonic-gate 	struct sec_data		*secdata;	/* security data */
490Sstevel@tonic-gate };
500Sstevel@tonic-gate 
510Sstevel@tonic-gate /*
520Sstevel@tonic-gate  * extension data for nfs_args_ext == NFS_ARGS_EXTB.
530Sstevel@tonic-gate  */
540Sstevel@tonic-gate struct nfs_args_extB {
550Sstevel@tonic-gate 	struct sec_data		*secdata;	/* security data */
560Sstevel@tonic-gate 	struct nfs_args		*next;		/* link for failover */
570Sstevel@tonic-gate };
580Sstevel@tonic-gate 
590Sstevel@tonic-gate /*
600Sstevel@tonic-gate  * Union structure for future extension.
610Sstevel@tonic-gate  */
620Sstevel@tonic-gate union nfs_ext {
630Sstevel@tonic-gate 	struct nfs_args_extA	nfs_extA;	/* nfs_args extension v1 */
640Sstevel@tonic-gate 	struct nfs_args_extB	nfs_extB;	/* nfs_args extension v2 */
650Sstevel@tonic-gate };
660Sstevel@tonic-gate 
670Sstevel@tonic-gate struct nfs_args {
680Sstevel@tonic-gate 	struct netbuf		*addr;		/* file server address */
690Sstevel@tonic-gate 	struct netbuf		*syncaddr;	/* secure NFS time sync addr */
700Sstevel@tonic-gate 	struct knetconfig	*knconf;	/* transport netconfig struct */
710Sstevel@tonic-gate 	char			*hostname;	/* server's hostname */
720Sstevel@tonic-gate 	char			*netname;	/* server's netname */
730Sstevel@tonic-gate 	caddr_t			fh;		/* File handle to be mounted */
740Sstevel@tonic-gate 	int			flags;		/* flags */
750Sstevel@tonic-gate 	int			wsize;		/* write size in bytes */
760Sstevel@tonic-gate 	int			rsize;		/* read size in bytes */
770Sstevel@tonic-gate 	int			timeo;		/* initial timeout in .1 secs */
780Sstevel@tonic-gate 	int			retrans;	/* times to retry send */
790Sstevel@tonic-gate 	int			acregmin;	/* attr cache file min secs */
800Sstevel@tonic-gate 	int			acregmax;	/* attr cache file max secs */
810Sstevel@tonic-gate 	int			acdirmin;	/* attr cache dir min secs */
820Sstevel@tonic-gate 	int			acdirmax;	/* attr cache dir max secs */
830Sstevel@tonic-gate 	struct pathcnf		*pathconf;	/* static pathconf kludge */
840Sstevel@tonic-gate 	int			nfs_args_ext;	/* the nfs_args extension id */
850Sstevel@tonic-gate 	union nfs_ext		nfs_ext_u;	/* extension union structure */
860Sstevel@tonic-gate };
870Sstevel@tonic-gate 
880Sstevel@tonic-gate #ifdef _SYSCALL32
890Sstevel@tonic-gate struct nfs_args_extA32 {
900Sstevel@tonic-gate 	caddr32_t		secdata;	/* security data */
910Sstevel@tonic-gate };
920Sstevel@tonic-gate 
930Sstevel@tonic-gate struct nfs_args_extB32 {
940Sstevel@tonic-gate 	caddr32_t		secdata;	/* security data */
950Sstevel@tonic-gate 	caddr32_t		next;		/* link for failover */
960Sstevel@tonic-gate };
970Sstevel@tonic-gate 
980Sstevel@tonic-gate union nfs_ext32 {
990Sstevel@tonic-gate 	struct nfs_args_extA32	nfs_extA;	/* nfs_args extension v1 */
1000Sstevel@tonic-gate 	struct nfs_args_extB32	nfs_extB;	/* nfs_args extension v2 */
1010Sstevel@tonic-gate };
1020Sstevel@tonic-gate 
1030Sstevel@tonic-gate struct nfs_args32 {
1040Sstevel@tonic-gate 	caddr32_t		addr;		/* file server address */
1050Sstevel@tonic-gate 	caddr32_t		syncaddr;	/* secure NFS time sync addr */
1060Sstevel@tonic-gate 	caddr32_t		knconf;		/* transport netconfig struct */
1070Sstevel@tonic-gate 	caddr32_t		hostname;	/* server's hostname */
1080Sstevel@tonic-gate 	caddr32_t		netname;	/* server's netname */
1090Sstevel@tonic-gate 	caddr32_t		fh;		/* File handle to be mounted */
1100Sstevel@tonic-gate 	int32_t			flags;		/* flags */
1110Sstevel@tonic-gate 	int32_t			wsize;		/* write size in bytes */
1120Sstevel@tonic-gate 	int32_t			rsize;		/* read size in bytes */
1130Sstevel@tonic-gate 	int32_t			timeo;		/* initial timeout in .1 secs */
1140Sstevel@tonic-gate 	int32_t			retrans;	/* times to retry send */
1150Sstevel@tonic-gate 	int32_t			acregmin;	/* attr cache file min secs */
1160Sstevel@tonic-gate 	int32_t			acregmax;	/* attr cache file max secs */
1170Sstevel@tonic-gate 	int32_t			acdirmin;	/* attr cache dir min secs */
1180Sstevel@tonic-gate 	int32_t			acdirmax;	/* attr cache dir max secs */
1190Sstevel@tonic-gate 	caddr32_t		pathconf;	/* static pathconf kludge */
1200Sstevel@tonic-gate 	int32_t			nfs_args_ext;	/* the nfs_args extension id */
1210Sstevel@tonic-gate 	union nfs_ext32		nfs_ext_u;	/* extension union structure */
1220Sstevel@tonic-gate };
1230Sstevel@tonic-gate #endif /* _SYSCALL32 */
1240Sstevel@tonic-gate 
1250Sstevel@tonic-gate /*
1260Sstevel@tonic-gate  * NFS mount option flags
1270Sstevel@tonic-gate  */
1280Sstevel@tonic-gate #define	NFSMNT_SOFT		0x001	/* soft mount (hard is default) */
1290Sstevel@tonic-gate #define	NFSMNT_WSIZE		0x002	/* set write size */
1300Sstevel@tonic-gate #define	NFSMNT_RSIZE		0x004	/* set read size */
1310Sstevel@tonic-gate #define	NFSMNT_TIMEO		0x008	/* set initial timeout */
1320Sstevel@tonic-gate #define	NFSMNT_RETRANS		0x010	/* set number of request retrys */
1330Sstevel@tonic-gate #define	NFSMNT_HOSTNAME		0x020	/* set hostname for error printf */
1340Sstevel@tonic-gate #define	NFSMNT_INT		0x040	/* allow interrupts on hard mount */
1350Sstevel@tonic-gate #define	NFSMNT_NOAC		0x080	/* don't cache attributes */
1360Sstevel@tonic-gate #define	NFSMNT_ACREGMIN		0x0100	/* set min secs for file attr cache */
1370Sstevel@tonic-gate #define	NFSMNT_ACREGMAX		0x0200	/* set max secs for file attr cache */
1380Sstevel@tonic-gate #define	NFSMNT_ACDIRMIN		0x0400	/* set min secs for dir attr cache */
1390Sstevel@tonic-gate #define	NFSMNT_ACDIRMAX		0x0800	/* set max secs for dir attr cache */
1400Sstevel@tonic-gate #define	NFSMNT_SECURE		0x1000	/* secure mount */
1410Sstevel@tonic-gate #define	NFSMNT_NOCTO		0x2000	/* no close-to-open consistency */
1420Sstevel@tonic-gate #define	NFSMNT_KNCONF		0x4000	/* transport's knetconfig structure */
1430Sstevel@tonic-gate #define	NFSMNT_GRPID		0x8000	/* System V-style gid inheritance */
1440Sstevel@tonic-gate #define	NFSMNT_RPCTIMESYNC	0x10000	/* use RPC to do secure NFS time sync */
1450Sstevel@tonic-gate #define	NFSMNT_KERBEROS		0x20000	/* use kerberos credentials */
1460Sstevel@tonic-gate #define	NFSMNT_POSIX		0x40000 /* static pathconf kludge info */
1470Sstevel@tonic-gate #define	NFSMNT_LLOCK		0x80000	/* Local locking (no lock manager) */
1480Sstevel@tonic-gate #define	NFSMNT_LOOPBACK		0x100000 /* Is a loopback mount */
1490Sstevel@tonic-gate #define	NFSMNT_SEMISOFT		0x200000 /* read soft, modify hard */
1500Sstevel@tonic-gate #define	NFSMNT_NOPRINT		0x400000 /* don't print messages */
1510Sstevel@tonic-gate #define	NFSMNT_NEWARGS		0x800000 /* using nfs_args extented structure */
1520Sstevel@tonic-gate #define	NFSMNT_DIRECTIO		0x1000000 /* do direct I/O */
1530Sstevel@tonic-gate #define	NFSMNT_PUBLIC		0x2000000 /* mount was done with url/public */
1540Sstevel@tonic-gate #define	NFSMNT_SECDEFAULT	0x4000000 /* mount using default sec flavor */
1550Sstevel@tonic-gate #define	NFSMNT_TRYRDMA		0x8000000 /* Try RDMA mount,no proto advised */
1560Sstevel@tonic-gate #define	NFSMNT_DORDMA		0x10000000 /* Do an RDMA mount, regardless */
1575302Sth199096 #define	NFSMNT_MIRRORMOUNT	0x20000000 /* Is a mirrormount */
158*11291SRobert.Thurlow@Sun.COM #define	NFSMNT_REFERRAL		0x40000000 /* Is a referral */
1595302Sth199096 
160*11291SRobert.Thurlow@Sun.COM #define	NFSMNT_EPHEMERAL	(NFSMNT_MIRRORMOUNT | NFSMNT_REFERRAL)
1610Sstevel@tonic-gate 
1620Sstevel@tonic-gate #ifdef	__cplusplus
1630Sstevel@tonic-gate }
1640Sstevel@tonic-gate #endif
1650Sstevel@tonic-gate 
1660Sstevel@tonic-gate #endif	/* _NFS_MOUNT_H */
167