1 /*
2  * This file and its contents are supplied under the terms of the
3  * Common Development and Distribution License ("CDDL"), version 1.0.
4  * You may only use this file in accordance with the terms of version
5  * 1.0 of the CDDL.
6  *
7  * A full copy of the text of the CDDL should have accompanied this
8  * source.  A copy of the CDDL is also available via the Internet at
9  * http://www.illumos.org/license/CDDL.
10  */
11 
12 /*
13  * Copyright 2017 Nexenta Systems, Inc.  All rights reserved.
14  */
15 
16 #ifndef	_LIBFKNSMB_H_
17 #define	_LIBFKNSMB_H_
18 
19 #include <sys/types.h>
20 #include <sys/types32.h>
21 #include <sys/cred.h>
22 
23 #ifdef	__cplusplus
24 extern "C" {
25 #endif
26 
27 struct smb_share;
28 
29 extern const uint32_t nsmb_version;
30 extern void streams_msg_init(void);
31 
32 int nsmb_drv_init(void);
33 int nsmb_drv_fini(void);
34 /* These are dev32_t because they're cast to int in user code. */
35 int nsmb_drv_ioctl(dev32_t dev, int cmd, intptr_t arg, int flags);
36 int nsmb_drv_open(dev32_t *dev, int flags, int otyp);
37 int nsmb_drv_close(dev32_t dev, int flags, int otyp);
38 int smb_dev2share(int fd, struct smb_share **sspp);
39 void nsmb_drv_load(void);
40 
41 #ifdef __cplusplus
42 }
43 #endif
44 
45 #endif	/* _LIBFKNSMB_H_ */
46