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