1*8329232eSGordon Ross /*
2*8329232eSGordon Ross  * This file and its contents are supplied under the terms of the
3*8329232eSGordon Ross  * Common Development and Distribution License ("CDDL"), version 1.0.
4*8329232eSGordon Ross  * You may only use this file in accordance with the terms of version
5*8329232eSGordon Ross  * 1.0 of the CDDL.
6*8329232eSGordon Ross  *
7*8329232eSGordon Ross  * A full copy of the text of the CDDL should have accompanied this
8*8329232eSGordon Ross  * source.  A copy of the CDDL is also available via the Internet at
9*8329232eSGordon Ross  * http://www.illumos.org/license/CDDL.
10*8329232eSGordon Ross  */
11*8329232eSGordon Ross 
12*8329232eSGordon Ross /*
13*8329232eSGordon Ross  * Copyright 2017 Nexenta Systems, Inc.  All rights reserved.
14*8329232eSGordon Ross  */
15*8329232eSGordon Ross 
16*8329232eSGordon Ross #ifndef _LIBFKSMBFS_H_
17*8329232eSGordon Ross #define	_LIBFKSMBFS_H_
18*8329232eSGordon Ross 
19*8329232eSGordon Ross /*
20*8329232eSGordon Ross  * Declarations for exports in fake_vfs.c
21*8329232eSGordon Ross  */
22*8329232eSGordon Ross 
23*8329232eSGordon Ross #include <sys/types.h>
24*8329232eSGordon Ross #include <sys/cred.h>
25*8329232eSGordon Ross #include <sys/vnode.h>
26*8329232eSGordon Ross #include <sys/vfs.h>
27*8329232eSGordon Ross 
28*8329232eSGordon Ross #ifndef	MAXOFF32_T
29*8329232eSGordon Ross #define	MAXOFF32_T	0x7fffffff
30*8329232eSGordon Ross #endif
31*8329232eSGordon Ross 
32*8329232eSGordon Ross #ifdef __cplusplus
33*8329232eSGordon Ross extern "C" {
34*8329232eSGordon Ross #endif
35*8329232eSGordon Ross 
36*8329232eSGordon Ross /*
37*8329232eSGordon Ross  * Need these visible outside _FAKE_KERNEL for the test CLI.
38*8329232eSGordon Ross  * In the kmod/lib build these duplicate declarations in vfs.h or
39*8329232eSGordon Ross  * vnode.h but that's OK as long as the declarations are identical.
40*8329232eSGordon Ross  */
41*8329232eSGordon Ross struct mounta;
42*8329232eSGordon Ross struct stat64;
43*8329232eSGordon Ross int	fake_installfs(vfsdef_t *);
44*8329232eSGordon Ross int	fake_removefs(vfsdef_t *);
45*8329232eSGordon Ross int	fake_domount(char *, struct mounta *, struct vfs **);
46*8329232eSGordon Ross int	fake_dounmount(struct vfs *, int);
47*8329232eSGordon Ross int	fake_lookup(vnode_t *, char *, vnode_t **);
48*8329232eSGordon Ross int	fake_lookup_dir(char *, vnode_t **, char **);
49*8329232eSGordon Ross int	fake_stat(vnode_t *, struct stat64 *, int);
50*8329232eSGordon Ross int	fake_getdents(vnode_t *, offset_t *, void *, size_t);
51*8329232eSGordon Ross ssize_t	fake_pread(vnode_t *, void *, size_t, off_t);
52*8329232eSGordon Ross ssize_t	fake_pwrite(vnode_t *, void *, size_t, off_t);
53*8329232eSGordon Ross int	fake_unlink(char *, int);
54*8329232eSGordon Ross int	fake_rename(char *, char *);
55*8329232eSGordon Ross 
56*8329232eSGordon Ross int	vn_close_rele(vnode_t *vp, int flag);
57*8329232eSGordon Ross int	vn_open(char *pnamep, enum uio_seg seg, int filemode, int createmode,
58*8329232eSGordon Ross 		struct vnode **vpp, enum create crwhy, mode_t umask);
59*8329232eSGordon Ross int	vn_create(char *pnamep, enum uio_seg seg, struct vattr *vap,
60*8329232eSGordon Ross 		enum vcexcl excl, int mode, struct vnode **vpp,
61*8329232eSGordon Ross 		enum create why, int flag, mode_t umask);
62*8329232eSGordon Ross 
63*8329232eSGordon Ross void	vn_rele(struct vnode *vp);
64*8329232eSGordon Ross 
65*8329232eSGordon Ross /* In the real smbfs, these are _init(), _fini() */
66*8329232eSGordon Ross int fksmbfs_init(void);
67*8329232eSGordon Ross int fksmbfs_fini(void);
68*8329232eSGordon Ross 
69*8329232eSGordon Ross #ifdef __cplusplus
70*8329232eSGordon Ross }
71*8329232eSGordon Ross #endif
72*8329232eSGordon Ross 
73*8329232eSGordon Ross #endif /* _LIBFKSMBFS_H_ */