/*-1* SPDX-License-Identifier: BSD-2-Clause2*3* Copyright (c) 2000-2001 Boris Popov4* All rights reserved.5*6* Redistribution and use in source and binary forms, with or without7* modification, are permitted provided that the following conditions8* are met:9* 1. Redistributions of source code must retain the above copyright10* notice, this list of conditions and the following disclaimer.11* 2. Redistributions in binary form must reproduce the above copyright12* notice, this list of conditions and the following disclaimer in the13* documentation and/or other materials provided with the distribution.14*15* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND16* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE17* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE18* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE19* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL20* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS21* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)22* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT23* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY24* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF25* SUCH DAMAGE.26*/27#ifndef _SMBFS_SMBFS_H_28#define _SMBFS_SMBFS_H_2930#define SMBFS_VERMAJ 131#define SMBFS_VERMIN 101232#define SMBFS_VERSION (SMBFS_VERMAJ*100000 + SMBFS_VERMIN)33#define SMBFS_VFSNAME "smbfs"3435/* Values for flags */36#define SMBFS_MOUNT_SOFT 0x000137#define SMBFS_MOUNT_INTR 0x000238#define SMBFS_MOUNT_STRONG 0x000439#define SMBFS_MOUNT_HAVE_NLS 0x000840#define SMBFS_MOUNT_NO_LONG 0x00104142#define SMBFS_MAXPATHCOMP 256 /* maximum number of path components */4344/* Layout of the mount control block for an smb file system. */45struct smbfs_args {46int version;47int dev;48u_int flags;49char mount_point[MAXPATHLEN];50u_char root_path[512+1];51uid_t uid;52gid_t gid;53mode_t file_mode;54mode_t dir_mode;55int caseopt;56};5758#ifdef _KERNEL5960#include <sys/_sx.h>6162struct smbnode;63struct smb_share;64struct u_cred;65struct vop_ioctl_args;66struct buf;6768struct smbmount {69/* struct smbfs_args sm_args; */70uid_t sm_uid;71gid_t sm_gid;72mode_t sm_file_mode;73mode_t sm_dir_mode;74struct mount * sm_mp;75struct smbnode * sm_root;76struct smb_dev * sm_dev;77struct ucred * sm_owner;78uint64_t sm_flags;79long sm_nextino;80struct smb_share * sm_share;81struct smbnode * sm_npstack[SMBFS_MAXPATHCOMP];82int sm_caseopt;83int sm_didrele;84};8586#define VFSTOSMBFS(mp) ((struct smbmount *)((mp)->mnt_data))87#define SMBFSTOVFS(smp) ((struct mount *)((smp)->sm_mp))88#define VTOVFS(vp) ((vp)->v_mount)89#define VTOSMBFS(vp) (VFSTOSMBFS(VTOVFS(vp)))9091int smbfs_ioctl(struct vop_ioctl_args *ap);92int smbfs_doio(struct vnode *vp, struct buf *bp, struct ucred *cr, struct thread *td);93int smbfs_vinvalbuf(struct vnode *vp, struct thread *td);94#endif /* KERNEL */9596#endif /* _SMBFS_SMBFS_H_ */979899