svcadm(8)을 검색하려면 섹션에서 8 을 선택하고, 맨 페이지 이름에 svcadm을 입력하고 검색을 누른다.
net_kstat_create(9f)
net_kstat_create(9F) Kernel Functions net_kstat_create(9F)
NAME
net_kstat_create - create and initialize a new kstat for a specific
instance of IP
SYNOPSIS
#include <sys/types.h>
#include <sys/kstat.h>
#include <sys/neti.h>
kstat_t *net_kstat_create(netid_t netid, char *module,
int instance, char *name, char *class, uchar_t type,
ulong_t ndata, uchar_t ks_flag);
INTERFACE LEVEL
Solaris DDI specific (Solaris DDI).
PARAMETERS
netid IP instance identifier.
module The name of the provider's module (such as "sd", "esp",
...). The "core" kernel uses the name "unix".
instance The provider's instance number, as from the
ddi_get_instance() function. Modules which do not have a
meaningful instance number should use 0. For more informa‐
tion, see the ddi_get_instance(9F) man page.
name A pointer to a string that uniquely identifies this struc‐
ture. Only KSTAT_STRLEN − 1 characters are significant.
class The general class that this kstat belongs to. The following
classes are currently in use: disk, tape, net, controller,
vm, kvm, hat, streams, kstat, and misc.
type The type of kstat to allocate. Valid types are:
KSTAT_TYPE_NAMED
Allows more than one data record per kstat.
KSTAT_TYPE_INTR
Interrupt; only one data record per kstat.
KSTAT_TYPE_IO
I/O; only one data record per kstat
ndata The number of type-specific data records to allocate.
ks_flag A bit-field of various flags for this kstat. ks_flag is
some combination of:
KSTAT_FLAG_VIRTUAL
Tells the kstat_create() function not to allocate mem‐
ory for the kstat data section; instead, the driver
will set the ks_data field to point to the data it
wishes to export. This provides a convenient way to
export existing data structures.
KSTAT_FLAG_WRITABLE
Makes the kstat data section writable by processes with
the {PRIV_SYS_CONFIG} privilege.
KSTAT_FLAG_PERSISTENT
Indicates that this kstat is to be persistent over
time. For persistent kstats, the kstat_delete() func‐
tion simply marks the kstat as dormant; a subsequent
kstat_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.) Note: Persistent
kstats cannot be virtual, since ks_data points to
garbage as soon as the driver goes away. For more
information, see the kstat_delete(9F) man page.
DESCRIPTION
The net_kstat_create() function allocates and initializes a kstat(9S)
structure. For a complete discussion of this function, see the
kstat_create(9F) man page.
RETURN VALUES
If successful, net_kstat_create() returns a pointer to the allocated
kstat. NULL is returned upon failure.
CONTEXT
The net_kstat_create() function may be called from user or kernel con‐
text.
ATTRIBUTES
See attributes(7) for descriptions of the following attributes:
tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) ATTRIBUTE TYPEAT‐
TRIBUTE VALUE _ Availabilitysystem/core-os _ Interface StabilityObso‐
lete
SEE ALSO
privileges(7), ddi_get_instance(9F), kstat_create(9F),
kstat_delete(9F), net_kstat_delete(9F), hook_t(9S), kstat_named(9S),
net_kstat2_delete(9F), net_kstat2_create(9F), kstat2_create(9F)
NOTES
The net_kstat_create() function is deprecated. The function may be
removed in a future release of Oracle Solaris. Use the net_kstat2_cre‐
ate() function instead. For more information, see the net_kstat2_cre‐
ate(9F) man page.
Oracle Solaris 11.4 3 Nov 2021 net_kstat_create(9F)