#ifndef _POOL_KERNEL_IMPL_H
#define _POOL_KERNEL_IMPL_H
#ifdef __cplusplus
extern "C" {
#endif
typedef struct pool_knl_elem {
pool_elem_t pke_elem;
void *pke_pad1;
void *pke_pad2;
nvlist_t *pke_properties;
struct pool_knl_elem *pke_parent;
uint64_t pke_ltime;
} pool_knl_elem_t;
typedef pool_knl_elem_t pool_knl_system_t;
typedef struct pool_knl_resource {
pool_elem_t pke_elem;
int (*pr_is_system)(const pool_resource_t *);
int (*pr_can_associate)(const pool_resource_t *);
nvlist_t *pke_properties;
struct pool_knl_elem *pke_parent;
uint64_t pke_ltime;
} pool_knl_resource_t;
typedef pool_knl_elem_t pool_knl_component_t;
typedef struct pool_knl_pool {
pool_elem_t pke_elem;
int (*pp_associate)(pool_t *, const pool_resource_t *);
int (*pp_dissociate)(pool_t *, const pool_resource_t *);
nvlist_t *pke_properties;
struct pool_knl_elem *pke_parent;
uint64_t pke_ltime;
pool_knl_resource_t *pkp_assoc[4];
} pool_knl_pool_t;
typedef struct pool_knl_result_set {
const pool_conf_t *prs_conf;
int prs_active;
int prs_index;
pool_elem_t *(*prs_next)(pool_result_set_t *);
pool_elem_t *(*prs_prev)(pool_result_set_t *);
pool_elem_t *(*prs_first)(pool_result_set_t *);
pool_elem_t *(*prs_last)(pool_result_set_t *);
int (*prs_set_index)(pool_result_set_t *, int);
int (*prs_get_index)(pool_result_set_t *);
int (*prs_close)(pool_result_set_t *);
int (*prs_count)(pool_result_set_t *);
pool_knl_elem_t **pkr_list;
int pkr_count;
int pkr_size;
} pool_knl_result_set_t;
typedef struct pool_knl_connection {
const char *pc_name;
int pc_store_type;
int pc_oflags;
int (*pc_close)(pool_conf_t *);
int (*pc_validate)(const pool_conf_t *, pool_valid_level_t);
int (*pc_commit)(pool_conf_t *);
int (*pc_export)(const pool_conf_t *, const char *,
pool_export_format_t);
int (*pc_rollback)(pool_conf_t *);
pool_result_set_t *(*pc_exec_query)(const pool_conf_t *,
const pool_elem_t *, const char *,
pool_elem_class_t, pool_value_t **);
pool_elem_t *(*pc_elem_create)(pool_conf_t *, pool_elem_class_t,
pool_resource_elem_class_t, pool_component_elem_class_t);
int (*pc_remove)(pool_conf_t *);
int (*pc_res_xfer)(pool_resource_t *, pool_resource_t *, uint64_t);
int (*pc_res_xxfer)(pool_resource_t *, pool_resource_t *,
pool_component_t **);
char *(*pc_get_binding)(pool_conf_t *, pid_t);
int (*pc_set_binding)(pool_conf_t *, const char *, idtype_t, id_t);
char *(*pc_get_resource_binding)(pool_conf_t *,
pool_resource_elem_class_t, pid_t);
int pkc_fd;
dict_hdl_t *pkc_elements;
#if DEBUG
dict_hdl_t *pkc_leaks;
#endif
log_t *pkc_log;
hrtime_t pkc_ltime;
hrtime_t pkc_lotime;
} pool_knl_connection_t;
#ifdef __cplusplus
}
#endif
#endif