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