xref: /titanic_41/usr/src/uts/common/sys/fs/smbfs_mount.h (revision c0889d7a91fa87e1cb7ef4457629b0cb51d47b50)
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 2008 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 #pragma ident	"%Z%%M%	%I%	%E% SMI"
44 
45 /*
46  * This file defines the interface used by mount_smbfs.
47  * Some of this came from the Darwin file:
48  *   smb-217.2/kernel/fs/smbfs/smbfs.h
49  */
50 
51 #define	SMBFS_VERMAJ	1
52 #define	SMBFS_VERMIN	3200
53 #define	SMBFS_VERSION	(SMBFS_VERMAJ*100000 + SMBFS_VERMIN)
54 #define	SMBFS_VER_STR	"1.32"
55 
56 #define	SMBFS_VFSNAME	"smbfs"
57 
58 /* Values for flags */
59 #define	SMBFS_MOUNT_SOFT	0x0001
60 #define	SMBFS_MOUNT_INTR	0x0002
61 #define	SMBFS_MOUNT_STRONG	  0x0004
62 #define	SMBFS_MOUNT_HAVE_NLS	0x0008
63 #define	SMBFS_MOUNT_NO_LONG	 0x0010
64 #define	SMBFS_MOUNT_HOSTNAME	0x020
65 #define	SMBFS_MOUNT_SEMISOFT	0x200000 /* read soft, modify hard */
66 #define	SMBFS_MOUNT_NOPRINT	 0x400000 /* don't print messages */
67 
68 #define	MNT_RDONLY		0x0001
69 #define	MNT_NODEV		0x0002
70 #define	MNT_NOEXEC		0x0004
71 #define	MNT_NOSUID		0x0008
72 #define	MNT_UNION		0x0010
73 #define	MNT_DONTBROWSE		0x0020
74 #define	MNT_AUTOMOUNTED		0x0040
75 
76 /* Layout of the mount control block for an smb file system. */
77 struct smbfs_args {
78 	int		version;		/* smbfs mount version */
79 	int		devfd;			/* file descriptor */
80 	uint_t		flags;			/* mount options, eg: soft */
81 	mode_t		file_mode;		/* octal srwx for files */
82 	mode_t		dir_mode;		/* octal srwx for dirs */
83 	int		caseopt;		/* convert upper|lower|none */
84 	caddr_t		addr;			/* file server address */
85 	caddr_t		hostname;		/* server's hostname */
86 	caddr_t		sharename;		/* server's sharename */
87 	uid_t		uid;			/* octal user id */
88 	gid_t		gid;			/* octal group id */
89 };
90 
91 #ifdef _SYSCALL32
92 
93 /* Layout of the mount control block for an smb file system. */
94 struct smbfs_args32 {
95 	int32_t		version;		/* smbfs mount version */
96 	int32_t		devfd;			/* file descriptor */
97 	uint_t		flags;			/* mount options, eg: soft */
98 	mode_t		file_mode;		/* octal srwx for files */
99 	mode_t		dir_mode;		/* octal srwx for dirs */
100 	int32_t		caseopt;		/* convert upper|lower|none */
101 	caddr32_t	addr;			/* file server address */
102 	caddr32_t	hostname;		/* server's hostname */
103 	caddr32_t	sharename;		/* server's sharename */
104 	uid32_t		uid;			/* octal user id */
105 	gid32_t		gid;			/* octal group id */
106 };
107 
108 #endif /* _SYSCALL32 */
109 #endif	/* _SMBFS_MOUNT_H */
110