smb_vops.h revision 9660e5cb810c5efc22db0f1459461c1f1eec15b9
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SMBSRV_SMB_VOPS_H
#define _SMBSRV_SMB_VOPS_H
#pragma ident "@(#)smb_vops.h 1.9 08/08/07 SMI"
/*
* Common file system interfaces and definitions.
*/
#include <smbsrv/smb_i18n.h>
#ifdef __cplusplus
extern "C" {
#endif
#define ROOTVOL ""
#define XATTR_DIR "xattr_dir"
#define SMB_STREAM_PREFIX "SUNWsmb"
#define SMB_SHORTNAMELEN 14
#define SMB_EOF 0x7FFFFFFF
/*
* SMB_MINLEN_RDDIR_BUF: minimum length of buffer server will provide to
* VOP_READDIR. Its value is the size of the maximum possible edirent_t
* for solaris. The EDIRENT_RECLEN macro returns the size of edirent_t
* required for a given name length. MAXNAMELEN is the maximum
* filename length allowed in Solaris. The first two EDIRENT_RECLEN()
* macros are to allow for . and .. entries -- just a minor tweak to try
* and guarantee that buffer we give to VOP_READDIR will be large enough
* to hold ., .., and the largest possible solaris edirent_t.
*
* This bufsize will also be used when reading dirent64_t entries.
*/
#define SMB_MINLEN_RDDIR_BUF \
/*
* DP_TO_EDP
*
* Fill in an edirent_t structure with information from a dirent64_t.
* This allows the use of an edirent_t in code where both edirent_t's
* and dirent64_t's are manipulated.
*/
{ \
}
/*
* DP_ADVANCE
*
* In readdir operations, advance to read the next entry in a buffer
* returned from VOP_READDIR. The entries are of type dirent64_t.
*/
{ \
} else { \
} \
}
/*
* EDP_ADVANCE
*
* In readdir operations, advance to read the next entry in a buffer
* returned from VOP_READDIR. The entries are of type edirent_t.
*/
{ \
} else { \
} \
}
struct smb_node;
struct smb_request;
/*
* Note: When specifying the mask for an smb_attr_t,
* the sa_mask, and not the sa_vattr.va_mask, should be
* filled in. The #define's that should be used are those
* prefixed with SMB_AT_*. Only FSIL routines should
* manipulate the sa_vattr.va_mask field.
*/
typedef struct smb_attr {
} smb_attr_t;
#define SMB_AT_TYPE 0x00001
#define SMB_AT_MODE 0x00002
#define SMB_AT_UID 0x00004
#define SMB_AT_GID 0x00008
#define SMB_AT_FSID 0x00010
#define SMB_AT_NODEID 0x00020
#define SMB_AT_NLINK 0x00040
#define SMB_AT_SIZE 0x00080
#define SMB_AT_ATIME 0x00100
#define SMB_AT_MTIME 0x00200
#define SMB_AT_CTIME 0x00400
#define SMB_AT_RDEV 0x00800
#define SMB_AT_BLKSIZE 0x01000
#define SMB_AT_NBLOCKS 0x02000
#define SMB_AT_SEQ 0x08000
#define SMB_AT_DOSATTR 0x00100000
#define SMB_AT_CRTIME 0x00200000
#define SMB_AT_SMB 0x00300000
struct fs_stream_info {
char name[MAXPATHLEN];
};
int smb_vop_init(void);
void smb_vop_fini(void);
void smb_vop_start(void);
cred_t *);
vsecattr_t *);
vsecattr_t *);
char *, int, cred_t *);
int smb_vop_traverse_check(vnode_t **);
#ifdef __cplusplus
}
#endif
#endif /* _SMBSRV_SMB_VOPS_H */