udi_nic_info_cb_t(3udi)


Network information control block

SYNOPSIS

#include <udi.h>

typedef struct {

	udi_cb_t gcb;

	udi_boolean_t interface_is_active;

	udi_boolean_t link_is_active;

	udi_boolean_t is_full_duplex;

	udi_ubit32_t link_mbps;

	udi_ubit32_t link_bps;

	udi_ubit32_t tx_packets;

	udi_ubit32_t rx_packets;

	udi_ubit32_t tx_errors;

	udi_ubit32_t rx_errors;

	udi_ubit32_t tx_discards;

	udi_ubit32_t rx_discards;

	udi_ubit32_t tx_underrun;

	udi_ubit32_t rx_overrun;

	udi_ubit32_t collisions;

} udi_nic_info_cb_t;
 
/* Network Information Control Block Group Number */
 
#define  UDI_NIC_INFO_CB_NUM				5
 

MEMBERS gcb is the generic control block header which includes a pointer to the scratch space associated with this block and the channel context for the associated channel. The driver may use the scratch space while it owns the control block, but the values are not guaranteed to persist across channel operations.

interface_is_active is a boolean indication of whether the interface has been activated or not (via udi_nd_enable_req).

link_is_active is a boolean indication of whether the link is active or not (line status).

is_full_duplex is the boolean indication of whether the link is operating in full-duplex or half-duplex mode. Note that the %duplex custom attribute may be used to indicate the desired duplex mode but this field will always report the current duplex mode (see Table 2-4, "NIC Custom Attributes").

link_mbps is the current link data rate in megabits-per-second. Note that the %speed_mbps custom attribute may be used to indicate the desired speed but this field will always report the current data link speed (see Table 2-4, "NIC Custom Attributes").

link_bps is the current link data rate in bits-per-second. This field is used in the same manner that the link_mbps field is used but specifies a lower range of values.

tx_packets is the number of packets transmitted by this interface (inclusive of discarded packets and those in which the transmit request completed with errors).

rx_packets is the number of packets received by this interface (inclusive of discarded packets and those indicating receive errors).

tx_errors is the number of packet transmissions that encountered an error of some form.

rx_errors is the number of receive packet operations that encountered an error of some form.

tx_discards is the number of packets which were discarded before transmission for internal reasons (e.g. timeouts or unavailable resources).

rx_discards is the number of packets which were discarded after being received but before being passed to the NSR for internal reasons (e.g. unavailable resources).

tx_underrun is the number of transmit underrun errors (which is also included in tx_errors).

rx_overrun is the number of receive overrun errors (which is also included in rx_errors).

collisions is the number of transmit packet collisions (if applicable).

DESCRIPTION The network information control block structure is used to provide configuration and statistics information to the NSR.

Fields which represent counters are subject to overflow and will silently wraparound to continue counting from zero. The statistics values should be read frequently enough to detect this wraparound condition if it is significant.

The link_bps field is customarily used for slower WAN protocols where the link data rate may range from 300 bps to 128 Kbps. The link_mbps field is used for higher-speed LAN protocols. Note that there is an overlap between these two fields; it is expected that if the link_mpbs field is non-zero that the link_bps field may be ignored. These values are supplied to provide diagnostic information and allow predictive scheduling of data exchange and therefore are not required to be exact nor do they control the associated hardware settings.

This control block must be declared by specifying the control block index value UDI_NIC_INFO_CB_NUM in a udi_cb_init_t in the driver's udi_init_info.

The NSR or ND obtains the udi_nic_bind_req_cb_t structure to use with the udi_nd_info_req and udi_nsr_info_ack operations by calling udi_cb_alloc with a cb_idx that has been defined for the UDI_NIC_INFO_CB_NUM control block.

REFERENCES udi_nd_info_req, udi_nsr_info_ack, udi_init_info, udi_cb_init_t, udi_cb_alloc


UDI NIC Driver Specification Contents