/*
* 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 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_CTFS_IMPL_H
#define _SYS_CTFS_IMPL_H
#pragma ident "%Z%%M% %I% %E% SMI"
#include <sys/contract.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* Inode numbers
*/
/*
* Root inode:
* ---------------------------------------------------
* | 0 |
* ---------------------------------------------------
* 63 0
*/
#define CTFS_INO_ROOT 0
/*
* Contract-specific file:
* ---------------------------------------------------
* |1| file (62:32) | contract id (31:0) |
* ---------------------------------------------------
* 63 0
* file = 0 : directory
* file = 1 : "all" directory symlink
* file > 1 : special files ("ctl", "status", etc.)
*/
((1ULL << 63) | \
((unsigned long long)(file) << CTFS_INO_CT_SHIFT) | \
(ctid))
/*
* Type-specific file:
* ---------------------------------------------------
* | 0 | type (31:16) | file (15:0) |
* ---------------------------------------------------
* 63 0
* type = 0 : invalid
* type > 0 : contract type index + 1 ("all" is #types + 1)
* file = 0 : directory
* file > 0 : special files ("template", "latest", etc.)
*/
/*
* Other constants
*/
/*
* Possible values for ctfs_endpt_flags, below.
*/
/*
* Common endpoint object.
*/
typedef struct ctfs_endpoint {
/*
* root directory data
*/
/*
* /all directory data
*/
/*
* /all symlink data
*/
typedef struct ctfs_symnode {
/*
* contract type directory data
*/
/*
* contract directory data
*/
typedef struct ctfs_cdirnode {
/*
* template file data
*/
typedef struct ctfs_tmplnode {
/*
* ctl and status file data
*/
typedef struct ctfs_ctlnode {
/*
* latest file data
*/
/*
* events file data
*/
typedef struct ctfs_evnode {
/*
* bundle and pbundle file data
*/
typedef struct ctfs_bunode {
/*
* VFS data object
*/
typedef struct ctfs_vfs {
} ctfs_vfs_t;
/*
* vnode creation routines
*/
/*
* common ctfs routines
*/
caller_context_t *);
caller_context_t *);
caller_context_t *);
caller_context_t *);
caller_context_t *);
/*
* vnode ops vector templates
*/
extern vnodeops_t *ctfs_ops_root;
extern vnodeops_t *ctfs_ops_adir;
extern vnodeops_t *ctfs_ops_sym;
extern vnodeops_t *ctfs_ops_tdir;
extern vnodeops_t *ctfs_ops_tmpl;
extern vnodeops_t *ctfs_ops_cdir;
extern vnodeops_t *ctfs_ops_ctl;
extern vnodeops_t *ctfs_ops_stat;
extern vnodeops_t *ctfs_ops_event;
extern vnodeops_t *ctfs_ops_bundle;
extern vnodeops_t *ctfs_ops_latest;
#ifdef __cplusplus
}
#endif
#endif /* _SYS_CTFS_IMPL_H */