xref: /titanic_51/usr/src/uts/common/sys/fs/smbfs_mount.h (revision b7b0558ae6cf66a2c72f08f9104c1559d962bc84)
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 2009 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 /* Values for smbfs_args.flags */
57 #define	SMBFS_MF_SOFT		0x0001
58 #define	SMBFS_MF_INTR		0x0002
59 #define	SMBFS_MF_NOAC		0x0004
60 #define	SMBFS_MF_ACREGMIN	0x0100	/* set min secs for file attr cache */
61 #define	SMBFS_MF_ACREGMAX	0x0200	/* set max secs for file attr cache */
62 #define	SMBFS_MF_ACDIRMIN	0x0400	/* set min secs for dir attr cache */
63 #define	SMBFS_MF_ACDIRMAX	0x0800	/* set max secs for dir attr cache */
64 
65 /* Layout of the mount control block for an smb file system. */
66 struct smbfs_args {
67 	int		version;		/* smbfs mount version */
68 	int		devfd;			/* file descriptor */
69 	uint_t		flags;			/* SMBFS_MF_ flags */
70 	uid_t		uid;			/* octal user id */
71 	gid_t		gid;			/* octal group id */
72 	mode_t		file_mode;		/* octal srwx for files */
73 	mode_t		dir_mode;		/* octal srwx for dirs */
74 	int		acregmin;		/* attr cache file min secs */
75 	int		acregmax;		/* attr cache file max secs */
76 	int		acdirmin;		/* attr cache dir min secs */
77 	int		acdirmax;		/* attr cache dir max secs */
78 };
79 
80 #ifdef _SYSCALL32
81 
82 /* Layout of the mount control block for an smb file system. */
83 struct smbfs_args32 {
84 	int32_t		version;		/* smbfs mount version */
85 	int32_t		devfd;			/* file descriptor */
86 	uint32_t	flags;			/* SMBFS_MF_ flags */
87 	uid32_t		uid;			/* octal user id */
88 	gid32_t		gid;			/* octal group id */
89 	mode32_t	file_mode;		/* octal srwx for files */
90 	mode32_t	dir_mode;		/* octal srwx for dirs */
91 	int32_t		acregmin;		/* attr cache file min secs */
92 	int32_t		acregmax;		/* attr cache file max secs */
93 	int32_t		acdirmin;		/* attr cache dir min secs */
94 	int32_t		acdirmax;		/* attr cache dir max secs */
95 };
96 
97 #endif /* _SYSCALL32 */
98 #endif	/* _SMBFS_MOUNT_H */
99