xref: /titanic_44/usr/src/uts/common/smbsrv/mac_cifs.h (revision bbf6f00c25b6a2bed23c35eac6d62998ecdb338c)
1da6c28aaSamw /*
2da6c28aaSamw  * CDDL HEADER START
3da6c28aaSamw  *
4da6c28aaSamw  * The contents of this file are subject to the terms of the
5da6c28aaSamw  * Common Development and Distribution License (the "License").
6da6c28aaSamw  * You may not use this file except in compliance with the License.
7da6c28aaSamw  *
8da6c28aaSamw  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9da6c28aaSamw  * or http://www.opensolaris.org/os/licensing.
10da6c28aaSamw  * See the License for the specific language governing permissions
11da6c28aaSamw  * and limitations under the License.
12da6c28aaSamw  *
13da6c28aaSamw  * When distributing Covered Code, include this CDDL HEADER in each
14da6c28aaSamw  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15da6c28aaSamw  * If applicable, add the following below this CDDL HEADER, with the
16da6c28aaSamw  * fields enclosed by brackets "[]" replaced with your own identifying
17da6c28aaSamw  * information: Portions Copyright [yyyy] [name of copyright owner]
18da6c28aaSamw  *
19da6c28aaSamw  * CDDL HEADER END
20da6c28aaSamw  */
21da6c28aaSamw /*
22*bbf6f00cSJordan Brown  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23da6c28aaSamw  * Use is subject to license terms.
24da6c28aaSamw  */
25da6c28aaSamw 
26da6c28aaSamw #ifndef _SMBSRV_MAC_CIFS_H
27da6c28aaSamw #define	_SMBSRV_MAC_CIFS_H
28da6c28aaSamw 
29da6c28aaSamw /*
30da6c28aaSamw  * This file provides definitions for the Macintosh Extensions for CIFS
31da6c28aaSamw  * interface (see http://www.thursby.com/cifs).
32da6c28aaSamw  */
33da6c28aaSamw 
34da6c28aaSamw #ifdef __cplusplus
35da6c28aaSamw extern "C" {
36da6c28aaSamw #endif
37da6c28aaSamw 
38da6c28aaSamw 
39da6c28aaSamw /*
40da6c28aaSamw  * Macintosh information level extensions. The entire list is presented
41da6c28aaSamw  * here for convenience but for consistency with the existing CIFS
42da6c28aaSamw  * information levels don't use these values directly. Use the SMB_MAC_
43*bbf6f00cSJordan Brown  * definitions in smb.h.
44da6c28aaSamw  *
45da6c28aaSamw  * SmbTrans2QueryFsInformation:		MAC_QUERY_FS_INFO
46da6c28aaSamw  * SmbTrans2Find{First|Next}2:		MAC_FIND_BOTH_HFS_INFO
47da6c28aaSamw  * SmbTrans2SetPathInformation:		MAC_SET_FINDER_INFO
48da6c28aaSamw  * SmbTrans2QueryPathInformation:	MAC_DT_{ADD|REMOVE|GET}_{APPL|ICON}
49da6c28aaSamw  */
50da6c28aaSamw #define	MAC_QUERY_FS_INFO			0x301
51da6c28aaSamw #define	MAC_FIND_BOTH_HFS_INFO			0x302
52da6c28aaSamw #define	MAC_SET_FINDER_INFO			0x303
53da6c28aaSamw #define	MAC_DT_ADD_APPL				0x304
54da6c28aaSamw #define	MAC_DT_REMOVE_APPL			0x305
55da6c28aaSamw #define	MAC_DT_GET_APPL				0x306
56da6c28aaSamw #define	MAC_DT_GET_ICON				0x307
57da6c28aaSamw #define	MAC_DT_GET_ICON_INFO			0x308
58da6c28aaSamw #define	MAC_DT_ADD_ICON				0x309
59da6c28aaSamw 
60da6c28aaSamw 
61da6c28aaSamw /*
62da6c28aaSamw  * Macintosh extensions support bits. Returned by the server in response
63da6c28aaSamw  * to a TRANS2_QUERY_FS_INFORMATION request when the information level
64da6c28aaSamw  * is MAC_QUERY_FS_INFO.
65da6c28aaSamw  */
66da6c28aaSamw #define	MAC_SUPPORT_ACCESS_CONTROL		0x0010
67da6c28aaSamw #define	MAC_SUPPORT_GETSETCOMMENTS		0x0020
68da6c28aaSamw #define	MAC_SUPPORT_DESKTOPDB_CALLS		0x0040
69da6c28aaSamw #define	MAC_SUPPORT_UNIQUE_IDS			0x0080
70da6c28aaSamw #define	MAC_SUPPORT_NO_STREAMS			0x0100
71da6c28aaSamw 
72da6c28aaSamw 
73da6c28aaSamw /*
74da6c28aaSamw  * The MAC_ACCESS values are returned from the MAC_FIND_BOTH_HFS_INFO
75da6c28aaSamw  * info level of TRANS2_FIND. Set SUPPORT_MAC_ACCESS_CNTRL to enable
76da6c28aaSamw  * support.
77da6c28aaSamw  *
78da6c28aaSamw  * The MAC_OWNER bit indicates that the user is the owner of the file
79da6c28aaSamw  * or directory.
80da6c28aaSamw  */
81da6c28aaSamw #define	MAC_ACCESS_OWNER			0x0800
82da6c28aaSamw #define	MAC_ACCESS_OWNER_READ			0x0400
83da6c28aaSamw #define	MAC_ACCESS_OWNER_WRITE			0x0200
84da6c28aaSamw #define	MAC_ACCESS_OWNER_SEARCH			0x0100
85da6c28aaSamw #define	MAC_ACCESS_GROUP_READ			0x0040
86da6c28aaSamw #define	MAC_ACCESS_GROUP_WRITE			0x0020
87da6c28aaSamw #define	MAC_ACCESS_GROUP_SEARCH			0x0010
88da6c28aaSamw #define	MAC_ACCESS_OTHER_READ			0x0004
89da6c28aaSamw #define	MAC_ACCESS_OTHER_WRITE			0x0002
90da6c28aaSamw #define	MAC_ACCESS_OTHER_SEARCH			0x0001
91da6c28aaSamw 
92da6c28aaSamw 
93da6c28aaSamw /*
94da6c28aaSamw  * The MAC_FINDER values support the SMB_MAC_SET_FINDER_INFO info level
95da6c28aaSamw  * of TRANS2_SET_PATH_INFORMATION.
96da6c28aaSamw  */
97da6c28aaSamw #define	MAC_FINDER_SET_CREATE_DATE		0x0001
98da6c28aaSamw #define	MAC_FINDER_SET_MODE_DATE		0x0002
99da6c28aaSamw #define	MAC_FINDER_SET_FL_ATTRIB		0x0004
100da6c28aaSamw #define	MAC_FINDER_SET_INFO1			0x0008
101da6c28aaSamw #define	MAC_FINDER_SET_INFO2			0x0010
102da6c28aaSamw #define	MAC_FINDER_SET_HIDDEN			0x0020
103da6c28aaSamw 
104da6c28aaSamw 
105da6c28aaSamw #ifdef __cplusplus
106da6c28aaSamw }
107da6c28aaSamw #endif
108da6c28aaSamw 
109da6c28aaSamw 
110da6c28aaSamw #endif /* _SMBSRV_MAC_CIFS_H */
111