lowlevel_impl.h revision 6e1d2b428379e5270ccda99d403eb225e8699c3e
/*
* 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 _LOWLEVEL_IMPL_H
#define _LOWLEVEL_IMPL_H
#pragma ident "%Z%%M% %I% %E% SMI"
#include "libscf_impl.h"
#include <door.h>
#include <libuutil.h>
#include <limits.h>
#include <pthread.h>
#include <stddef.h>
#include "repcache_protocol.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct scf_datael {
} scf_datael_t;
#define DATAEL_VALID 0x0001
/*
* Handle structure.
*
* Access to handles is serialized -- access to and modification of a handle
* and all of its children is protected by rh_lock.
*
* Different handles don't interfere with each other.
*/
struct scf_handle {
int rh_doorfd;
int rh_doorfd_old; /* fd to close once rh_fd_users == 0 */
long rh_entries;
long rh_values;
long rh_extrefs; /* user-created subhandle count */
long rh_intrefs; /* handle-internal subhandle count */
};
#define HANDLE_DEAD 0x0001
#define HANDLE_UNREFED 0x0002
#define HANDLE_WRAPPED_ENTITY 0x0004
#define HANDLE_WRAPPED_ITER 0x0008
#define RH_HOLD_ITER 0x0001
#define RH_HOLD_SCOPE 0x0002
#define RH_HOLD_SERVICE 0x0004
#define RH_HOLD_INSTANCE 0x0008
#define RH_HOLD_SNAPSHOT 0x0010
#define RH_HOLD_SNAPLVL 0x0020
#define RH_HOLD_PG 0x0040
#define RH_HOLD_PROPERTY 0x0080
#define RH_HOLD_VALUE 0x0100
#define RH_HOLD_ALL 0x01ff
struct scf_scope {
};
struct scf_service {
};
struct scf_instance {
};
struct scf_snapshot {
};
/*
* note: be careful of adding more state here -- snaplevel_next() relies on
* the fact that the entityid is the only library-level state.
*/
struct scf_snaplevel {
};
struct scf_propertygroup {
};
struct scf_property {
};
struct scf_value {
};
enum scf_entry_state {
};
struct scf_transaction_entry {
const char *entry_property;
enum scf_entry_state entry_state;
};
enum scf_tx_state {
};
struct scf_transaction {
enum scf_tx_state tran_state;
int tran_invalid;
};
struct scf_iter {
int iter_type;
};
#ifdef __cplusplus
}
#endif
#endif /* _LOWLEVEL_IMPL_H */