Sun Microsystems, Inc.
spacerspacer
spacer   www.sun.com docs.sun.com | | |  
spacer
black dot
   
A   B   C   D   E   F   G   H   I   J   K   L   M   N   O   P   Q   R   S   T   U   V   W   X   Y   Z
    
 
Kernel Functions for Driverskstat_named_init(9F)


NAME

 kstat_named_init, kstat_named_setstr - initialize a named kstat

SYNOPSIS

 
#include <sys/types.h>
#include <sys/kstat.h>
void kstat_named_init(kstat_named_t *knp, char *name, uchar_t data_type);
 void kstat_named_setstr(kstat_named_t *knp, const char *str);

INTERFACE LEVEL

 

Solaris DDI specific (Solaris DDI)

PARAMETERS

 
knp
Pointer to a kstat_named(9S) structure.
name
The name of the statistic.
data_type
The type of value. This indicates which field of the kstat_named(9S) structure should be used. Valid values are:
KSTAT_DATA_CHAR
The "char" field.
KSTAT_DATA_LONG
The "long" field.
KSTAT_DATA_ULONG
The "unsigned long" field.
KSTAT_DATA_LONGLONG
The "long long" field.
KSTAT_DATA_ULONGLONG
The "unsigned long long" field.
KSTAT_DATA_STRING
Arbitrary length "long string" field.
str
Pointer to a NULL-terminated string.

DESCRIPTION

 

kstat_named_init() associates a name and a type with a kstat_named(9S) structure.

kstat_named_setstr() associates str with the named kstat knp. It is an error for knp to be of type other than KSTAT_DATA_STRING. This is the only supported method of changing the value of long strings.

RETURN VALUES

 

None.

CONTEXT

 

kstat_named_init() and kstat_named_setstr() can be called from user or kernel context.

SEE ALSO

 

kstat_create(9F), kstat_install(9F), kstat(9S), kstat_named(9S)

Writing Device Drivers


SunOS 5.9Go To TopLast Changed 8 Oct 2001

 
      
      
Copyright 2002 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.