smb_fsops.h revision b24e356b384ccc80805e7150979de2373d44347c
2N/A/*
2N/A * CDDL HEADER START
2N/A *
2N/A * The contents of this file are subject to the terms of the
2N/A * Common Development and Distribution License (the "License").
2N/A * You may not use this file except in compliance with the License.
2N/A *
2N/A * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2N/A * or http://www.opensolaris.org/os/licensing.
2N/A * See the License for the specific language governing permissions
2N/A * and limitations under the License.
2N/A *
2N/A * When distributing Covered Code, include this CDDL HEADER in each
2N/A * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2N/A * If applicable, add the following below this CDDL HEADER, with the
2N/A * fields enclosed by brackets "[]" replaced with your own identifying
2N/A * information: Portions Copyright [yyyy] [name of copyright owner]
2N/A *
2N/A * CDDL HEADER END
2N/A */
2N/A/*
2N/A * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
2N/A * Use is subject to license terms.
2N/A */
2N/A
2N/A#ifndef _SMBSRV_SMB_FSOPS_H
2N/A#define _SMBSRV_SMB_FSOPS_H
2N/A
2N/A/*
2N/A * This header file contains all the functions for the interface between
2N/A * the smb layer and the fs layer.
2N/A */
2N/A#include <smbsrv/string.h>
2N/A#include <smbsrv/smbinfo.h>
2N/A#include <smbsrv/smb_ktypes.h>
2N/A#include <smbsrv/smb_vops.h>
2N/A#include <sys/callb.h>
2N/A#include <sys/flock.h>
2N/A
2N/A#ifdef __cplusplus
2N/Aextern "C" {
2N/A#endif
2N/A
2N/Aint smb_fsop_amask_to_omode(uint32_t);
2N/A
2N/Aint smb_fsop_open(smb_node_t *, int, cred_t *);
2N/Avoid smb_fsop_close(smb_node_t *, int, cred_t *);
2N/A
2N/Aint smb_fsop_oplock_install(smb_node_t *, int);
2N/Avoid smb_fsop_oplock_uninstall(smb_node_t *);
2N/A
2N/Aint smb_fsop_create(smb_request_t *, cred_t *, smb_node_t *,
2N/A char *, smb_attr_t *, smb_node_t **);
2N/A
2N/Aint smb_fsop_mkdir(smb_request_t *, cred_t *, smb_node_t *,
2N/A char *, smb_attr_t *, smb_node_t **);
2N/A
2N/Aint smb_fsop_remove(smb_request_t *sr, cred_t *cr, smb_node_t *,
2N/A char *, uint32_t);
2N/A
2N/Aint smb_fsop_rmdir(smb_request_t *, cred_t *, smb_node_t *, char *, uint32_t);
2N/A
2N/Aint smb_fsop_getattr(smb_request_t *, cred_t *, smb_node_t *, smb_attr_t *);
2N/A
2N/Aint smb_maybe_mangled_name(char *);
2N/A
2N/Aint smb_fsop_link(smb_request_t *, cred_t *, smb_node_t *, smb_node_t *,
2N/A char *);
2N/A
2N/Aint smb_fsop_rename(smb_request_t *, cred_t *,
2N/A smb_node_t *, char *, smb_node_t *,
2N/A char *);
2N/A
2N/Aint smb_fsop_setattr(smb_request_t *, cred_t *, smb_node_t *, smb_attr_t *);
2N/A
2N/Aint smb_fsop_read(smb_request_t *, cred_t *, smb_node_t *, uio_t *);
2N/A
2N/Aint smb_fsop_write(smb_request_t *, cred_t *, smb_node_t *, uio_t *,
2N/A uint32_t *, int);
2N/A
2N/Aint smb_fsop_statfs(cred_t *, smb_node_t *, struct statvfs64 *);
2N/A
2N/Aint smb_fsop_remove_streams(smb_request_t *, cred_t *, smb_node_t *);
2N/A
2N/Aint smb_fsop_access(smb_request_t *, cred_t *, smb_node_t *, uint32_t);
2N/A
2N/Avoid smb_fsop_eaccess(smb_request_t *, cred_t *, smb_node_t *, uint32_t *);
2N/A
2N/Aint smb_fsop_lookup_name(smb_request_t *, cred_t *, int,
2N/A smb_node_t *, smb_node_t *, char *, smb_node_t **);
2N/A
2N/Aint smb_fsop_lookup(smb_request_t *, cred_t *, int,
2N/A smb_node_t *, smb_node_t *, char *, smb_node_t **);
2N/A
2N/Aint smb_fsop_commit(smb_request_t *, cred_t *, smb_node_t *);
2N/A
2N/Aint smb_fsop_aclread(smb_request_t *, cred_t *, smb_node_t *, smb_fssd_t *);
2N/Aint smb_fsop_aclwrite(smb_request_t *, cred_t *, smb_node_t *, smb_fssd_t *);
2N/Aacl_type_t smb_fsop_acltype(smb_node_t *);
2N/Aint smb_fsop_sdread(smb_request_t *, cred_t *, smb_node_t *, smb_fssd_t *);
2N/Aint smb_fsop_sdwrite(smb_request_t *, cred_t *, smb_node_t *, smb_fssd_t *,
2N/A int);
2N/A
2N/Auint32_t smb_fsop_shrlock(cred_t *, smb_node_t *, uint32_t, uint32_t, uint32_t);
2N/Avoid smb_fsop_unshrlock(cred_t *, smb_node_t *, uint32_t);
2N/Aint smb_fsop_frlock(smb_node_t *, smb_lock_t *, boolean_t, cred_t *);
2N/A
2N/A/*
2N/A * Lookup-related flags
2N/A *
2N/A * SMB_FOLLOW_LINKS Follow symbolic links.
2N/A * SMB_IGNORE_CASE Perform case-insensitive lookup.
2N/A * SMB_CATIA Perform CATIA character substitution.
2N/A * SMB_ABE Perform Access based enumeration/lookup.
2N/A * SMB_CASE_SENSITIVE Don't set SMB_IGNORE_CASE based on tree.
2N/A */
2N/A
2N/A#define SMB_FOLLOW_LINKS 0x00000001
2N/A#define SMB_IGNORE_CASE 0x00000002
2N/A#define SMB_CATIA 0x00000004
2N/A#define SMB_ABE 0x00000008
2N/A#define SMB_CASE_SENSITIVE 0x00000010
2N/A
2N/A/*
2N/A * Increased MAXPATHLEN for SMB. Essentially, we want to allow a
2N/A * share path up to MAXPATHLEN plus a relative path of MAXPATHLEN.
2N/A */
2N/A#define SMB_MAXPATHLEN (2 * MAXPATHLEN)
2N/A
2N/A#ifdef __cplusplus
2N/A}
2N/A#endif
2N/A
2N/A#endif /* _SMBSRV_SMB_FSOPS_H */
2N/A