DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

udi_nic_status_cb_t(3udi)


Status indication control block

SYNOPSIS

#include <udi.h>

typedef struct {

	udi_cb_t gcb;

	udi_ubit8_t event;

} udi_nic_status_cb_t;
 
/* Network Status Control Block Group Number */
 
#define  UDI_NIC_STATUS_CB_NUM				4
 
/* Network Status Event Codes */
 
#define UDI_NIC_LINK_DOWN 0 #define UDI_NIC_LINK_UP 1 #define UDI_NIC_LINK_RESET 2

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.

event is the status event code being indicated by the ND driver to the NSR. The following status events have been defined:

UDI_NIC_LINK_UP -- Link active transition. This event causes the ND and NSR to transition to the ACTIVE state (see Section 2.4.1, "NIC Metalanguage States").

UDI_NIC_LINK_DOWN -- Link inactive transition. This event causes the ND and NSR to transition to the ENABLED state (see Section 2.4.1, "NIC Metalanguage States").

UDI_NIC_LINK_RESET -- Link reset occurred. A link reset has the same effect as a UDI_NIC_LINK_DOWN event with the additional indication that any link state was lost and that a link-level error recovery was initiated. The NSR should be prepared to re-establish the link and remote node configuration information when a link reset occurs. This event also causes the ND and NSR to transition to the ENABLED state.

DESCRIPTION The network status indication control block structure is used to notify the NSR of asynchronous events. This structure is used with network status indications issued across the control channel.

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

The ND obtains the udi_nic_status_cb_t structure to use with the udi_nsr_status_ind operation by calling udi_cb_alloc for the UDI_NIC_CONTROL_CB_NUM's declared cb_idx value.

REFERENCES udi_nsr_status_ind, udi_init_info, udi_cb_init_t, udi_cb_alloc


UDI NIC Driver Specification Contents