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 (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
23 * Copyright 2015 Nexenta Systems, Inc. All rights reserved.
24 * Copyright 2017 Joyent, Inc.
25 */
26
27 #ifndef _SMB_IOCTL_H_
28 #define _SMB_IOCTL_H_
29
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33
34 #include <sys/types.h>
35 #include <sys/param.h>
36 #include <smbsrv/smbinfo.h>
37
38 #define SMB_IOC_VERSION 0x534D4201 /* SMB1 */
39
40 #define SMB_IOC_BASE (('S' << 16) | ('B' << 8))
41
42 #define SMB_IOC_CONFIG _IOW(SMB_IOC_BASE, 1, int)
43 #define SMB_IOC_START _IOW(SMB_IOC_BASE, 2, int)
155 uint32_t uniqid;
156 } smb_ioc_fileid_t;
157
158 /* See also: smb_kmod_cfg_t */
159 typedef struct smb_ioc_cfg {
160 smb_ioc_header_t hdr;
161 uint32_t maxworkers;
162 uint32_t maxconnections;
163 uint32_t keepalive;
164 int32_t restrict_anon;
165 int32_t signing_enable;
166 int32_t signing_required;
167 int32_t oplock_enable;
168 int32_t sync_enable;
169 int32_t secmode;
170 int32_t netbios_enable;
171 int32_t ipv6_enable;
172 int32_t print_enable;
173 int32_t traverse_mounts;
174 uint32_t max_protocol;
175 uint32_t exec_flags;
176 uint32_t negtok_len;
177 smb_version_t version;
178 uint16_t initial_credits;
179 uint16_t maximum_credits;
180 /* SMB negotiate protocol response. */
181 uuid_t machine_uuid;
182 uchar_t negtok[SMB_PI_MAX_NEGTOK];
183 char native_os[SMB_PI_MAX_NATIVE_OS];
184 char native_lm[SMB_PI_MAX_LANMAN];
185 char nbdomain[NETBIOS_NAME_SZ];
186 char fqdn[SMB_PI_MAX_DOMAIN];
187 char hostname[SMB_PI_MAX_HOST];
188 char system_comment[SMB_PI_MAX_COMMENT];
189 } smb_ioc_cfg_t;
190
191 typedef union smb_ioc {
192 smb_ioc_header_t ioc_hdr;
193 smb_ioc_gmt_t ioc_gmt;
194 smb_ioc_cfg_t ioc_cfg;
|
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 (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
23 * Copyright 2017 Nexenta Systems, Inc. All rights reserved.
24 * Copyright 2017 Joyent, Inc.
25 */
26
27 #ifndef _SMB_IOCTL_H_
28 #define _SMB_IOCTL_H_
29
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33
34 #include <sys/types.h>
35 #include <sys/param.h>
36 #include <smbsrv/smbinfo.h>
37
38 #define SMB_IOC_VERSION 0x534D4201 /* SMB1 */
39
40 #define SMB_IOC_BASE (('S' << 16) | ('B' << 8))
41
42 #define SMB_IOC_CONFIG _IOW(SMB_IOC_BASE, 1, int)
43 #define SMB_IOC_START _IOW(SMB_IOC_BASE, 2, int)
155 uint32_t uniqid;
156 } smb_ioc_fileid_t;
157
158 /* See also: smb_kmod_cfg_t */
159 typedef struct smb_ioc_cfg {
160 smb_ioc_header_t hdr;
161 uint32_t maxworkers;
162 uint32_t maxconnections;
163 uint32_t keepalive;
164 int32_t restrict_anon;
165 int32_t signing_enable;
166 int32_t signing_required;
167 int32_t oplock_enable;
168 int32_t sync_enable;
169 int32_t secmode;
170 int32_t netbios_enable;
171 int32_t ipv6_enable;
172 int32_t print_enable;
173 int32_t traverse_mounts;
174 uint32_t max_protocol;
175 uint32_t min_protocol;
176 uint32_t encrypt;
177 uint32_t exec_flags;
178 uint32_t negtok_len;
179 smb_version_t version;
180 uint16_t initial_credits;
181 uint16_t maximum_credits;
182 /* SMB negotiate protocol response. */
183 uuid_t machine_uuid;
184 uchar_t negtok[SMB_PI_MAX_NEGTOK];
185 char native_os[SMB_PI_MAX_NATIVE_OS];
186 char native_lm[SMB_PI_MAX_LANMAN];
187 char nbdomain[NETBIOS_NAME_SZ];
188 char fqdn[SMB_PI_MAX_DOMAIN];
189 char hostname[SMB_PI_MAX_HOST];
190 char system_comment[SMB_PI_MAX_COMMENT];
191 } smb_ioc_cfg_t;
192
193 typedef union smb_ioc {
194 smb_ioc_header_t ioc_hdr;
195 smb_ioc_gmt_t ioc_gmt;
196 smb_ioc_cfg_t ioc_cfg;
|