xref: /titanic_44/usr/src/uts/common/sys/fs/smbfs_mount.h (revision 8d738d7d1f42180d941afa8b9a7310a2a437d17c)
1 /*
2  * Copyright (c) 2000-2001, Boris Popov
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  * 1. Redistributions of source code must retain the above copyright
9  *	notice, this list of conditions and the following disclaimer.
10  * 2. Redistributions in binary form must reproduce the above copyright
11  *	notice, this list of conditions and the following disclaimer in the
12  *	documentation and/or other materials provided with the distribution.
13  * 3. All advertising materials mentioning features or use of this software
14  *	must display the following acknowledgement:
15  *	This product includes software developed by Boris Popov.
16  * 4. Neither the name of the author nor the names of any co-contributors
17  *	may be used to endorse or promote products derived from this software
18  *	without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
21  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
24  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30  * SUCH DAMAGE.
31  *
32  * $Id: smbfs.h,v 1.30.100.1 2005/05/27 02:35:28 lindak Exp $
33  */
34 
35 /*
36  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
37  * Use is subject to license terms.
38  */
39 
40 #ifndef	_SMBFS_MOUNT_H
41 #define	_SMBFS_MOUNT_H
42 
43 /*
44  * This file defines the interface used by mount_smbfs.
45  * Some of this came from the Darwin file:
46  *   smb-217.2/kernel/fs/smbfs/smbfs.h
47  */
48 
49 #define	SMBFS_VERMAJ	1
50 #define	SMBFS_VERMIN	3300
51 #define	SMBFS_VERSION	(SMBFS_VERMAJ*100000 + SMBFS_VERMIN)
52 #define	SMBFS_VER_STR	"1.33"
53 
54 #define	SMBFS_VFSNAME	"smbfs"
55 
56 /* Additions not in mntent.h */
57 #define	MNTOPT_ACL	"acl"		/* enable smbfs ACLs */
58 #define	MNTOPT_NOACL	"noacl"		/* disable smbfs ACLs */
59 
60 /* Values for smbfs_args.flags */
61 #define	SMBFS_MF_SOFT		0x0001
62 #define	SMBFS_MF_INTR		0x0002
63 #define	SMBFS_MF_NOAC		0x0004
64 #define	SMBFS_MF_ACREGMIN	0x0100	/* set min secs for file attr cache */
65 #define	SMBFS_MF_ACREGMAX	0x0200	/* set max secs for file attr cache */
66 #define	SMBFS_MF_ACDIRMIN	0x0400	/* set min secs for dir attr cache */
67 #define	SMBFS_MF_ACDIRMAX	0x0800	/* set max secs for dir attr cache */
68 
69 /* Layout of the mount control block for an smb file system. */
70 struct smbfs_args {
71 	int		version;		/* smbfs mount version */
72 	int		devfd;			/* file descriptor */
73 	uint_t		flags;			/* SMBFS_MF_ flags */
74 	uid_t		uid;			/* octal user id */
75 	gid_t		gid;			/* octal group id */
76 	mode_t		file_mode;		/* octal srwx for files */
77 	mode_t		dir_mode;		/* octal srwx for dirs */
78 	int		acregmin;		/* attr cache file min secs */
79 	int		acregmax;		/* attr cache file max secs */
80 	int		acdirmin;		/* attr cache dir min secs */
81 	int		acdirmax;		/* attr cache dir max secs */
82 };
83 
84 #ifdef _SYSCALL32
85 
86 /* Layout of the mount control block for an smb file system. */
87 struct smbfs_args32 {
88 	int32_t		version;		/* smbfs mount version */
89 	int32_t		devfd;			/* file descriptor */
90 	uint32_t	flags;			/* SMBFS_MF_ flags */
91 	uid32_t		uid;			/* octal user id */
92 	gid32_t		gid;			/* octal group id */
93 	mode32_t	file_mode;		/* octal srwx for files */
94 	mode32_t	dir_mode;		/* octal srwx for dirs */
95 	int32_t		acregmin;		/* attr cache file min secs */
96 	int32_t		acregmax;		/* attr cache file max secs */
97 	int32_t		acdirmin;		/* attr cache dir min secs */
98 	int32_t		acdirmax;		/* attr cache dir max secs */
99 };
100 
101 #endif /* _SYSCALL32 */
102 #endif	/* _SMBFS_MOUNT_H */
103