net_kstat2_create - create and initialize a new kstat for a specific instance of IP
#include <sys/types.h> #include <sys/kstat2.h> #include <sys/neti.h> kstat2_t *net_kstat2_create(netid_t netid, const char *pseg[], uchar_t npseg, kstat2_named_t *data, ulong_t ndata, uchar_t ks_flag, const kstat2_md_t *metadata, const char *desc, kstat2_metaflag_t mflags);
Solaris DDI specific (Solaris DDI)
IP instance identifier.
Array of character strings representing the kstat's path. Each segment of the kstat's path is one element of the array.
The number of elements in the pseg array.
Array of name-value pair data for this kstat or NULL. If NULL, the kstat's framework will allocate storage for this kstat's data which is initialized using kstat2_nv_init(9F) prior to the kstat being installed by a call to kstat2_install(9F). If an array is passed, it must contain ndata elements.
The number of records in the data array or the number of kstat2_named(9S) structures to allocate if data is NULL.
A bit-field of various flags for this kstat. This may be zero or:
Indicates that this kstat is persistent over time. For persistent kstats, kstat2_delete(9F) simply marks the kstat as dormant; a subsequent kstat2_create() function reactivates the kstat. This feature is provided so that statistics are not lost across driver close/open (such as raw disk I/O on a disk with no mounted partitions.)
Array of metadata for the values in the kstat's data.
Brief description of the kstat's purpose.
Metadata flags. Either KSTAT2_MF_NONE or:
Indicates that this kstat will not be removed in Oracle Solaris release without prior notification.
The net_kstat2_create() function allocates and initializes a kstat2(9S) structure. See kstat2_create(9F) function for a complete discussion of kstat creation.
If successful, the net_kstat2_create() function returns a pointer to the allocated kstat. NULL is returned upon failure.
The net_kstat2_create() function can be called from user or kernel context.
See attributes(7) for descriptions of the following attributes:
|
kstat2_create(9F), kstat2_delete(9F), kstat2_install(9F), kstat2_nv_init(9F), net_kstat2_delete(9F), kstat2_md(9S), kstat2_named(9S)