Possible values are HBA_EVENT_PORT_STAT_THRESHOLD and HBA_EVENT_PORT_STAT_GROWTH.

HBA_RegisterForTargetEvents()

If the value is HBA_EVENT_LINK_INCIDENT, RLIR has occured and information is in the RLIRBuffer. If the value is HBA_EVENT_LINK_UNKNOWN, a fabric link or topology change has occured and was not detected by RLIR. The RLIRBuffer is ignored

If the event is of type HBA_EVENT_PORT_FABRIC, this parameter will be the RSCN-affected Port ID page as defined in FC-FS. It is ignored for all other event types.

pRLIRBuffer

A pointer to a buffer where RLIR data may be passed to the callback function. The buffer will be overwritten for each fabric link callback function, but will not be overwritten within a single call to the callback function.

RLIRBufferSize

Size in bytes of the RLIRBuffer.

pUserData

a pointer passed with each event to the callback routine that can be used to correlate the event with the source of its event registration

pRLIRBuffer

A pointer to a buffer where RLIR data may be passed to the callback function. The buffer will be overwritten for each fabric link callback function, but will not be overwritten within a single call to the callback function.

RLIRBufferSize

Size in bytes of the RLIRBuffer.

handle

a handle to the HBA that event callbacks are being requested

PortWWN

The Port WWN of the HBA for which the event is being reported.

hbaPortWWN

The Port WWN of the HBA of which the event callbacks are being requested.

stats

an HBA_PortStatistics structure which indicates the counters to be monitored. If statType is HBA_EVENT_PORT_STAT_THRESHOLD, any non-null values are thresholds for which to watch. If statType is HBA_EVET_PORT_STAT_GROWTH, any non-null values are growth rate numbers over 1 minute.

statType

A value either HBA_EVENT_PORT_STAT_TRHESHOLD or HBA_EVENT_PORT_STAT_GROWTH used to determine whether counters registered are for threshold crossing or growth rate.

discoveredPortWWN

The Port WWN of the target that the event callbacks are being requested of.

pCallbackHandle

A pointer to structure in which an opaque identifier is returned that is used to deregister the callback. To deregister this event, call HBA_RemoveCallback() with this pCallbackHandle as an argument.

allTargets

If value is non-zero, discoveredPortWWN is ignored. Events for all discovered targets will be registered by this call. If value is zero, only events for discoveredPortWWN will be registered.

pcallbackHandle

A handle returned by the event registration function of the routine that is to be removed.

Description

The HBA_RegisterForAdapterEvents() function registers an application-defined function that is called when an
HBA category asynchronous event occurs. An HBA catetory event can have one
of the following event types: HBA_EVENT_ADAPTER_REMOVE or HBA_EVENT_ADAPTER_CHANGE. If either of these
events occur, the callback function is called, regardless of whether the HBA
handle specified at registration is open. The HBA_RemoveCallback() function must be called
to end event delivery.

The HBA_RegisterForAdapterAddEvents() function registers an application-defined function that is called whenever an
HBA add category asynchronous event occurs. The callback function is called
when a new HBA is added to the local system. The HBA_RemoveCallback()
function must be called to end event delivery.

The HBA_RegisterForAdapterPortEvents() function registers an application-defined function that is called on the
specified HBA whenever a port category asynchronous event occurs. A port catetory
event can be one of the following event types: HBA_EVENT_PORT_OFFLINE, HBA_EVENT_PORT_ONLINE, HBA_EVENT_PORT_NEW_TARGETS,
HBA_EVENT_PORT_FABRIC, or HBA_EVENT_PORT_UNKNOWN. The handle need not be open for callbacks
to occur. The HBA_RemoveCallback() function must be called to end event delivery.

The HBA_RegisterForAdapterPortStatEvents() function defines conditions that would cause an HBA port statistics
asynchronous event and registers an application-defined function that is called whenever one
of these events occur. An HBA port statistics asynchronous event can be one
of the following event types: HBA_EVENT_PORT_STAT_THRESHOLD or HBA_EVENT_PORT_STAT_GROWTH. More than
one statistic can be registered with one call by setting multiple statistics
in the stats argument. For threshold events, once a specific threshold has
been crossed, the callback is automatically deregistered for that statistic. The
handle need not be open for callbacks to occur. The HBA_RemoveCallback() function
must be called to end event delivery.

The HBA_RegisterForTargetEvents() function registers an application-defined function that is called on the
specified HBA whenever a target category asynchronous event occurs. A Target category
event can be one of the following event types: HBA_EVENT_TARGET_OFFLINE, HBA_EVENT_TARGET_ONLINE, HBA_EVENT_TARGET_REMOVED,
HBA_EVENT_TARGET_UNKNOWN. The handle need not be open for callbacks to occur.
The HBA_RemoveCallback() function must be called to end event delivery.

The HBA_RegisterForLinkEvents() function registers an application defined function that is called on
the specified HBA whenever a link category asynchronous event occurs. A link
category event can be one of the following event types: HBA_EVENT_LINK_INCIDENT or
HBA_EVENT_LINK_UNKNOWN. RLIR ELS is the only fabric link event type and
the callback function is called whenever is it detected by the HBA.
The handle need not be open for callbacks to occur. The HBA_RemoveCallback()
function must be called to end event delivery.

The HBA_RemoveCallback() function removes the HBA_CALLBACKHANDLE instance of the callback routine.

Return Values

Upon successful completion, HBA_RegisterForAdapterEvents(), HBA_RegisterForAdapterAddEvents(), HBA_RegisterForAdapterPortEvents(), HBA_RegisterForAdapterPortStatEvents(), HBA_RegisterForTargetEvents(), and HBA_RegisterForLinkEvents() return HBA_STATUS_OK and
pCallbackHandle may be used to deregister the callback. Otherwise, an error value
is returned and pCallbackHandle is not valid.