|
Packit |
857059 |
/* BEGIN_ICS_COPYRIGHT3 ****************************************
|
|
Packit |
857059 |
|
|
Packit |
857059 |
Copyright (c) 2015, Intel Corporation
|
|
Packit |
857059 |
|
|
Packit |
857059 |
Redistribution and use in source and binary forms, with or without
|
|
Packit |
857059 |
modification, are permitted provided that the following conditions are met:
|
|
Packit |
857059 |
|
|
Packit |
857059 |
* Redistributions of source code must retain the above copyright notice,
|
|
Packit |
857059 |
this list of conditions and the following disclaimer.
|
|
Packit |
857059 |
* Redistributions in binary form must reproduce the above copyright
|
|
Packit |
857059 |
notice, this list of conditions and the following disclaimer in the
|
|
Packit |
857059 |
documentation and/or other materials provided with the distribution.
|
|
Packit |
857059 |
* Neither the name of Intel Corporation nor the names of its contributors
|
|
Packit |
857059 |
may be used to endorse or promote products derived from this software
|
|
Packit |
857059 |
without specific prior written permission.
|
|
Packit |
857059 |
|
|
Packit |
857059 |
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
Packit |
857059 |
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
Packit |
857059 |
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
Packit |
857059 |
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
|
|
Packit |
857059 |
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
Packit |
857059 |
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
Packit |
857059 |
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
Packit |
857059 |
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
Packit |
857059 |
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
Packit |
857059 |
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
Packit |
857059 |
|
|
Packit |
857059 |
** END_ICS_COPYRIGHT3 ****************************************/
|
|
Packit |
857059 |
|
|
Packit |
857059 |
/* [ICS VERSION STRING: unknown] */
|
|
Packit |
857059 |
|
|
Packit |
857059 |
#ifndef __IBA_IB_IBT_H__
|
|
Packit |
857059 |
#define __IBA_IB_IBT_H__ (1)
|
|
Packit |
857059 |
|
|
Packit |
857059 |
#include "iba/stl_types.h"
|
|
Packit |
857059 |
|
|
Packit |
857059 |
#ifdef __cplusplus
|
|
Packit |
857059 |
extern "C" {
|
|
Packit |
857059 |
#endif
|
|
Packit |
857059 |
|
|
Packit |
857059 |
/*
|
|
Packit |
857059 |
* IB notification routines
|
|
Packit |
857059 |
*/
|
|
Packit |
857059 |
|
|
Packit |
857059 |
/*
|
|
Packit |
857059 |
* Bit masks for event types subscribed and generated
|
|
Packit |
857059 |
*/
|
|
Packit |
857059 |
|
|
Packit |
857059 |
typedef uintn IB_NOTIFY_TYPE;
|
|
Packit |
857059 |
|
|
Packit |
857059 |
#define IB_NOTIFY_CA_ADD 0x00000001 /* A new adapter was added */
|
|
Packit |
857059 |
#define IB_NOTIFY_CA_REMOVE 0x00000002 /* An adapter is being removed */
|
|
Packit |
857059 |
#define IB_NOTIFY_PORT_DOWN 0x00000004 /* Link went down, sync loss */
|
|
Packit |
857059 |
#define IB_NOTIFY_LID_EVENT 0x00000008 /* The specified port had a */
|
|
Packit |
857059 |
/* LID/state/LMC change */
|
|
Packit |
857059 |
#define IB_NOTIFY_SM_EVENT 0x00000010 /* A Subnet Manager has */
|
|
Packit |
857059 |
/* programmed specified port */
|
|
Packit |
857059 |
#define IB_NOTIFY_PKEY_EVENT 0x00000020 /* The Pkey for the specified */
|
|
Packit |
857059 |
/* port has changed */
|
|
Packit |
857059 |
#define IB_NOTIFY_PORT_UP 0x00000040 /* Link went up */
|
|
Packit |
857059 |
#define IB_NOTIFY_ON_REGISTER 0x80000000 /* Notify immediately during */
|
|
Packit |
857059 |
/* Registration of any */
|
|
Packit |
857059 |
/* present state (eg. CA_ADD */
|
|
Packit |
857059 |
/* for all active CAs and */
|
|
Packit |
857059 |
/* LID_EVENT for all active */
|
|
Packit |
857059 |
/* ports) */
|
|
Packit |
857059 |
#define IB_NOTIFY_ANY 0x7FFFFFFF /* Receive notification for */
|
|
Packit |
857059 |
/* all event types */
|
|
Packit |
857059 |
/* note IB_NOTIFY_ON_REGISTER */
|
|
Packit |
857059 |
/* is not included in this flag */
|
|
Packit |
857059 |
|
|
Packit |
857059 |
/* Notification callback style
|
|
Packit |
857059 |
* async - no locks are held during callback:
|
|
Packit |
857059 |
* - callback can deregister or do any other operations
|
|
Packit |
857059 |
* - callback could occur slightly after deregister, caller must handle
|
|
Packit |
857059 |
* sync - a lock is held during callback:
|
|
Packit |
857059 |
* - callback cannot deregister or do operations which may cause a notification
|
|
Packit |
857059 |
* (eg. send packets to local SMA)
|
|
Packit |
857059 |
* - callbacks will not occur after deregister
|
|
Packit |
857059 |
*/
|
|
Packit |
857059 |
typedef enum {
|
|
Packit |
857059 |
IB_NOTIFY_ASYNC,
|
|
Packit |
857059 |
IB_NOTIFY_SYNC
|
|
Packit |
857059 |
} IB_NOTIFY_LOCKING;
|
|
Packit |
857059 |
|
|
Packit |
857059 |
|
|
Packit |
857059 |
/*
|
|
Packit |
857059 |
* Notification record passed during a callback
|
|
Packit |
857059 |
*/
|
|
Packit |
857059 |
|
|
Packit |
857059 |
typedef struct {
|
|
Packit |
857059 |
IB_NOTIFY_TYPE EventType; /* Type of event being reported */
|
|
Packit |
857059 |
EUI64 Guid; /* Port/Node GUID, depends on event type */
|
|
Packit |
857059 |
void *Context; /* User Context that was supplied */
|
|
Packit |
857059 |
/* during the registration */
|
|
Packit |
857059 |
} IB_NOTIFY_RECORD;
|
|
Packit |
857059 |
|
|
Packit |
857059 |
|
|
Packit |
857059 |
typedef
|
|
Packit |
857059 |
void
|
|
Packit |
857059 |
( *IB_NOTIFY_CALLBACK ) (
|
|
Packit |
857059 |
IN IB_NOTIFY_RECORD NotifyRecord
|
|
Packit |
857059 |
);
|
|
Packit |
857059 |
|
|
Packit |
857059 |
/*
|
|
Packit |
857059 |
* iba_register_notify/RegisterNotify
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* register for notifications of IB type events
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* INPUTS:
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* Callback -Callback routine to be registered for notifications
|
|
Packit |
857059 |
* Context -User specified context to return in callbacks
|
|
Packit |
857059 |
* EventMask -Mask to subscribe to event types
|
|
Packit |
857059 |
* Locking -Locking/Synchronization model
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* OUTPUTS:
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* NotifyHandle -Notification handle on successful registration
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* RETURNS:
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* FSUCCESS
|
|
Packit |
857059 |
* FINSUFFICIENT_MEMORY
|
|
Packit |
857059 |
*/
|
|
Packit |
857059 |
|
|
Packit |
857059 |
typedef
|
|
Packit |
857059 |
FSTATUS
|
|
Packit |
857059 |
(IBT_REGISTER_NOTIFY) (
|
|
Packit |
857059 |
IN IB_NOTIFY_CALLBACK Callback,
|
|
Packit |
857059 |
IN void *Context,
|
|
Packit |
857059 |
IN IB_NOTIFY_TYPE EventMask,
|
|
Packit |
857059 |
IN IB_NOTIFY_LOCKING Locking,
|
|
Packit |
857059 |
OUT IB_HANDLE *NotifyHandle
|
|
Packit |
857059 |
);
|
|
Packit |
857059 |
IBA_API IBT_REGISTER_NOTIFY iba_register_notify;
|
|
Packit |
857059 |
|
|
Packit |
857059 |
|
|
Packit |
857059 |
/*
|
|
Packit |
857059 |
* iba_register_guid_notify/RegisterGuidNotify
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* register for notifications of IB type events against a specific Node/Port
|
|
Packit |
857059 |
* Guid
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* INPUTS:
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* Guid -Guid to limit events to
|
|
Packit |
857059 |
* (Node Guid for CA events, Port Guid for other events)
|
|
Packit |
857059 |
* Callback -Callback routine to be registered for notifications
|
|
Packit |
857059 |
* Context -User specified context to return in callbacks
|
|
Packit |
857059 |
* EventMask -Mask to subscribe to event types
|
|
Packit |
857059 |
* Locking -Locking/Synchronization model
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* OUTPUTS:
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* NotifyHandle -Notification handle on successful registration
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* RETURNS:
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* FSUCCESS
|
|
Packit |
857059 |
* FINSUFFICIENT_MEMORY
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
*/
|
|
Packit |
857059 |
|
|
Packit |
857059 |
typedef
|
|
Packit |
857059 |
FSTATUS
|
|
Packit |
857059 |
(IBT_REGISTER_GUID_NOTIFY) (
|
|
Packit |
857059 |
IN EUI64 Guid,
|
|
Packit |
857059 |
IN IB_NOTIFY_CALLBACK Callback,
|
|
Packit |
857059 |
IN void *Context,
|
|
Packit |
857059 |
IN IB_NOTIFY_TYPE EventMask,
|
|
Packit |
857059 |
IN IB_NOTIFY_LOCKING Locking,
|
|
Packit |
857059 |
OUT IB_HANDLE *NotifyHandle
|
|
Packit |
857059 |
);
|
|
Packit |
857059 |
IBA_API IBT_REGISTER_GUID_NOTIFY iba_register_guid_notify;
|
|
Packit |
857059 |
|
|
Packit |
857059 |
/*
|
|
Packit |
857059 |
* iba_deregister_notify/DeregisterNotify
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* Deregister previously registered notifications
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* INPUTS:
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* NotifyHandle -Notification handle returned on successful registration
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* OUTPUTS:
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* RETURNS:
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* FSUCCESS
|
|
Packit |
857059 |
* FINVALID_PARAMETER
|
|
Packit |
857059 |
* FINSUFFICIENT_MEMORY
|
|
Packit |
857059 |
*/
|
|
Packit |
857059 |
|
|
Packit |
857059 |
typedef
|
|
Packit |
857059 |
FSTATUS
|
|
Packit |
857059 |
(IBT_DEREGISTER_NOTIFY) (
|
|
Packit |
857059 |
IN IB_HANDLE NotifyHandle
|
|
Packit |
857059 |
);
|
|
Packit |
857059 |
IBA_API IBT_DEREGISTER_NOTIFY iba_deregister_notify;
|
|
Packit |
857059 |
|
|
Packit |
857059 |
/*
|
|
Packit |
857059 |
* iba_get_caguids/GetCaGuids
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* Get the list of CA's presently in the system
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* INPUTS:
|
|
Packit |
857059 |
* CaCount - size of CaGuidList
|
|
Packit |
857059 |
* data pointed to only used during duration of call
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* OUTPUTS:
|
|
Packit |
857059 |
* CaCount - total CAs in system (always returned, even if error status)
|
|
Packit |
857059 |
* CaGuidList - where to save CA Guids
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* RETURNS:
|
|
Packit |
857059 |
* FINSUFFICIENT_MEMORY - CaGuidList too small for # of CAs in system
|
|
Packit |
857059 |
* FINVALID_PARAMETER - CaGuidList is NULL and CaCount was not 0
|
|
Packit |
857059 |
*/
|
|
Packit |
857059 |
|
|
Packit |
857059 |
typedef
|
|
Packit |
857059 |
FSTATUS
|
|
Packit |
857059 |
(IBT_GET_CA_GUIDS)(
|
|
Packit |
857059 |
IN OUT uint32 *CaCount,
|
|
Packit |
857059 |
OUT EUI64 *CaGuidList
|
|
Packit |
857059 |
);
|
|
Packit |
857059 |
IBA_API IBT_GET_CA_GUIDS iba_get_caguids;
|
|
Packit |
857059 |
|
|
Packit |
857059 |
/*
|
|
Packit |
857059 |
* iba_get_caguids_alloc/GetCaGuidsAlloc
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* Get the list of CA's presently in the system and allocate *CaGuidList
|
|
Packit |
857059 |
* caller must MemoryDeallocate *CaGuidList
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* INPUTS:
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* OUTPUTS:
|
|
Packit |
857059 |
* CaCount - total CAs in system (always returned, even if error status)
|
|
Packit |
857059 |
* CaGuidList - where to save CA Guids
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* RETURNS:
|
|
Packit |
857059 |
* FINSUFFICIENT_RESOURCES - can't allocate memory for list
|
|
Packit |
857059 |
* FINVALID_PARAMETER - CaCount or CaGuidList is NULL
|
|
Packit |
857059 |
*/
|
|
Packit |
857059 |
|
|
Packit |
857059 |
typedef
|
|
Packit |
857059 |
FSTATUS
|
|
Packit |
857059 |
(IBT_GET_CA_GUIDS_ALLOC)(
|
|
Packit |
857059 |
OUT uint32 *CaCount,
|
|
Packit |
857059 |
OUT EUI64 **CaGuidList
|
|
Packit |
857059 |
);
|
|
Packit |
857059 |
IBA_API IBT_GET_CA_GUIDS_ALLOC iba_get_caguids_alloc;
|
|
Packit |
857059 |
|
|
Packit |
857059 |
/*
|
|
Packit |
857059 |
* iba_query_ca_by_guid/QueryCaByGuid
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* Get CA attributes for CA with given Guid
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* INPUTS:
|
|
Packit |
857059 |
* CaGuid - CA to query
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* OUTPUTS:
|
|
Packit |
857059 |
* CaAttributes
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* RETURNS:
|
|
Packit |
857059 |
* FINVALID_PARAMETER - CaAttributes is NULL
|
|
Packit |
857059 |
* FNOT_FOUND - no such CA
|
|
Packit |
857059 |
* otherwise status of QueryCA is returned
|
|
Packit |
857059 |
*/
|
|
Packit |
857059 |
|
|
Packit |
857059 |
typedef
|
|
Packit |
857059 |
FSTATUS
|
|
Packit |
857059 |
(IBT_QUERY_CA_BY_GUID)(
|
|
Packit |
857059 |
IN EUI64 CaGuid,
|
|
Packit |
857059 |
OUT IB_CA_ATTRIBUTES *CaAttributes
|
|
Packit |
857059 |
);
|
|
Packit |
857059 |
IBA_API IBT_QUERY_CA_BY_GUID iba_query_ca_by_guid;
|
|
Packit |
857059 |
|
|
Packit |
857059 |
/*
|
|
Packit |
857059 |
* iba_query_ca_by_guid_alloc/QueryCaByGuidAlloc
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* Get CA attributes for CA with given Guid and allocate
|
|
Packit |
857059 |
* CaAttributes->PortAttributesList
|
|
Packit |
857059 |
* caller must MemoryDeallocate CaAttributes->PortAttributesList
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* INPUTS:
|
|
Packit |
857059 |
* CaGuid - CA to query
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* OUTPUTS:
|
|
Packit |
857059 |
* CaAttributes
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* RETURNS:
|
|
Packit |
857059 |
* FINVALID_PARAMETER - CaAttributes is NULL
|
|
Packit |
857059 |
* FNOT_FOUND - no such CA
|
|
Packit |
857059 |
* otherwise status of QueryCA is returned:
|
|
Packit |
857059 |
* FINSUFFICIENT_MEMORY - PortAttributesListSize too small
|
|
Packit |
857059 |
* ca attributes returned, but not port attributes
|
|
Packit |
857059 |
* FSUCCESS - ca and port attributes returned
|
|
Packit |
857059 |
*/
|
|
Packit |
857059 |
|
|
Packit |
857059 |
typedef
|
|
Packit |
857059 |
FSTATUS
|
|
Packit |
857059 |
(IBT_QUERY_CA_BY_GUID_ALLOC)(
|
|
Packit |
857059 |
IN EUI64 CaGuid,
|
|
Packit |
857059 |
OUT IB_CA_ATTRIBUTES *CaAttributes
|
|
Packit |
857059 |
);
|
|
Packit |
857059 |
IBA_API IBT_QUERY_CA_BY_GUID_ALLOC iba_query_ca_by_guid_alloc;
|
|
Packit |
857059 |
|
|
Packit |
857059 |
/*
|
|
Packit |
857059 |
* iba_query_port_by_guid/QueryPortByGuid
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* Get Port attributes for CA Port with given Guid
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* INPUTS:
|
|
Packit |
857059 |
* PortGuid - CA Port to query
|
|
Packit |
857059 |
* ByteCount - size of PortAttributes
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* OUTPUTS:
|
|
Packit |
857059 |
* PortAttributes
|
|
Packit |
857059 |
* ByteCount - space needed to hold PortAttributes
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* RETURNS:
|
|
Packit |
857059 |
* FINSUFFICIENT_MEMORY - ByteCount insufficient
|
|
Packit |
857059 |
* FINSUFFICIENT_RESOURCES - unable to allocate internal memory needed
|
|
Packit |
857059 |
* FINVALID_PARAMETER - PortAttributes is NULL
|
|
Packit |
857059 |
* FNOT_FOUND - no such CA Port
|
|
Packit |
857059 |
* otherwise status of QueryCA is returned
|
|
Packit |
857059 |
*/
|
|
Packit |
857059 |
|
|
Packit |
857059 |
typedef
|
|
Packit |
857059 |
FSTATUS
|
|
Packit |
857059 |
(IBT_QUERY_PORT_BY_GUID)(
|
|
Packit |
857059 |
IN EUI64 PortGuid,
|
|
Packit |
857059 |
OUT IB_PORT_ATTRIBUTES *PortAttributes,
|
|
Packit |
857059 |
IN OUT uint32 *ByteCount
|
|
Packit |
857059 |
);
|
|
Packit |
857059 |
IBA_API IBT_QUERY_PORT_BY_GUID iba_query_port_by_guid;
|
|
Packit |
857059 |
|
|
Packit |
857059 |
/*
|
|
Packit |
857059 |
* iba_query_port_by_guid/QueryPortByGuid
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* Get Port attributes for CA Port with given Guid and allocate
|
|
Packit |
857059 |
* *PortAttributes
|
|
Packit |
857059 |
* caller must MemoryDeallocate *PortAttributes
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* INPUTS:
|
|
Packit |
857059 |
* PortGuid - CA Port to query
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* OUTPUTS:
|
|
Packit |
857059 |
* *PortAttributes
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* RETURNS:
|
|
Packit |
857059 |
* FINSUFFICIENT_MEMORY - ByteCount insufficient
|
|
Packit |
857059 |
* FINSUFFICIENT_RESOURCES - unable to allocate internal memory needed
|
|
Packit |
857059 |
* FINVALID_PARAMETER - PortAttributes is NULL
|
|
Packit |
857059 |
* FNOT_FOUND - no such CA Port
|
|
Packit |
857059 |
* otherwise status of QueryCA is returned
|
|
Packit |
857059 |
*/
|
|
Packit |
857059 |
|
|
Packit |
857059 |
typedef
|
|
Packit |
857059 |
FSTATUS
|
|
Packit |
857059 |
(IBT_QUERY_PORT_BY_GUID_ALLOC)(
|
|
Packit |
857059 |
IN EUI64 PortGuid,
|
|
Packit |
857059 |
OUT IB_PORT_ATTRIBUTES **PortAttributes
|
|
Packit |
857059 |
);
|
|
Packit |
857059 |
IBA_API IBT_QUERY_PORT_BY_GUID_ALLOC iba_query_port_by_guid_alloc;
|
|
Packit |
857059 |
|
|
Packit |
857059 |
/* translate port number into a port Guid
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* INPUTS:
|
|
Packit |
857059 |
* caGuid - CA to check against
|
|
Packit |
857059 |
* port - 1-n, port within CA
|
|
Packit |
857059 |
* if 0, 1st active port
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* OUTPUTS:
|
|
Packit |
857059 |
* *pPortGuid - port guid for specified port
|
|
Packit |
857059 |
* *pCaAttributes - attributes for CA,
|
|
Packit |
857059 |
* caller must MemoryDeallocate pCaAttributes->PortAttributesList
|
|
Packit |
857059 |
* *ppPortAtributes - attributes for port, caller must MemoryDeallocate
|
|
Packit |
857059 |
* *pPortCount - number of ports in CA
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* RETURNS:
|
|
Packit |
857059 |
* FNOT_FOUND - *pPortCount still output
|
|
Packit |
857059 |
*/
|
|
Packit |
857059 |
typedef
|
|
Packit |
857059 |
FSTATUS
|
|
Packit |
857059 |
(IBT_GET_CA_PORTGUID)(
|
|
Packit |
857059 |
IN EUI64 caGuid,
|
|
Packit |
857059 |
IN uint32 port,
|
|
Packit |
857059 |
OUT EUI64 *pPortGuid OPTIONAL,
|
|
Packit |
857059 |
OUT IB_CA_ATTRIBUTES *pCaAttributes OPTIONAL,
|
|
Packit |
857059 |
OUT IB_PORT_ATTRIBUTES **ppPortAttributes OPTIONAL,
|
|
Packit |
857059 |
OUT uint32 *pPortCount OPTIONAL
|
|
Packit |
857059 |
);
|
|
Packit |
857059 |
IBA_API IBT_GET_CA_PORTGUID iba_get_ca_portguid;
|
|
Packit |
857059 |
|
|
Packit |
857059 |
/* translate ca/port number into a port Guid
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* INPUTS:
|
|
Packit |
857059 |
* ca - system wide CA number 1-n, if 0 port is a system wide port #
|
|
Packit |
857059 |
* port - 1-n, if ca is 0, system wide port number, otherwise port within CA
|
|
Packit |
857059 |
* if 0, 1st active port
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* OUTPUTS:
|
|
Packit |
857059 |
* *pCaGuid - ca guid for specified port
|
|
Packit |
857059 |
* *pPortGuid - port guid for specified port
|
|
Packit |
857059 |
* *pCaAttributes - attributes for CA,
|
|
Packit |
857059 |
* caller must MemoryDeallocate pCaAttributes->PortAttributesList
|
|
Packit |
857059 |
* *ppPortAtributes - attributes for port, caller must MemoryDeallocate
|
|
Packit |
857059 |
* *pCaCount - number of CA in system
|
|
Packit |
857059 |
* *pPortCount - number of ports in system or CA (depends on ca input)
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* RETURNS:
|
|
Packit |
857059 |
* FNOT_FOUND - *pCaCount and *pPortCount still output
|
|
Packit |
857059 |
* if ca == 0, *pPortCount = number of ports in system
|
|
Packit |
857059 |
* if ca < *pCaCount, *pPortCount = number of ports in CA
|
|
Packit |
857059 |
* otherwise *pPortCount will be 0
|
|
Packit |
857059 |
*/
|
|
Packit |
857059 |
typedef
|
|
Packit |
857059 |
FSTATUS
|
|
Packit |
857059 |
IBT_GET_PORTGUID(
|
|
Packit |
857059 |
IN uint32 ca,
|
|
Packit |
857059 |
IN uint32 port,
|
|
Packit |
857059 |
OUT EUI64 *pCaGuid OPTIONAL,
|
|
Packit |
857059 |
OUT EUI64 *pPortGuid OPTIONAL,
|
|
Packit |
857059 |
OUT IB_CA_ATTRIBUTES *pCaAttributes OPTIONAL,
|
|
Packit |
857059 |
OUT IB_PORT_ATTRIBUTES **ppPortAttributes OPTIONAL,
|
|
Packit |
857059 |
OUT uint32 *pCaCount OPTIONAL,
|
|
Packit |
857059 |
OUT uint32 *pPortCount OPTIONAL
|
|
Packit |
857059 |
);
|
|
Packit |
857059 |
IBA_API IBT_GET_PORTGUID iba_get_portguid;
|
|
Packit |
857059 |
|
|
Packit |
857059 |
/* format an error message when iba_get_portguid returns FNOT_FOUND
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* INPUTS:
|
|
Packit |
857059 |
* ca, port - inputs provided to failed call to iba_get_portguid
|
|
Packit |
857059 |
* CaCount, PortCount - outputs returned by failed call to iba_get_portguid
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* RETURNS:
|
|
Packit |
857059 |
* string formatted with error message. This is a pointer into a static
|
|
Packit |
857059 |
* string which will be invalidated upon next call to this function.
|
|
Packit |
857059 |
*/
|
|
Packit |
857059 |
typedef
|
|
Packit |
857059 |
const char*
|
|
Packit |
857059 |
IBT_FORMAT_GET_PORTGUID_ERROR(
|
|
Packit |
857059 |
IN uint32 ca,
|
|
Packit |
857059 |
IN uint32 port,
|
|
Packit |
857059 |
IN uint32 CaCount,
|
|
Packit |
857059 |
IN uint32 PortCount
|
|
Packit |
857059 |
);
|
|
Packit |
857059 |
IBA_API IBT_FORMAT_GET_PORTGUID_ERROR iba_format_get_portguid_error;
|
|
Packit |
857059 |
|
|
Packit |
857059 |
/*
|
|
Packit |
857059 |
* iba_find_ca_gid/FindCaGid
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* search Ports of a given CA to find the Port with the matching GID
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* INPUTS:
|
|
Packit |
857059 |
* pGid - GID to search for
|
|
Packit |
857059 |
* data pointed to only used during duration of call
|
|
Packit |
857059 |
* CaGuid - CA to search
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* OUTPUTS:
|
|
Packit |
857059 |
* pPortGuid - port which GID was found on
|
|
Packit |
857059 |
* pGidIndex - index of GID within ports GID Table
|
|
Packit |
857059 |
* PortAttributes - attributes of port (caller must MemoryDeallocate)
|
|
Packit |
857059 |
* LocalCaAckDelay - corresponding field from CaAttributes
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* RETURNS:
|
|
Packit |
857059 |
* FINSUFFICIENT_MEMORY - unable to allocate internal memory needed
|
|
Packit |
857059 |
* FINSUFFICIENT_RESOURCES - unable to allocate internal memory needed
|
|
Packit |
857059 |
* FNOT_FOUND - no such CA Port or no such CA
|
|
Packit |
857059 |
* otherwise status of QueryCA is returned
|
|
Packit |
857059 |
*/
|
|
Packit |
857059 |
|
|
Packit |
857059 |
typedef
|
|
Packit |
857059 |
FSTATUS
|
|
Packit |
857059 |
(IBT_FIND_CA_GID)(
|
|
Packit |
857059 |
IN const IB_GID *pGid,
|
|
Packit |
857059 |
IN EUI64 CaGuid,
|
|
Packit |
857059 |
OUT EUI64 *pPortGuid OPTIONAL,
|
|
Packit |
857059 |
OUT uint8 *pGidIndex OPTIONAL,
|
|
Packit |
857059 |
OUT IB_PORT_ATTRIBUTES **PortAttributes OPTIONAL,
|
|
Packit |
857059 |
OUT uint8 *pLocalCaAckDelay OPTIONAL
|
|
Packit |
857059 |
);
|
|
Packit |
857059 |
IBA_API IBT_FIND_CA_GID iba_find_ca_gid;
|
|
Packit |
857059 |
|
|
Packit |
857059 |
/*
|
|
Packit |
857059 |
* iba_find_ca_gid2/FindCaGid2
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* search Ports of a given CA to find the Port with the matching GID
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* INPUTS:
|
|
Packit |
857059 |
* pGid - GID to search for
|
|
Packit |
857059 |
* data pointed to only used during duration of call
|
|
Packit |
857059 |
* CaGuid - CA to search
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* OUTPUTS:
|
|
Packit |
857059 |
* pPortGuid - port which GID was found on
|
|
Packit |
857059 |
* pGidIndex - index of GID within ports GID Table
|
|
Packit |
857059 |
* PortAttributes - attributes of port (caller must MemoryDeallocate)
|
|
Packit |
857059 |
* CaAttributes - CaAttributes (caller must MemoryDeallocate)
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* RETURNS:
|
|
Packit |
857059 |
* FINSUFFICIENT_MEMORY - unable to allocate internal memory needed
|
|
Packit |
857059 |
* FINSUFFICIENT_RESOURCES - unable to allocate internal memory needed
|
|
Packit |
857059 |
* FNOT_FOUND - no such CA Port or no such CA
|
|
Packit |
857059 |
* otherwise status of QueryCA is returned
|
|
Packit |
857059 |
*/
|
|
Packit |
857059 |
|
|
Packit |
857059 |
typedef
|
|
Packit |
857059 |
FSTATUS
|
|
Packit |
857059 |
(IBT_FIND_CA_GID2)(
|
|
Packit |
857059 |
IN const IB_GID *pGid,
|
|
Packit |
857059 |
IN EUI64 CaGuid,
|
|
Packit |
857059 |
OUT EUI64 *pPortGuid OPTIONAL,
|
|
Packit |
857059 |
OUT uint8 *pGidIndex OPTIONAL,
|
|
Packit |
857059 |
OUT IB_PORT_ATTRIBUTES **PortAttributes OPTIONAL,
|
|
Packit |
857059 |
OUT IB_CA_ATTRIBUTES **CaAttributes OPTIONAL
|
|
Packit |
857059 |
);
|
|
Packit |
857059 |
IBA_API IBT_FIND_CA_GID2 iba_find_ca_gid2;
|
|
Packit |
857059 |
|
|
Packit |
857059 |
/*
|
|
Packit |
857059 |
* iba_find_gid
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* search Ports of all CAs to find the CA/Port with the matching GID
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* INPUTS:
|
|
Packit |
857059 |
* pGid - GID to search for
|
|
Packit |
857059 |
* data pointed to only used during duration of call
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* OUTPUTS:
|
|
Packit |
857059 |
* pCaGuid - CA which GID was found on
|
|
Packit |
857059 |
* pPortGuid - port which GID was found on
|
|
Packit |
857059 |
* pGidIndex - index of GID within ports GID Table
|
|
Packit |
857059 |
* PortAttributes - attributes of port (caller must MemoryDeallocate)
|
|
Packit |
857059 |
* CaAttributes - CaAttributes (caller must MemoryDeallocate)
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* RETURNS:
|
|
Packit |
857059 |
* FINSUFFICIENT_MEMORY - unable to allocate internal memory needed
|
|
Packit |
857059 |
* FINSUFFICIENT_RESOURCES - unable to allocate internal memory needed
|
|
Packit |
857059 |
* FNOT_FOUND - no such CA Port
|
|
Packit |
857059 |
* otherwise status of QueryCA is returned
|
|
Packit |
857059 |
*/
|
|
Packit |
857059 |
|
|
Packit |
857059 |
typedef
|
|
Packit |
857059 |
FSTATUS
|
|
Packit |
857059 |
(IBT_FIND_GID)(
|
|
Packit |
857059 |
IN const IB_GID *pGid,
|
|
Packit |
857059 |
OUT EUI64 *pCaGuid OPTIONAL,
|
|
Packit |
857059 |
OUT EUI64 *pPortGuid OPTIONAL,
|
|
Packit |
857059 |
OUT uint8 *pGidIndex OPTIONAL,
|
|
Packit |
857059 |
OUT IB_PORT_ATTRIBUTES **PortAttributes OPTIONAL,
|
|
Packit |
857059 |
OUT IB_CA_ATTRIBUTES **CaAttributes OPTIONAL
|
|
Packit |
857059 |
);
|
|
Packit |
857059 |
IBA_API IBT_FIND_GID iba_find_gid;
|
|
Packit |
857059 |
|
|
Packit |
857059 |
/*
|
|
Packit |
857059 |
* iba_get_ca_for_port/GetCaForPort
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* Get CA Guid for given Port Guid
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* INPUTS:
|
|
Packit |
857059 |
* PortGuid - Port to find CA for
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* OUTPUTS:
|
|
Packit |
857059 |
* CaGuid - CA Guid for given port
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* RETURNS:
|
|
Packit |
857059 |
* FINSUFFICIENT_RESOURCES - unable to allocate internal memory needed
|
|
Packit |
857059 |
* FNOT_FOUND - no such CA Port
|
|
Packit |
857059 |
* otherwise status of QueryCA is returned
|
|
Packit |
857059 |
*/
|
|
Packit |
857059 |
|
|
Packit |
857059 |
typedef
|
|
Packit |
857059 |
FSTATUS
|
|
Packit |
857059 |
(IBT_GET_CA_FOR_PORT)(
|
|
Packit |
857059 |
IN EUI64 PortGuid,
|
|
Packit |
857059 |
OUT EUI64 *CaGuid
|
|
Packit |
857059 |
);
|
|
Packit |
857059 |
IBA_API IBT_GET_CA_FOR_PORT iba_get_ca_for_port;
|
|
Packit |
857059 |
|
|
Packit |
857059 |
/*
|
|
Packit |
857059 |
* iba_select_ca
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* Track CA/ports being heavily used and aid in selection of least used one
|
|
Packit |
857059 |
* Usage models:
|
|
Packit |
857059 |
* pCaGuid = NULL invalid call
|
|
Packit |
857059 |
* *pCaGuid !=0 caller has specified a CA, API increases its count
|
|
Packit |
857059 |
* *pCaGuid ==0 API will recommend a CA and increase its count
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* INPUTS:
|
|
Packit |
857059 |
* *pCaGuid - CA caller plans to use
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* OUTPUTS:
|
|
Packit |
857059 |
* *pCaGuid - CA recommended for use (matches supplied *pCaGuid if input != 0)
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* RETURNS:
|
|
Packit |
857059 |
* FNOT_FOUND - no such CA
|
|
Packit |
857059 |
* FINVALID_PARAMETER - invalid combination of arguments
|
|
Packit |
857059 |
* FINSUFFICIENT_RESOURCES - no CAs in system with active ports
|
|
Packit |
857059 |
* FERROR - other errors (unable to query CA attributes, etc)
|
|
Packit |
857059 |
*/
|
|
Packit |
857059 |
|
|
Packit |
857059 |
typedef
|
|
Packit |
857059 |
FSTATUS
|
|
Packit |
857059 |
(IBT_SELECT_CA)(
|
|
Packit |
857059 |
IN OUT EUI64 *pCaGuid
|
|
Packit |
857059 |
);
|
|
Packit |
857059 |
IBA_API IBT_SELECT_CA iba_select_ca;
|
|
Packit |
857059 |
|
|
Packit |
857059 |
/*
|
|
Packit |
857059 |
* iba_deselect_ca
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* undo effects of iba_select_ca
|
|
Packit |
857059 |
* call should match the CaGUID from a previous iba_select_ca call
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* INPUTS:
|
|
Packit |
857059 |
* CaGuid - CA output/selected via iba_select_ca
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* OUTPUTS:
|
|
Packit |
857059 |
* None
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* RETURNS:
|
|
Packit |
857059 |
* FNOT_FOUND - no such CA or Port, or PortGuid not within specified CA
|
|
Packit |
857059 |
* FINVALID_OPERATION - would result in negative use count
|
|
Packit |
857059 |
*/
|
|
Packit |
857059 |
|
|
Packit |
857059 |
typedef
|
|
Packit |
857059 |
FSTATUS
|
|
Packit |
857059 |
(IBT_DESELECT_CA)(
|
|
Packit |
857059 |
IN EUI64 CaGuid
|
|
Packit |
857059 |
);
|
|
Packit |
857059 |
IBA_API IBT_DESELECT_CA iba_deselect_ca;
|
|
Packit |
857059 |
|
|
Packit |
857059 |
#ifdef __cplusplus
|
|
Packit |
857059 |
};
|
|
Packit |
857059 |
#endif
|
|
Packit |
857059 |
|
|
Packit |
857059 |
#endif /* __IBA_IB_IBT_H__ */
|