xref: /onnv-gate/usr/src/uts/common/smbsrv/smb_fsops.h (revision 10966:37e5dcdf36d3)
15331Samw /*
25331Samw  * CDDL HEADER START
35331Samw  *
45331Samw  * The contents of this file are subject to the terms of the
55331Samw  * Common Development and Distribution License (the "License").
65331Samw  * You may not use this file except in compliance with the License.
75331Samw  *
85331Samw  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
95331Samw  * or http://www.opensolaris.org/os/licensing.
105331Samw  * See the License for the specific language governing permissions
115331Samw  * and limitations under the License.
125331Samw  *
135331Samw  * When distributing Covered Code, include this CDDL HEADER in each
145331Samw  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
155331Samw  * If applicable, add the following below this CDDL HEADER, with the
165331Samw  * fields enclosed by brackets "[]" replaced with your own identifying
175331Samw  * information: Portions Copyright [yyyy] [name of copyright owner]
185331Samw  *
195331Samw  * CDDL HEADER END
205331Samw  */
215331Samw /*
228670SJose.Borrego@Sun.COM  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
235331Samw  * Use is subject to license terms.
245331Samw  */
255331Samw 
265331Samw #ifndef _SMBSRV_SMB_FSOPS_H
275331Samw #define	_SMBSRV_SMB_FSOPS_H
285331Samw 
295331Samw /*
305331Samw  * This header file contains all the functions for the interface between
315331Samw  * the smb layer and the fs layer.
325331Samw  */
33*10966SJordan.Brown@Sun.COM #include <smbsrv/string.h>
345331Samw #include <smbsrv/smbinfo.h>
356432Sas200622 #include <smbsrv/smb_ktypes.h>
365331Samw #include <smbsrv/smb_vops.h>
375772Sas200622 #include <sys/callb.h>
385772Sas200622 #include <sys/flock.h>
395331Samw 
405331Samw #ifdef	__cplusplus
415331Samw extern "C" {
425331Samw #endif
435331Samw 
446600Sas200622 int smb_fsop_amask_to_omode(uint32_t);
456600Sas200622 
466600Sas200622 int smb_fsop_open(smb_node_t *, int, cred_t *);
477348SJose.Borrego@Sun.COM void smb_fsop_close(smb_node_t *, int, cred_t *);
486600Sas200622 
496600Sas200622 int smb_fsop_oplock_install(smb_node_t *, int);
506600Sas200622 void smb_fsop_oplock_uninstall(smb_node_t *);
515331Samw 
526139Sjb150015 int smb_fsop_create(smb_request_t *, cred_t *, smb_node_t *,
5310001SJoyce.McIntosh@Sun.COM     char *, smb_attr_t *, smb_node_t **);
545331Samw 
5510001SJoyce.McIntosh@Sun.COM int smb_fsop_mkdir(smb_request_t *, cred_t *, smb_node_t *,
5610001SJoyce.McIntosh@Sun.COM     char *, smb_attr_t *, smb_node_t **);
575331Samw 
5810001SJoyce.McIntosh@Sun.COM int smb_fsop_remove(smb_request_t *sr, cred_t *cr, smb_node_t *,
5910001SJoyce.McIntosh@Sun.COM     char *, uint32_t);
605331Samw 
6110001SJoyce.McIntosh@Sun.COM int smb_fsop_rmdir(smb_request_t *, cred_t *, smb_node_t *, char *, uint32_t);
625331Samw 
6310001SJoyce.McIntosh@Sun.COM int smb_fsop_getattr(smb_request_t *, cred_t *, smb_node_t *, smb_attr_t *);
6410001SJoyce.McIntosh@Sun.COM 
6510001SJoyce.McIntosh@Sun.COM int smb_maybe_mangled_name(char *);
665331Samw 
679914Samw@Sun.COM int smb_fsop_link(smb_request_t *, cred_t *, smb_node_t *, smb_node_t *,
689914Samw@Sun.COM     char *);
699914Samw@Sun.COM 
7010001SJoyce.McIntosh@Sun.COM int smb_fsop_rename(smb_request_t *, cred_t *,
7110001SJoyce.McIntosh@Sun.COM     smb_node_t *, char *, smb_node_t *,
72*10966SJordan.Brown@Sun.COM 	char *);
735331Samw 
7410001SJoyce.McIntosh@Sun.COM int smb_fsop_setattr(smb_request_t *, cred_t *, smb_node_t *, smb_attr_t *);
755331Samw 
7610001SJoyce.McIntosh@Sun.COM int smb_fsop_read(smb_request_t *, cred_t *, smb_node_t *, uio_t *);
775331Samw 
787052Samw int smb_fsop_write(smb_request_t *, cred_t *, smb_node_t *, uio_t *,
7910001SJoyce.McIntosh@Sun.COM     uint32_t *, int);
805331Samw 
8110001SJoyce.McIntosh@Sun.COM int smb_fsop_statfs(cred_t *, smb_node_t *, struct statvfs64 *);
825331Samw 
8310001SJoyce.McIntosh@Sun.COM int smb_fsop_remove_streams(smb_request_t *, cred_t *, smb_node_t *);
845331Samw 
8510001SJoyce.McIntosh@Sun.COM int smb_fsop_access(smb_request_t *, cred_t *, smb_node_t *, uint32_t);
865331Samw 
8710001SJoyce.McIntosh@Sun.COM void smb_fsop_eaccess(smb_request_t *, cred_t *, smb_node_t *, uint32_t *);
8810001SJoyce.McIntosh@Sun.COM 
8910001SJoyce.McIntosh@Sun.COM int smb_fsop_lookup_name(smb_request_t *, cred_t *, int,
9010001SJoyce.McIntosh@Sun.COM     smb_node_t *, smb_node_t *, char *, smb_node_t **);
915331Samw 
9210001SJoyce.McIntosh@Sun.COM int smb_fsop_lookup(smb_request_t *, cred_t *, int,
9310001SJoyce.McIntosh@Sun.COM     smb_node_t *, smb_node_t *, char *, smb_node_t **);
945331Samw 
9510001SJoyce.McIntosh@Sun.COM int smb_fsop_commit(smb_request_t *, cred_t *, smb_node_t *);
965331Samw 
975521Sas200622 int smb_fsop_aclread(smb_request_t *, cred_t *, smb_node_t *, smb_fssd_t *);
985521Sas200622 int smb_fsop_aclwrite(smb_request_t *, cred_t *, smb_node_t *, smb_fssd_t *);
995521Sas200622 acl_type_t smb_fsop_acltype(smb_node_t *);
1005521Sas200622 int smb_fsop_sdread(smb_request_t *, cred_t *, smb_node_t *, smb_fssd_t *);
1015521Sas200622 int smb_fsop_sdwrite(smb_request_t *, cred_t *, smb_node_t *, smb_fssd_t *,
1025521Sas200622     int);
1035331Samw 
1046139Sjb150015 uint32_t smb_fsop_shrlock(cred_t *, smb_node_t *, uint32_t, uint32_t, uint32_t);
10510001SJoyce.McIntosh@Sun.COM void smb_fsop_unshrlock(cred_t *, smb_node_t *, uint32_t);
1066600Sas200622 int smb_fsop_frlock(smb_node_t *, smb_lock_t *, boolean_t, cred_t *);
1076600Sas200622 
1085331Samw /*
1095331Samw  * Lookup-related flags
1105331Samw  *
1115331Samw  * SMB_FOLLOW_LINKS	Follow symbolic links.
1125331Samw  * SMB_IGNORE_CASE	Perform case-insensitive lookup.
11310504SKeyur.Desai@Sun.COM  * SMB_CATIA		Perform CATIA character substitution.
11410504SKeyur.Desai@Sun.COM  * SMB_ABE		Perform Access based enumeration/lookup.
115*10966SJordan.Brown@Sun.COM  * SMB_CASE_SENSITIVE	Don't set SMB_IGNORE_CASE based on tree.
1165331Samw  */
1175331Samw 
1185331Samw #define	SMB_FOLLOW_LINKS	0x00000001
1195331Samw #define	SMB_IGNORE_CASE		0x00000002
1209231SAfshin.Ardakani@Sun.COM #define	SMB_CATIA		0x00000004
12110504SKeyur.Desai@Sun.COM #define	SMB_ABE			0x00000008
122*10966SJordan.Brown@Sun.COM #define	SMB_CASE_SENSITIVE	0x00000010
1235331Samw 
1245331Samw #ifdef	__cplusplus
1255331Samw }
1265331Samw #endif
1275331Samw 
1285331Samw #endif /* _SMBSRV_SMB_FSOPS_H */
129