xref: /onnv-gate/usr/src/lib/libbc/inc/include/sys/mount.h (revision 722:636b850d4ee9)
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
50Sstevel@tonic-gate  * Common Development and Distribution License, Version 1.0 only
60Sstevel@tonic-gate  * (the "License").  You may not use this file except in compliance
70Sstevel@tonic-gate  * with the License.
80Sstevel@tonic-gate  *
90Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
100Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
110Sstevel@tonic-gate  * See the License for the specific language governing permissions
120Sstevel@tonic-gate  * and limitations under the License.
130Sstevel@tonic-gate  *
140Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
150Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
160Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
170Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
180Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
190Sstevel@tonic-gate  *
200Sstevel@tonic-gate  * CDDL HEADER END
210Sstevel@tonic-gate  */
220Sstevel@tonic-gate /*
230Sstevel@tonic-gate  * Copyright 1993 Sun Microsystems, Inc.  All rights reserved.
240Sstevel@tonic-gate  * Use is subject to license terms.
250Sstevel@tonic-gate  */
260Sstevel@tonic-gate 
27*722Smuffin #ifndef	_sys_mount_h
28*722Smuffin #define	_sys_mount_h
29*722Smuffin 
300Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
310Sstevel@tonic-gate 
320Sstevel@tonic-gate /*
330Sstevel@tonic-gate  * mount options
340Sstevel@tonic-gate  */
350Sstevel@tonic-gate 
360Sstevel@tonic-gate #define	M_RDONLY	0x01	/* mount fs read only */
370Sstevel@tonic-gate #define	M_NOSUID	0x02	/* mount fs with setuid not allowed */
380Sstevel@tonic-gate #define	M_NEWTYPE	0x04	/* use type string instead of int */
390Sstevel@tonic-gate #define	M_GRPID		0x08	/* Old BSD group-id on create */
400Sstevel@tonic-gate #define	M_REMOUNT	0x10	/* change options on an existing mount */
410Sstevel@tonic-gate #define	M_NOSUB		0x20	/* Disallow mounts beneath this mount */
420Sstevel@tonic-gate #define	M_MULTI		0x40	/* Do multi-component lookup on files */
430Sstevel@tonic-gate #define	M_SYS5		0x80	/* Mount with Sys 5-specific semantics */
440Sstevel@tonic-gate 
450Sstevel@tonic-gate struct	ufs_args {
460Sstevel@tonic-gate 	char	*fspec;
470Sstevel@tonic-gate };
480Sstevel@tonic-gate 
490Sstevel@tonic-gate 
500Sstevel@tonic-gate #define _PC_LAST	9		/* highest value of any _PC_ */
510Sstevel@tonic-gate #define _BITS           (8 * sizeof(short))
520Sstevel@tonic-gate #define _PC_N           ((_PC_LAST + _BITS - 1) / _BITS)
530Sstevel@tonic-gate #define _PC_ISSET(n, a) (a[(n) / _BITS] & (1 << ((n) % _BITS)))
540Sstevel@tonic-gate #define _PC_SET(n, a)   (a[(n) / _BITS] |= (1 << ((n) % _BITS)))
550Sstevel@tonic-gate #define _PC_ERROR       0
560Sstevel@tonic-gate 
570Sstevel@tonic-gate struct  pathcnf {
580Sstevel@tonic-gate         /*
590Sstevel@tonic-gate          * pathconf() information
600Sstevel@tonic-gate          */
610Sstevel@tonic-gate         int             pc_link_max;    /* max links allowed */
620Sstevel@tonic-gate         short           pc_max_canon;   /* max line len for a tty */
630Sstevel@tonic-gate         short           pc_max_input;   /* input a tty can eat all once */
640Sstevel@tonic-gate         short           pc_name_max;    /* max file name length (dir entry) */
650Sstevel@tonic-gate         short           pc_path_max;    /* path name len (/x/y/z/...) */
660Sstevel@tonic-gate         short           pc_pipe_buf;    /* size of a pipe (bytes) */
670Sstevel@tonic-gate         cc_t            pc_vdisable;    /* safe char to turn off c_cc[i] */
680Sstevel@tonic-gate         char            pc_xxx;         /* alignment padding; cc_t == char */
690Sstevel@tonic-gate         short           pc_mask[_PC_N]; /* see below */
700Sstevel@tonic-gate };
710Sstevel@tonic-gate 
720Sstevel@tonic-gate 
730Sstevel@tonic-gate struct	nfs_args {
740Sstevel@tonic-gate 	struct sockaddr_in	*addr;		/* file server address */
750Sstevel@tonic-gate 	caddr_t			fh;		/* File handle to be mounted */
760Sstevel@tonic-gate 	int			flags;		/* flags */
770Sstevel@tonic-gate 	int			wsize;		/* write size in bytes */
780Sstevel@tonic-gate 	int			rsize;		/* read size in bytes */
790Sstevel@tonic-gate 	int			timeo;		/* initial timeout in .1 secs */
800Sstevel@tonic-gate 	int			retrans;	/* times to retry send */
810Sstevel@tonic-gate 	char			*hostname;	/* server's hostname */
820Sstevel@tonic-gate 	int			acregmin;	/* attr cache file min secs */
830Sstevel@tonic-gate 	int			acregmax;	/* attr cache file max secs */
840Sstevel@tonic-gate 	int			acdirmin;	/* attr cache dir min secs */
850Sstevel@tonic-gate 	int			acdirmax;	/* attr cache dir max secs */
860Sstevel@tonic-gate 	char			*netname;	/* server's netname */
870Sstevel@tonic-gate 	struct pathcnf		*pathconf;	/* static pathconf kludge */
880Sstevel@tonic-gate };
890Sstevel@tonic-gate 
900Sstevel@tonic-gate /*
910Sstevel@tonic-gate  * NFS mount option flags
920Sstevel@tonic-gate  */
930Sstevel@tonic-gate #define	NFSMNT_SOFT	0x001	/* soft mount (hard is default) */
940Sstevel@tonic-gate #define	NFSMNT_WSIZE	0x002	/* set write size */
950Sstevel@tonic-gate #define	NFSMNT_RSIZE	0x004	/* set read size */
960Sstevel@tonic-gate #define	NFSMNT_TIMEO	0x008	/* set initial timeout */
970Sstevel@tonic-gate #define	NFSMNT_RETRANS	0x010	/* set number of request retrys */
980Sstevel@tonic-gate #define	NFSMNT_HOSTNAME	0x020	/* set hostname for error printf */
990Sstevel@tonic-gate #define	NFSMNT_INT	0x040	/* allow interrupts on hard mount */
1000Sstevel@tonic-gate #define	NFSMNT_NOAC	0x080	/* don't cache attributes */
1010Sstevel@tonic-gate #define	NFSMNT_ACREGMIN	0x0100	/* set min secs for file attr cache */
1020Sstevel@tonic-gate #define	NFSMNT_ACREGMAX	0x0200	/* set max secs for file attr cache */
1030Sstevel@tonic-gate #define	NFSMNT_ACDIRMIN	0x0400	/* set min secs for dir attr cache */
1040Sstevel@tonic-gate #define	NFSMNT_ACDIRMAX	0x0800	/* set max secs for dir attr cache */
1050Sstevel@tonic-gate #define	NFSMNT_SECURE	0x1000	/* secure mount */
1060Sstevel@tonic-gate #define	NFSMNT_NOCTO	0x2000	/* no close-to-open consistency */
1070Sstevel@tonic-gate #define	NFSMNT_POSIX	0x4000	/* static pathconf kludge info */
1080Sstevel@tonic-gate 
1090Sstevel@tonic-gate #endif	/* !_sys_mount_h */
110