2N/A/*
2N/A * CDDL HEADER START
2N/A *
2N/A * The contents of this file are subject to the terms of the
2N/A * Common Development and Distribution License (the "License").
2N/A * You may not use this file except in compliance with the License.
2N/A *
2N/A * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2N/A * or http://www.opensolaris.org/os/licensing.
2N/A * See the License for the specific language governing permissions
2N/A * and limitations under the License.
2N/A *
2N/A * When distributing Covered Code, include this CDDL HEADER in each
2N/A * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2N/A * If applicable, add the following below this CDDL HEADER, with the
2N/A * fields enclosed by brackets "[]" replaced with your own identifying
2N/A * information: Portions Copyright [yyyy] [name of copyright owner]
2N/A *
2N/A * CDDL HEADER END
2N/A */
2N/A/*
2N/A * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
2N/A */
2N/A
2N/A#ifndef _LIBSHADOWFS_H
2N/A#define _LIBSHADOWFS_H
2N/A
2N/A#include <sys/types.h>
2N/A#include <sys/list.h>
2N/A#include <stdarg.h>
2N/A#include <synch.h>
2N/A#include <paths.h>
2N/A#include <libscf.h>
2N/A#include <libscf_priv.h>
2N/A#include <libshadowfs_impl.h>
2N/A
2N/A#ifdef __cplusplus
2N/Aextern "C" {
2N/A#endif
2N/A
2N/Atypedef struct shadow_conspiracy shadow_conspiracy_t;
2N/A
2N/A#define SHADOWD_INST_NAME "system/filesystem/shadowd:default"
2N/A#define SHADOWD_INST_FMRI \
2N/A SCF_FMRI_SVC_PREFIX SCF_FMRI_SERVICE_PREFIX SHADOWD_INST_NAME
2N/A
2N/A#define SHADOWD_STATUS_REPORTS_PARENT_DIR _PATH_SYSVOL "/daemon"
2N/A#define SHADOWD_STATUS_REPORTS_DIR _PATH_SYSVOL "/daemon/shadowd"
2N/A#define SHADOWD_STATUS_PREFIX "shadowstat_request"
2N/A
2N/A#define SHADOWD_STATUS_NOMIGRATIONS "%NOMIP%"
2N/A#define SHADOWD_STATUS_BUFSZ 2044
2N/A
2N/A#define SHADOWD_STATUS_PARTIAL 1
2N/A#define SHADOWD_STATUS_FINAL 2
2N/A
2N/A#define SHADOWD_STATUS_MAX_PENDING 3
2N/A#define SHADOWD_STATUS_WAIT 10
2N/A
2N/Atypedef struct shadstatus {
2N/A long ss_type;
2N/A char ss_buf[SHADOWD_STATUS_BUFSZ];
2N/A} shadstatus_t;
2N/A
2N/Atypedef struct shadstatus_list {
2N/A list_node_t ssl_next;
2N/A struct shadstatus ssl_status;
2N/A} shadstatus_list_t;
2N/A
2N/Aextern boolean_t shadow_migrate_done(shadow_handle_t *);
2N/A
2N/Aextern int shadow_migrate_iter(shadow_handle_t *,
2N/A void (*)(const char *, void *), void *);
2N/Aextern void shadow_migrate_delay(shadow_handle_t *, uint32_t);
2N/A
2N/Aextern shadow_conspiracy_t *shadcons_init(const char *);
2N/Aextern int shadcons_enable_output(shadow_conspiracy_t *, const char *,
2N/A boolean_t);
2N/Aextern void shadcons_disable_output(shadow_conspiracy_t *);
2N/Aextern size_t shadcons_hash_count(shadow_conspiracy_t *);
2N/Aextern const char *shadcons_hashentry_dataset(shadow_conspiracy_t *, void *);
2N/Aextern void *shadcons_hash_first(shadow_conspiracy_t *);
2N/Aextern void *shadcons_hash_next(shadow_conspiracy_t *, void *);
2N/Aextern void shadcons_hash_remove(shadow_conspiracy_t *, void *);
2N/Aextern void shadcons_fini(shadow_conspiracy_t *);
2N/Aextern void shadcons_lock(shadow_conspiracy_t *);
2N/Aextern void shadcons_unlock(shadow_conspiracy_t *);
2N/Aextern void shadcons_stop(shadow_conspiracy_t *, const char *);
2N/Aextern int shadcons_cancel(shadow_conspiracy_t *, const char *);
2N/Aextern int shadcons_svc_refresh(shadow_conspiracy_t *);
2N/Aextern int shadcons_svc_start(shadow_conspiracy_t *);
2N/Aextern int shadcons_svc_stop(shadow_conspiracy_t *);
2N/Aextern int shadcons_start(shadow_conspiracy_t *, const char *, const char *,
2N/A const char *, boolean_t *);
2N/A
2N/Aextern int shadcons_status_all(shadow_conspiracy_t *,
2N/A shadow_conspiracy_status_t **, size_t *);
2N/Aextern int shadcons_status(shadow_conspiracy_t *, const char *,
2N/A shadow_conspiracy_status_t *);
2N/A
2N/Aextern void shadcons_dprintf(shadow_conspiracy_t *, const char *, ...);
2N/Aextern void shadcons_warn(shadow_conspiracy_t *, const char *, ...);
2N/A
2N/A#ifdef __cplusplus
2N/A}
2N/A#endif
2N/A
2N/A#endif /* _LIBSHADOWFS_H */