4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
23 * Copyright (c) 1992 by Sun Microsystems, Inc.
29 #pragma ident "%Z%%M% %I% %E% SMI"
31 #include <sys/types.h>
32 #include <sys/kstat.h>
39 * kstat_open() returns a pointer to a kstat_ctl_t.
40 * This is used for subsequent libkstat operations.
42 typedef struct kstat_ctl
{
43 kid_t kc_chain_id
; /* current kstat chain ID */
44 kstat_t
*kc_chain
; /* pointer to kstat chain */
45 int kc_kd
; /* /dev/kstat descriptor */
49 extern kstat_ctl_t
*kstat_open(void);
50 extern int kstat_close(kstat_ctl_t
*);
51 extern kid_t
kstat_read(kstat_ctl_t
*, kstat_t
*, void *);
52 extern kid_t
kstat_write(kstat_ctl_t
*, kstat_t
*, void *);
53 extern kid_t
kstat_chain_update(kstat_ctl_t
*);
54 extern kstat_t
*kstat_lookup(kstat_ctl_t
*, char *, int, char *);
55 extern void *kstat_data_lookup(kstat_t
*, char *);
57 extern kstat_ctl_t
*kstat_open();
58 extern int kstat_close();
59 extern kid_t
kstat_read();
60 extern kid_t
kstat_write();
61 extern kid_t
kstat_chain_update();
62 extern kstat_t
*kstat_lookup();
63 extern void *kstat_data_lookup();