The HBA_RegisterForTargetEvents routine registers for target events with a specified target or with all targets associated with an adapter.
HBA_STATUS HBA_API HBA_RegisterForTargetEvents( HBA_TARGET_CALLBACK callback, void *userData, HBA_HANDLE handle, HBA_WWN hbaPortWWN, HBA_WWN discoveredPortWWN, HBA_CALLBACKHANDLE *callbackHandle, HBA_UINT32 allTargets );
Pointer to a callback routine of type HBA_PORT_CALLBACK that is called when an adapter is added to the system.
Pointer to a buffer that is passed to the callback routine with each event. This data correlates the event with the source of the event registration.
Contains a value returned by the routine HBA_OpenAdapter that identifies the HBA for which the adapter events are generated.
Contains a 64-bit worldwide name (WWN) that uniquely identifies the local HBA port from which the target was discovered. For a discussion of worldwide names, see the T11 committee's Fibre Channel HBA API specification.
Contains a 64-bit WWN that uniquely identifies the remote HBA port from which target events are reported.
Contains an opaque identifier that the user must pass to HBA_RemoveCallback to de-register the callback routine.
Indicates, when nonzero, that the value in discoveredPortWWN will be ignored, and the callback will be called for events associated with all current and future discovered targets. If this member is 0, only events associated with the target specified by discoveredPortWWN will be reported.
The HBA_RegisterForTargetEvents routine returns a value of type HBA_STATUS that indicates the status of the HBA. In particular, HBA_RegisterForTargetEvents returns one of the following values.
Returned if the callback registration was successful.
Returned if the HBA referenced by handle does not contain a port with a name that matches discoveredPortWWN.
Returned if an unspecified error occurred that prevented the registration of the callback routine.
To stop event delivery, call HBA_RemoveCallback.
|Hbaapi.h (include Hbaapi.h)|