xref: /illumos-gate/usr/src/man/man9s/kstat_named.9s (revision dd72704bd9e794056c558153663c739e2012d721)
te
Copyright (c) 2000, Sun Microsystems, Inc., All Rights Reserved
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 or http://www.opensolaris.org/os/licensing. 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]
KSTAT_NAMED 9S "Apr 4, 1994"
NAME
kstat_named - structure for named kstats
SYNOPSIS
#include <sys/types.h>
#include <sys/kstat.h>
#include <sys/ddi.h>
#include <sys/sunddi.h>
INTERFACE LEVEL
illumos DDI specific (illumos DDI)
DESCRIPTION
Named kstats are an array of name-value pairs. These pairs are kept in the kstat_named structure. When a kstat is created by kstat_create(9F), the driver specifies how many of these structures will be allocated. The structures are returned as an array pointed to by the ks_data field.
STRUCTURE MEMBERS
union {
 char c[16];
 long l;
 ulong_t ul;
 longlong_t ll;
 u_longlong_t ull;
} value; /* value of counter */

The only member exposed to drivers is the value member. This field is a union of several data types. The driver must specify which type it will use in the call to kstat_named_init().

SEE ALSO
kstat_create (9F), kstat_named_init (9F)

Writing Device Drivers