xref: /titanic_52/usr/src/uts/common/smbsrv/mac_cifs.h (revision fcf3ce441efd61da9bb2884968af01cb7c1452cc)
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 2007 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 #pragma ident	"%Z%%M%	%I%	%E% SMI"
30 
31 /*
32  * This file provides definitions for the Macintosh Extensions for CIFS
33  * interface (see http://www.thursby.com/cifs).
34  */
35 
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39 
40 
41 /*
42  * Macintosh information level extensions. The entire list is presented
43  * here for convenience but for consistency with the existing CIFS
44  * information levels don't use these values directly. Use the SMB_MAC_
45  * definitions in cifs.h.
46  *
47  * SmbTrans2QueryFsInformation:		MAC_QUERY_FS_INFO
48  * SmbTrans2Find{First|Next}2:		MAC_FIND_BOTH_HFS_INFO
49  * SmbTrans2SetPathInformation:		MAC_SET_FINDER_INFO
50  * SmbTrans2QueryPathInformation:	MAC_DT_{ADD|REMOVE|GET}_{APPL|ICON}
51  */
52 #define	MAC_QUERY_FS_INFO			0x301
53 #define	MAC_FIND_BOTH_HFS_INFO			0x302
54 #define	MAC_SET_FINDER_INFO			0x303
55 #define	MAC_DT_ADD_APPL				0x304
56 #define	MAC_DT_REMOVE_APPL			0x305
57 #define	MAC_DT_GET_APPL				0x306
58 #define	MAC_DT_GET_ICON				0x307
59 #define	MAC_DT_GET_ICON_INFO			0x308
60 #define	MAC_DT_ADD_ICON				0x309
61 
62 
63 /*
64  * Macintosh extensions support bits. Returned by the server in response
65  * to a TRANS2_QUERY_FS_INFORMATION request when the information level
66  * is MAC_QUERY_FS_INFO.
67  */
68 #define	MAC_SUPPORT_ACCESS_CONTROL		0x0010
69 #define	MAC_SUPPORT_GETSETCOMMENTS		0x0020
70 #define	MAC_SUPPORT_DESKTOPDB_CALLS		0x0040
71 #define	MAC_SUPPORT_UNIQUE_IDS			0x0080
72 #define	MAC_SUPPORT_NO_STREAMS			0x0100
73 
74 
75 /*
76  * The MAC_ACCESS values are returned from the MAC_FIND_BOTH_HFS_INFO
77  * info level of TRANS2_FIND. Set SUPPORT_MAC_ACCESS_CNTRL to enable
78  * support.
79  *
80  * The MAC_OWNER bit indicates that the user is the owner of the file
81  * or directory.
82  */
83 #define	MAC_ACCESS_OWNER			0x0800
84 #define	MAC_ACCESS_OWNER_READ			0x0400
85 #define	MAC_ACCESS_OWNER_WRITE			0x0200
86 #define	MAC_ACCESS_OWNER_SEARCH			0x0100
87 #define	MAC_ACCESS_GROUP_READ			0x0040
88 #define	MAC_ACCESS_GROUP_WRITE			0x0020
89 #define	MAC_ACCESS_GROUP_SEARCH			0x0010
90 #define	MAC_ACCESS_OTHER_READ			0x0004
91 #define	MAC_ACCESS_OTHER_WRITE			0x0002
92 #define	MAC_ACCESS_OTHER_SEARCH			0x0001
93 
94 
95 /*
96  * The MAC_FINDER values support the SMB_MAC_SET_FINDER_INFO info level
97  * of TRANS2_SET_PATH_INFORMATION.
98  */
99 #define	MAC_FINDER_SET_CREATE_DATE		0x0001
100 #define	MAC_FINDER_SET_MODE_DATE		0x0002
101 #define	MAC_FINDER_SET_FL_ATTRIB		0x0004
102 #define	MAC_FINDER_SET_INFO1			0x0008
103 #define	MAC_FINDER_SET_INFO2			0x0010
104 #define	MAC_FINDER_SET_HIDDEN			0x0020
105 
106 
107 #ifdef __cplusplus
108 }
109 #endif
110 
111 
112 #endif /* _SMBSRV_MAC_CIFS_H */
113