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 2013 Nexenta Systems, Inc. All rights reserved.
24 */
25
26 #ifndef _SMBSRV_SMB_VOPS_H
27 #define _SMBSRV_SMB_VOPS_H
28
29 /*
30 * Common file system interfaces and definitions.
31 */
32
33 #include <sys/types.h>
34 #include <sys/param.h>
35 #include <sys/file.h>
36 #include <sys/time.h>
37 #include <sys/mntent.h>
38 #include <sys/uio.h>
39 #include <sys/vnode.h>
40 #include <sys/vfs.h>
41 #include <sys/refstr.h>
42 #include <sys/acl.h>
43 #include <sys/fcntl.h>
108
109 /* SMB_FILE_STANDARD_INFORMATION (also delete-on-close flag) */
110 #define SMB_AT_STANDARD (SMB_AT_TYPE | SMB_AT_NLINK |\
111 SMB_AT_SIZE | SMB_AT_ALLOCSZ)
112
113 /*
114 * SMB_FILE_ALL_INFORMATION
115 * Note: does not include: SMB_AT_UID, SMB_AT_GID, etc.
116 * It's not literally "all", but "all SMB cares about"
117 * in vattr_t for any of the file query/set info calls.
118 */
119 #define SMB_AT_ALL (SMB_AT_BASIC | SMB_AT_STANDARD | SMB_AT_NODEID)
120
121 int fhopen(const struct smb_node *, int);
122
123 int smb_vop_init(void);
124 void smb_vop_fini(void);
125 void smb_vop_start(void);
126 int smb_vop_open(vnode_t **, int, cred_t *);
127 void smb_vop_close(vnode_t *, int, cred_t *);
128 int smb_vop_read(vnode_t *, uio_t *, cred_t *);
129 int smb_vop_write(vnode_t *, uio_t *, int, uint32_t *, cred_t *);
130 int smb_vop_getattr(vnode_t *, vnode_t *, smb_attr_t *, int, cred_t *);
131 int smb_vop_setattr(vnode_t *, vnode_t *, smb_attr_t *, int, cred_t *);
132 int smb_vop_space(vnode_t *, int, flock64_t *, int, offset_t, cred_t *);
133 int smb_vop_access(vnode_t *, int, int, vnode_t *, cred_t *);
134 void smb_vop_eaccess(vnode_t *, int *, int, vnode_t *, cred_t *);
135 int smb_vop_lookup(vnode_t *, char *, vnode_t **, char *, int, int *, vnode_t *,
136 smb_attr_t *, cred_t *);
137 int smb_vop_create(vnode_t *, char *, smb_attr_t *, vnode_t **, int, cred_t *,
138 vsecattr_t *);
139 int smb_vop_link(vnode_t *, vnode_t *, char *, int, cred_t *);
140 int smb_vop_remove(vnode_t *, char *, int, cred_t *);
141 int smb_vop_rename(vnode_t *, char *, vnode_t *, char *, int, cred_t *);
142 int smb_vop_mkdir(vnode_t *, char *, smb_attr_t *, vnode_t **, int, cred_t *,
143 vsecattr_t *);
144 int smb_vop_rmdir(vnode_t *, char *, int, cred_t *);
145 int smb_vop_readdir(vnode_t *, uint32_t, void *, int *, int *,
146 uint32_t, cred_t *);
147 int smb_vop_commit(vnode_t *, cred_t *);
148 int smb_vop_statfs(vnode_t *, struct statvfs64 *, cred_t *);
149 int smb_vop_stream_lookup(vnode_t *, char *, vnode_t **, char *, vnode_t **,
|
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 2018 Nexenta Systems, Inc. All rights reserved.
24 */
25
26 #ifndef _SMBSRV_SMB_VOPS_H
27 #define _SMBSRV_SMB_VOPS_H
28
29 /*
30 * Common file system interfaces and definitions.
31 */
32
33 #include <sys/types.h>
34 #include <sys/param.h>
35 #include <sys/file.h>
36 #include <sys/time.h>
37 #include <sys/mntent.h>
38 #include <sys/uio.h>
39 #include <sys/vnode.h>
40 #include <sys/vfs.h>
41 #include <sys/refstr.h>
42 #include <sys/acl.h>
43 #include <sys/fcntl.h>
108
109 /* SMB_FILE_STANDARD_INFORMATION (also delete-on-close flag) */
110 #define SMB_AT_STANDARD (SMB_AT_TYPE | SMB_AT_NLINK |\
111 SMB_AT_SIZE | SMB_AT_ALLOCSZ)
112
113 /*
114 * SMB_FILE_ALL_INFORMATION
115 * Note: does not include: SMB_AT_UID, SMB_AT_GID, etc.
116 * It's not literally "all", but "all SMB cares about"
117 * in vattr_t for any of the file query/set info calls.
118 */
119 #define SMB_AT_ALL (SMB_AT_BASIC | SMB_AT_STANDARD | SMB_AT_NODEID)
120
121 int fhopen(const struct smb_node *, int);
122
123 int smb_vop_init(void);
124 void smb_vop_fini(void);
125 void smb_vop_start(void);
126 int smb_vop_open(vnode_t **, int, cred_t *);
127 void smb_vop_close(vnode_t *, int, cred_t *);
128 int smb_vop_read(vnode_t *, uio_t *, int, cred_t *);
129 int smb_vop_write(vnode_t *, uio_t *, int, uint32_t *, cred_t *);
130 int smb_vop_ioctl(vnode_t *, int, void *, cred_t *);
131 int smb_vop_getattr(vnode_t *, vnode_t *, smb_attr_t *, int, cred_t *);
132 int smb_vop_setattr(vnode_t *, vnode_t *, smb_attr_t *, int, cred_t *);
133 int smb_vop_space(vnode_t *, int, flock64_t *, int, offset_t, cred_t *);
134 int smb_vop_access(vnode_t *, int, int, vnode_t *, cred_t *);
135 void smb_vop_eaccess(vnode_t *, int *, int, vnode_t *, cred_t *);
136 int smb_vop_lookup(vnode_t *, char *, vnode_t **, char *, int, int *, vnode_t *,
137 smb_attr_t *, cred_t *);
138 int smb_vop_create(vnode_t *, char *, smb_attr_t *, vnode_t **, int, cred_t *,
139 vsecattr_t *);
140 int smb_vop_link(vnode_t *, vnode_t *, char *, int, cred_t *);
141 int smb_vop_remove(vnode_t *, char *, int, cred_t *);
142 int smb_vop_rename(vnode_t *, char *, vnode_t *, char *, int, cred_t *);
143 int smb_vop_mkdir(vnode_t *, char *, smb_attr_t *, vnode_t **, int, cred_t *,
144 vsecattr_t *);
145 int smb_vop_rmdir(vnode_t *, char *, int, cred_t *);
146 int smb_vop_readdir(vnode_t *, uint32_t, void *, int *, int *,
147 uint32_t, cred_t *);
148 int smb_vop_commit(vnode_t *, cred_t *);
149 int smb_vop_statfs(vnode_t *, struct statvfs64 *, cred_t *);
150 int smb_vop_stream_lookup(vnode_t *, char *, vnode_t **, char *, vnode_t **,
|