s4/param: Expose lpcfg_smb_ports and lpcfg_socket_options, which are both required...
[Samba/gebeck_regimport.git] / libcli / smb / smb_constants.h
blob54898c9b4f5d433d27367901fca4f6380456f686
1 /*
2 Unix SMB/CIFS implementation.
4 SMB parameters and setup, plus a whole lot more.
6 Copyright (C) Andrew Tridgell 2011
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 3 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <http://www.gnu.org/licenses/>.
22 #ifndef _SMB_CONSTANTS_H
23 #define _SMB_CONSTANTS_H
26 * Netbios over TCP (rfc 1002)
28 #define NBSSmessage 0x00 /* session message */
29 #define NBSSrequest 0x81 /* session request */
30 #define NBSSpositive 0x82 /* positiv session response */
31 #define NBSSnegative 0x83 /* negativ session response */
32 #define NBSSretarget 0x84 /* retarget session response */
33 #define NBSSkeepalive 0x85 /* keepalive */
35 /* protocol types. It assumes that higher protocols include lower protocols
36 as subsets. */
37 enum protocol_types {
38 PROTOCOL_NONE,
39 PROTOCOL_CORE,
40 PROTOCOL_COREPLUS,
41 PROTOCOL_LANMAN1,
42 PROTOCOL_LANMAN2,
43 PROTOCOL_NT1,
44 PROTOCOL_SMB2_02,
45 PROTOCOL_SMB2_10,
46 PROTOCOL_SMB2_22
49 enum smb_signing_setting {
50 SMB_SIGNING_OFF, SMB_SIGNING_SUPPORTED,
51 SMB_SIGNING_REQUIRED, SMB_SIGNING_AUTO};
53 /* Client-side offline caching policy types */
54 enum csc_policy {
55 CSC_POLICY_MANUAL=0,
56 CSC_POLICY_DOCUMENTS=1,
57 CSC_POLICY_PROGRAMS=2,
58 CSC_POLICY_DISABLE=3
61 /* NT Flags2 bits - cifs6.txt section 3.1.2 */
62 #define FLAGS2_LONG_PATH_COMPONENTS 0x0001
63 #define FLAGS2_EXTENDED_ATTRIBUTES 0x0002
64 #define FLAGS2_SMB_SECURITY_SIGNATURES 0x0004
65 #define FLAGS2_SMB_SECURITY_SIGNATURES_REQUIRED 0x0010
66 #define FLAGS2_IS_LONG_NAME 0x0040
67 #define FLAGS2_EXTENDED_SECURITY 0x0800
68 #define FLAGS2_DFS_PATHNAMES 0x1000
69 #define FLAGS2_READ_PERMIT_EXECUTE 0x2000
70 #define FLAGS2_32_BIT_ERROR_CODES 0x4000
71 #define FLAGS2_UNICODE_STRINGS 0x8000
72 #define FLAGS2_WIN2K_SIGNATURE 0xC852 /* Hack alert ! For now... JRA. */
74 /* FileAttributes (search attributes) field */
75 #define FILE_ATTRIBUTE_READONLY 0x0001L
76 #define FILE_ATTRIBUTE_HIDDEN 0x0002L
77 #define FILE_ATTRIBUTE_SYSTEM 0x0004L
78 #define FILE_ATTRIBUTE_VOLUME 0x0008L
79 #define FILE_ATTRIBUTE_DIRECTORY 0x0010L
80 #define FILE_ATTRIBUTE_ARCHIVE 0x0020L
81 #define FILE_ATTRIBUTE_DEVICE 0x0040L
82 #define FILE_ATTRIBUTE_NORMAL 0x0080L
83 #define FILE_ATTRIBUTE_TEMPORARY 0x0100L
84 #define FILE_ATTRIBUTE_SPARSE 0x0200L
85 #define FILE_ATTRIBUTE_REPARSE_POINT 0x0400L
86 #define FILE_ATTRIBUTE_COMPRESSED 0x0800L
87 #define FILE_ATTRIBUTE_OFFLINE 0x1000L
88 #define FILE_ATTRIBUTE_NONINDEXED 0x2000L
89 #define FILE_ATTRIBUTE_ENCRYPTED 0x4000L
90 #define FILE_ATTRIBUTE_ALL_MASK 0x7FFFL
92 #define SAMBA_ATTRIBUTES_MASK (FILE_ATTRIBUTE_READONLY|\
93 FILE_ATTRIBUTE_HIDDEN|\
94 FILE_ATTRIBUTE_SYSTEM|\
95 FILE_ATTRIBUTE_DIRECTORY|\
96 FILE_ATTRIBUTE_ARCHIVE)
98 /* File type flags */
99 #define FILE_TYPE_DISK 0
100 #define FILE_TYPE_BYTE_MODE_PIPE 1
101 #define FILE_TYPE_MESSAGE_MODE_PIPE 2
102 #define FILE_TYPE_PRINTER 3
103 #define FILE_TYPE_COMM_DEVICE 4
104 #define FILE_TYPE_UNKNOWN 0xFFFF
106 #endif /* _SMB_CONSTANTS_H */