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/*
2N/A * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
2N/A */
2N/A
2N/A#ifndef _ZONESTAT_PRIVATE_H
2N/A#define _ZONESTAT_PRIVATE_H
2N/A
2N/A#include <zonestat.h>
2N/A
2N/A#ifdef __cplusplus
2N/Aextern "C" {
2N/A#endif
2N/A
2N/A/*
2N/A * Private libzonestat interfaces used by the zonestat command.
2N/A *
2N/A * INTERFACES DEFINED IN THIS FILE DO NOT CONSTITUTE A PUBLIC INTERFACE.
2N/A *
2N/A * Do not consume these interfaces; your program will break in the future
2N/A * (even in a patch) if you do.
2N/A */
2N/A
2N/A/*
2N/A * The usage set is for computations on multiple usage structures to describe
2N/A * a range of time.
2N/A */
2N/A
2N/Atypedef enum zs_compute_enum {
2N/A ZS_COMPUTE_USAGE_INTERVAL = 1,
2N/A ZS_COMPUTE_USAGE_TOTAL,
2N/A ZS_COMPUTE_USAGE_AVERAGE,
2N/A ZS_COMPUTE_USAGE_HIGH
2N/A} zs_compute_t;
2N/A
2N/Atypedef enum zs_compute_set_enum {
2N/A ZS_COMPUTE_SET_TOTAL = 1,
2N/A ZS_COMPUTE_SET_AVERAGE,
2N/A ZS_COMPUTE_SET_HIGH
2N/A} zs_compute_set_t;
2N/A
2N/Atypedef struct zs_usage_set *zs_usage_set_t;
2N/Atypedef struct zs_datalink *zs_datalink_t;
2N/Atypedef struct zs_link_zone *zs_link_zone_t;
2N/A
2N/Azs_usage_t zs_usage_compute(zs_usage_t, zs_usage_t, zs_usage_t, zs_compute_t);
2N/A
2N/A/* functions for manipulating sets of usage data: zs_usage_set */
2N/Azs_usage_set_t zs_usage_set_alloc();
2N/Avoid zs_usage_set_free(zs_usage_set_t);
2N/Aint zs_usage_set_add(zs_usage_set_t, zs_usage_t);
2N/Aint zs_usage_set_count(zs_usage_set_t);
2N/Azs_usage_t zs_usage_set_compute(zs_usage_set_t, zs_compute_set_t);
2N/A
2N/A/* functions for a datalink's per-link usage: zs_datalink */
2N/Aint zs_datalink_list(zs_usage_t, zs_datalink_t *, int);
2N/Azs_property_t zs_link_property(zs_datalink_t, zs_datalink_property_t);
2N/Azs_property_t zs_link_zone_property(zs_link_zone_t, zs_lz_property_t);
2N/A
2N/A
2N/A
2N/A#ifdef __cplusplus
2N/A}
2N/A#endif
2N/A
2N/A#endif /* _ZONESTAT_PRIVATE_H */