Fibre Channel SNIA HBA API Programmer's Guide
Input Parameters: handle - Handle to an adapter already opened by a call to
HBA_OpenAdapter().
event_buffer - Pointer to a buffer to receive events. Set to size (in
event records) of the buffer for receiving events on call.
event_count - Number of event records in the buffer to receive
events. Returned as the number of events actually delivered.
Output Parameters: event_count - Number of event records in the buffer to receive
events that have been filled.
Return Values: Returned after a
successful execution of the
call.
HBA_STATUS_OK
HBA_STATUS_ERROR
Returned when an
internal library or system
error is detected.
HBA_STATUS_ERROR_BUSY
Returned when the library
is busy and cannot
currently process this call.
HBA_STATUS_ERROR_INVALID_HANDLE
Returned when the handle
passed to this function is
invalid.
HBA_STATUS_ERROR_ARG
Returned when any of the
pointers passed to this
function is NULL.
HBA_STATUS_ERROR_UNAVAILABLE
Returned when the
adapter to which the
handle corresponds is not
available.
HBA_STATUS_ERROR_NOT_SUPPORTED
Returned when all the
arguments passed are
valid and this function is
not supported by the
corresponding vendor
library.
Call order sequence: See Appendix A.
Example code:
#define NUMBER_EVENTS 1024
HBA_EVENTINFO event_buf[NUMBER_EVENTS];
HBA_STATUS status, event_cnt=NUMBER_EVENTS;
if((status = HBA_GetEventBuffer(adapter_handle,
event_buf, &event_cnt))!= HBA_STATUS_OK)
{
printf("GetEvent Error. returned %d\n", status);
}
else
{
for(i=0; i< event_cnt; i++)
{
printf("Event count %d: FcpID %x, Code %d, NPage %x\n", i+1,
event_buf[i].Event.RSCN_EventInfo.PortFcId,
event_buf[i].EventCode,
event_buf[i].Event.RSCN_EventInfo.NPortPage);
}
}
FC-3 Management Functions 23