xref: /titanic_41/usr/src/uts/common/smbsrv/smb_ioctl.h (revision e802abbda8c322f24d47835734f4a793ef15ddc8)
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 2008 Sun Microsystems, Inc.  All rights reserved.
23  * Use is subject to license terms.
24  */
25 
26 #ifndef _SMB_IOCTL_H_
27 #define	_SMB_IOCTL_H_
28 
29 #ifdef	__cplusplus
30 extern "C" {
31 #endif
32 
33 #include <sys/types.h>
34 #include <smbsrv/smbinfo.h>
35 
36 #define	SMB_IOC_VERSION		0x534D4201	/* SMB1 */
37 
38 #define	SMB_IOC_BASE		(('S' << 16) | ('B' << 8))
39 
40 #define	SMB_IOC_CONFIG		_IOW(SMB_IOC_BASE, 1, int)
41 #define	SMB_IOC_START		_IOW(SMB_IOC_BASE, 2, int)
42 #define	SMB_IOC_NBT_LISTEN	_IOW(SMB_IOC_BASE, 3, int)
43 #define	SMB_IOC_TCP_LISTEN	_IOW(SMB_IOC_BASE, 4, int)
44 #define	SMB_IOC_NBT_RECEIVE	_IOW(SMB_IOC_BASE, 5, int)
45 #define	SMB_IOC_TCP_RECEIVE	_IOW(SMB_IOC_BASE, 6, int)
46 #define	SMB_IOC_GMTOFF		_IOW(SMB_IOC_BASE, 7, int)
47 
48 #pragma	pack(1)
49 
50 typedef struct {
51 	uint32_t	sio_version;
52 	uint32_t	sio_crc;
53 
54 	union {
55 		int32_t		gmtoff;
56 		int		error;
57 		smb_kmod_cfg_t	cfg;
58 
59 		struct smb_io_start {
60 			int	opipe;
61 			int	lmshrd;
62 			int	udoor;
63 		} start;
64 	} sio_data;
65 } smb_io_t;
66 
67 #pragma	pack()
68 
69 uint32_t smb_crc_gen(uint8_t *, size_t);
70 
71 #ifdef __cplusplus
72 }
73 #endif
74 
75 #endif /* _SMB_IOCTL_H_ */
76