14bff34e3Sthurlow /*
24bff34e3Sthurlow  * Copyright (c) 2000-2001, Boris Popov
34bff34e3Sthurlow  * All rights reserved.
44bff34e3Sthurlow  *
54bff34e3Sthurlow  * Redistribution and use in source and binary forms, with or without
64bff34e3Sthurlow  * modification, are permitted provided that the following conditions
74bff34e3Sthurlow  * are met:
84bff34e3Sthurlow  * 1. Redistributions of source code must retain the above copyright
94bff34e3Sthurlow  *	notice, this list of conditions and the following disclaimer.
104bff34e3Sthurlow  * 2. Redistributions in binary form must reproduce the above copyright
114bff34e3Sthurlow  *	notice, this list of conditions and the following disclaimer in the
124bff34e3Sthurlow  *	documentation and/or other materials provided with the distribution.
134bff34e3Sthurlow  * 3. All advertising materials mentioning features or use of this software
144bff34e3Sthurlow  *	must display the following acknowledgement:
154bff34e3Sthurlow  *	This product includes software developed by Boris Popov.
164bff34e3Sthurlow  * 4. Neither the name of the author nor the names of any co-contributors
174bff34e3Sthurlow  *	may be used to endorse or promote products derived from this software
184bff34e3Sthurlow  *	without specific prior written permission.
194bff34e3Sthurlow  *
204bff34e3Sthurlow  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
214bff34e3Sthurlow  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
224bff34e3Sthurlow  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
234bff34e3Sthurlow  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
244bff34e3Sthurlow  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
254bff34e3Sthurlow  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
264bff34e3Sthurlow  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
274bff34e3Sthurlow  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
284bff34e3Sthurlow  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
294bff34e3Sthurlow  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
304bff34e3Sthurlow  * SUCH DAMAGE.
314bff34e3Sthurlow  *
324bff34e3Sthurlow  * $Id: smbfs.h,v 1.30.100.1 2005/05/27 02:35:28 lindak Exp $
334bff34e3Sthurlow  */
344bff34e3Sthurlow 
354bff34e3Sthurlow /*
36*bd7c6f51SGordon Ross  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
374bff34e3Sthurlow  * Use is subject to license terms.
384bff34e3Sthurlow  */
394bff34e3Sthurlow 
404bff34e3Sthurlow #ifndef	_SMBFS_MOUNT_H
414bff34e3Sthurlow #define	_SMBFS_MOUNT_H
424bff34e3Sthurlow 
434bff34e3Sthurlow /*
444bff34e3Sthurlow  * This file defines the interface used by mount_smbfs.
454bff34e3Sthurlow  * Some of this came from the Darwin file:
464bff34e3Sthurlow  *   smb-217.2/kernel/fs/smbfs/smbfs.h
474bff34e3Sthurlow  */
484bff34e3Sthurlow 
494bff34e3Sthurlow #define	SMBFS_VERMAJ	1
5002d09e03SGordon Ross #define	SMBFS_VERMIN	3300
514bff34e3Sthurlow #define	SMBFS_VERSION	(SMBFS_VERMAJ*100000 + SMBFS_VERMIN)
5202d09e03SGordon Ross #define	SMBFS_VER_STR	"1.33"
534bff34e3Sthurlow 
544bff34e3Sthurlow #define	SMBFS_VFSNAME	"smbfs"
554bff34e3Sthurlow 
56*bd7c6f51SGordon Ross /* Additions not in mntent.h */
57*bd7c6f51SGordon Ross #define	MNTOPT_ACL	"acl"		/* enable smbfs ACLs */
58*bd7c6f51SGordon Ross #define	MNTOPT_NOACL	"noacl"		/* disable smbfs ACLs */
59*bd7c6f51SGordon Ross 
6002d09e03SGordon Ross /* Values for smbfs_args.flags */
6102d09e03SGordon Ross #define	SMBFS_MF_SOFT		0x0001
6202d09e03SGordon Ross #define	SMBFS_MF_INTR		0x0002
6302d09e03SGordon Ross #define	SMBFS_MF_NOAC		0x0004
6402d09e03SGordon Ross #define	SMBFS_MF_ACREGMIN	0x0100	/* set min secs for file attr cache */
6502d09e03SGordon Ross #define	SMBFS_MF_ACREGMAX	0x0200	/* set max secs for file attr cache */
6602d09e03SGordon Ross #define	SMBFS_MF_ACDIRMIN	0x0400	/* set min secs for dir attr cache */
6702d09e03SGordon Ross #define	SMBFS_MF_ACDIRMAX	0x0800	/* set max secs for dir attr cache */
684bff34e3Sthurlow 
694bff34e3Sthurlow /* Layout of the mount control block for an smb file system. */
704bff34e3Sthurlow struct smbfs_args {
714bff34e3Sthurlow 	int		version;		/* smbfs mount version */
724bff34e3Sthurlow 	int		devfd;			/* file descriptor */
7302d09e03SGordon Ross 	uint_t		flags;			/* SMBFS_MF_ flags */
744bff34e3Sthurlow 	uid_t		uid;			/* octal user id */
754bff34e3Sthurlow 	gid_t		gid;			/* octal group id */
7602d09e03SGordon Ross 	mode_t		file_mode;		/* octal srwx for files */
7702d09e03SGordon Ross 	mode_t		dir_mode;		/* octal srwx for dirs */
7802d09e03SGordon Ross 	int		acregmin;		/* attr cache file min secs */
7902d09e03SGordon Ross 	int		acregmax;		/* attr cache file max secs */
8002d09e03SGordon Ross 	int		acdirmin;		/* attr cache dir min secs */
8102d09e03SGordon Ross 	int		acdirmax;		/* attr cache dir max secs */
824bff34e3Sthurlow };
834bff34e3Sthurlow 
844bff34e3Sthurlow #ifdef _SYSCALL32
854bff34e3Sthurlow 
864bff34e3Sthurlow /* Layout of the mount control block for an smb file system. */
874bff34e3Sthurlow struct smbfs_args32 {
884bff34e3Sthurlow 	int32_t		version;		/* smbfs mount version */
894bff34e3Sthurlow 	int32_t		devfd;			/* file descriptor */
9002d09e03SGordon Ross 	uint32_t	flags;			/* SMBFS_MF_ flags */
914bff34e3Sthurlow 	uid32_t		uid;			/* octal user id */
924bff34e3Sthurlow 	gid32_t		gid;			/* octal group id */
9302d09e03SGordon Ross 	mode32_t	file_mode;		/* octal srwx for files */
9402d09e03SGordon Ross 	mode32_t	dir_mode;		/* octal srwx for dirs */
9502d09e03SGordon Ross 	int32_t		acregmin;		/* attr cache file min secs */
9602d09e03SGordon Ross 	int32_t		acregmax;		/* attr cache file max secs */
9702d09e03SGordon Ross 	int32_t		acdirmin;		/* attr cache dir min secs */
9802d09e03SGordon Ross 	int32_t		acdirmax;		/* attr cache dir max secs */
994bff34e3Sthurlow };
1004bff34e3Sthurlow 
1014bff34e3Sthurlow #endif /* _SYSCALL32 */
1024bff34e3Sthurlow #endif	/* _SMBFS_MOUNT_H */
103