DL_GET_STATISTICS_ACK Primitive

Purpose

Returns statistics in response to the DL_GET_STATISTICS_REQ primitive.

Structure

The message consists of one M_PCPROTO message block, which contains the following structure:

typedef struct
{
   ulong  dl_primitive;
   ulong  dl_stat_length;
   ulong  dl_stat_offset;
} dl_get_statistics_ack_t;

This structure is defined in /usr/include/sys/dlpi.h.

Description

The DL_GET_STATISTICS_ACK primitive returns statistics in response to the DL_GET_STATISTICS_REQ primitive.

The /usr/include/sys/dlpistats.h file defines the statistics that the DL_GET_STATISTICS_ACK and DL_GET_STATISTICS_REQ primitives support. The primitives support the statistics both globally (totals for all streams) and per stream. Per stream, or local, statistics can be requested only for the stream over which the DL_GET_STATISTICS_REQ primitive is requested.

The global and local statistics structures are returned concatenated. The offset in the M_PCPROTO message, returned by the DL_GET_STATISTICS_ACK primitive, indicates where the two concatenated structures begin. The first statistics structure contains information about the local stream over which the DL_GET_STATISTICS_REQ primitive was issued. The second statistics structure contains the global statistics collected and summed for all streams.

The structures for the local statistics are initialized to zero when the stream is opened. The structure for the global statistics is initialized to zero when the dlpi kernel extension is loaded. The statistics structures can be reset to zero using the DL_ZERO_STATS IOCTL command. See "IOCTL Specifics" in Data Link Provider Interface Information.

The statistics collected by the DLPI provider are considered vague. There are no locks protecting the counters to prevent write collisions.

Parameters

Item Description
dl_primitive Specifies the DL_GET_STATISTICS_ACK primitive.
dl_stat_length Specifies the length of the statistics structure.
dl_stat_offset Indicates where the statistics information begins. The value of this parameter is the offset from the beginning of the M_PCPROTO block.

States

Item Description
Valid The primitive is valid in any attached state in which a local acknowledgement is not pending.
New The resulting state is unchanged.