#include <sys/types.h> #include <sys/kstat.h>void kstat_named_init(kstat_named_t *knp, char *name, uchar_t data_type);
Solaris DDI specific (Solaris DDI)
Pointer to a kstat_named(9S) structure.
The name of the statistic.
The type of value. This indicates which field of the kstat_named(9S) structure should be used. Valid values are:
The "char" field.
The "long" field.
The "unsigned long" field.
The "long long" field.
The "unsigned long long" field.
Arbitrary length "long string" field.
Pointer to a NULL-terminated string.
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.
kstat_named_init() and kstat_named_setstr() can be called from user or kernel context.