Blame IbAccess/Common/Inc/ib_sd.h

Packit 857059
/* BEGIN_ICS_COPYRIGHT3 ****************************************
Packit 857059
Packit 857059
Copyright (c) 2015-2017, 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_SD_H_
Packit 857059
#define _IBA_IB_SD_H_
Packit 857059
Packit 857059
/* IB Subnet Data Interface
Packit 857059
 * The subnet data interface provides a simplied interface to the SM/SA and
Packit 857059
 * automates queries, sets and deletes for commonly required information
Packit 857059
 * from the SM/SA.
Packit 857059
 *
Packit 857059
 * The subnet data interface automatically handles the following:
Packit 857059
 * - retries (client configurable)
Packit 857059
 * - timeouts (client configurable)
Packit 857059
 * - RMPP response coallessing and inter-record padding
Packit 857059
 * - extraction of selected fields from a query to provide a concise response
Packit 857059
 * 		to client
Packit 857059
 * - multi-tiered queries (get paths to a node, etc)
Packit 857059
 *
Packit 857059
 * New drivers/applications should use the iba_* functions.
Packit 857059
 * They can now be called directly.
Packit 857059
 */
Packit 857059
Packit 857059
#include <iba/stl_types.h>
Packit 857059
#include <iba/stl_mad_types.h>
Packit 857059
#include <iba/stl_sa_types.h>
Packit 857059
#ifndef IB_STACK_OPENIB
Packit 857059
#if defined(VXWORKS)
Packit 857059
#include <iba/ib_sa_records_priv.h>
Packit 857059
#ifdef BUILD_CM
Packit 857059
#include <iba/ib_cm.h>
Packit 857059
#endif
Packit 857059
#endif
Packit 857059
Packit 857059
#endif
Packit 857059
Packit 857059
#ifdef __cplusplus
Packit 857059
extern "C" {
Packit 857059
#endif
Packit 857059
Packit 857059
#define TIMEOUT_INFINITE            0
Packit 857059
#define RETRYCOUNT_INVALID			0xffffffff	/* used internally to flag */
Packit 857059
												/* lack of control parameters */
Packit 857059
Packit 857059
/* default command control parameters, used if not specified by client for
Packit 857059
 * open session nor for query/fabric operation calls
Packit 857059
 */
Packit 857059
#define DEFAULT_SD_TIMEOUT			20000	/* 20 Seconds */
Packit 857059
#define DEFAULT_SD_RETRY_COUNT		3
Packit 857059
Packit 857059
/* ClientDebug Flags, affects level of output to debug log for given client */
Packit 857059
#define SD_DBG_SILENT				0x00000000
Packit 857059
#define SD_DBG_ERROR				0x00000001
Packit 857059
#define SD_DBG_INFO					0x00000002
Packit 857059
#define SD_DBG_TRACE				0x00000004
Packit 857059
#define DBG_SILENT					SD_DBG_SILENT/* DBG_SILENT is deprecated */
Packit 857059
#define DBG_ERROR					SD_DBG_ERROR /* DBG_ERROR is deprecated*/
Packit 857059
#define DBG_INFO					SD_DBG_INFO	 /* DBG_INFO is deprecated */
Packit 857059
#define DBG_TRACE					SD_DBG_TRACE /* DBG_TRACE is deprecated*/
Packit 857059
	
Packit 857059
typedef void *CLIENT_HANDLE;
Packit 857059
Packit 857059
/* parameters for query and fabric operation error handling */
Packit 857059
typedef struct _COMMAND_CONTROL_PARAMETERS  {
Packit 857059
    uint32 RetryCount;	/* 0=no retries, >=1 # retries if initial attempt fails */
Packit 857059
						/* retries are only performed upon timeout */
Packit 857059
						/* requests with a failed response are not retried */
Packit 857059
    uint32 Timeout;		/* in milliseconds */
Packit 857059
} COMMAND_CONTROL_PARAMETERS, *PCOMMAND_CONTROL_PARAMETERS;
Packit 857059
Packit 857059
#define SD_OPTION_CACHED	0x00000001 /* No new query if info already available */
Packit 857059
Packit 857059
/* per client selection of default parameters for all queries */
Packit 857059
typedef struct _CLIENT_CONTROL_PARAMETERS {
Packit 857059
    COMMAND_CONTROL_PARAMETERS ControlParameters;
Packit 857059
    uint32 ClientDebugFlags;        
Packit 857059
    uint32 OptionFlags;
Packit 857059
} CLIENT_CONTROL_PARAMETERS, *PCLIENT_CONTROL_PARAMETERS;
Packit 857059
Packit 857059
/* multicast flag values */
Packit 857059
#define MC_FLAG_NONE             0x0000
Packit 857059
#define MC_FLAG_WANT_UNAVAILABLE 0x0001 /* want callback when group becomes unavailable */
Packit 857059
Packit 857059
/* multicast group state values */
Packit 857059
typedef enum
Packit 857059
{
Packit 857059
	MC_GROUP_STATE_REQUEST_JOIN,
Packit 857059
	MC_GROUP_STATE_REQUEST_LEAVE,
Packit 857059
	MC_GROUP_STATE_JOIN_FAILED,
Packit 857059
	MC_GROUP_STATE_AVAILABLE,
Packit 857059
	MC_GROUP_STATE_UNAVAILABLE
Packit 857059
} MC_GROUP_STATE;
Packit 857059
Packit 857059
/* ----------------------------------------------------------------------------
Packit 857059
 * QueryFabricInformation
Packit 857059
 * Data structures used to perform Queries of the SA/SM via one or more
Packit 857059
 * Get or GetTable RMPP sequences
Packit 857059
 */
Packit 857059
Packit 857059
/* QueryFabricInformation combinations Supported:
Packit 857059
 *
Packit 857059
 * InputType		OutputType		Query performed
Packit 857059
 * ---------        ----------      ---------------
Packit 857059
 * NoInput			Lids			SA GetTable all NodeRecords
Packit 857059
 * NoInput			SystemImageGuid	SA GetTable all NodeRecords
Packit 857059
 * NoInput			NodeGuids		SA GetTable all NodeRecords
Packit 857059
 * NoInput			PortGuids		SA GetTable all NodeRecords
Packit 857059
 * NoInput			NodeDesc		SA GetTable all NodeRecords
Packit 857059
 * NoInput			NodeRecord		SA GetTable all NodeRecords
Packit 857059
 * NoInput			PortInfoRecord	SA GetTable all PortInfoRecords
Packit 857059
 * NoInput			SMInfoRecord	SA GetTable all SMInfoRecords
Packit 857059
 * NoInput			LinkRecord		SA GetTable all LinkRecords
Packit 857059
 * NoInput			ServiceRecord	SA GetTable all ServiceRecords
Packit 857059
 * NoInput			McMemberRecord	SA GetTable all McMemberRecords
Packit 857059
 * NoInput			InformInfoRecord SA GetTable all InformInfoRecords
Packit 857059
 *
Packit 857059
 * NoInput			PathRecord		SA GetTable all NodeRecords
Packit 857059
 * 									followed by a SA GetTable PathRecords
Packit 857059
 * 									from the local PortGuid and each
Packit 857059
 * 									Remote PortGuid reported in NodeRecords
Packit 857059
 *
Packit 857059
 * NoInput			SwitchInfoRecord SA GetTable all SwitchInfoRecords
Packit 857059
 * NoInput			LinearFDBRecord	SA GetTable all LinearFDBRecords
Packit 857059
 * NoInput			RandomFDBRecord	SA GetTable all RandomFDBRecords
Packit 857059
 * NoInput			MCastFDBRecord	SA GetTable all MCastFDBRecords
Packit 857059
 * NoInput			VLArbTableRecord SA GetTable all VLArbTableRecords
Packit 857059
 * NoInput			PKeyTableRecord SA GetTable all PKeyTableRecords
Packit 857059
 * NoInput			GuidInfoRecord	SA GetTable all GuidInfoRecords
Packit 857059
 *
Packit 857059
 * NodeType			Lids			SA GetTable NodeRecords of NodeType
Packit 857059
 * NodeType			SystemImageGuid	SA GetTable NodeRecords of NodeType
Packit 857059
 * NodeType			NodeGuids		SA GetTable NodeRecords of NodeType
Packit 857059
 * NodeType			PortGuids		SA GetTable NodeRecords of NodeType
Packit 857059
 * NodeType			NodeDesc		SA GetTable NodeRecords of NodeType
Packit 857059
 * NodeType			NodeRecord		SA GetTable NodeRecords of NodeType
Packit 857059
 *
Packit 857059
 * NodeType			PathRecord		SA GetTable NodeRecords of NodeType
Packit 857059
 * 									followed by a SA GetTable PathRecords
Packit 857059
 * 									from the local PortGuid and each
Packit 857059
 * 									Remote PortGuid reported in NodeRecords
Packit 857059
 *
Packit 857059
 * SystemImageGuid	Lids			SA GetTable NodeRecords with SystemImageGuid
Packit 857059
 * SystemImageGuid	SystemImageGuid	SA GetTable NodeRecords with SystemImageGuid
Packit 857059
 * SystemImageGuid	NodeGuids		SA GetTable NodeRecords with SystemImageGuid
Packit 857059
 * SystemImageGuid	PortGuids		SA GetTable NodeRecords with SystemImageGuid
Packit 857059
 * SystemImageGuid	NodeDesc		SA GetTable NodeRecords with SystemImageGuid
Packit 857059
 * SystemImageGuid	NodeRecord		SA GetTable NodeRecords with SystemImageGuid
Packit 857059
 *
Packit 857059
 * SystemImageGuid	PathRecord		SA GetTable NodeRecords with SystemImageGuid
Packit 857059
 * 									followed by a SA GetTable PathRecords
Packit 857059
 * 									from the local PortGuid and each
Packit 857059
 * 									Remote PortGuid reported in NodeRecords
Packit 857059
 *
Packit 857059
 * NodeGuid			Lids			SA GetTable NodeRecords with NodeGuid		
Packit 857059
 * NodeGuid			SystemImageGuid	SA GetTable NodeRecords with NodeGuid		
Packit 857059
 * NodeGuid			NodeGuids		SA GetTable NodeRecords with NodeGuid		
Packit 857059
 * NodeGuid			PortGuids		SA GetTable NodeRecords with NodeGuid		
Packit 857059
 * NodeGuid			NodeDesc		SA GetTable NodeRecords with NodeGuid		
Packit 857059
 * NodeGuid			NodeRecord		SA GetTable NodeRecords with NodeGuid		
Packit 857059
 *
Packit 857059
 * NodeGuid			PathRecord		SA GetTable NodeRecords with NodeGuid		
Packit 857059
 * 									followed by a SA GetTable PathRecords
Packit 857059
 * 									from the local PortGuid and each
Packit 857059
 * 									Remote PortGuid reported in NodeRecords
Packit 857059
 *
Packit 857059
 * PortGuid			Lids			SA GetTable NodeRecords with PortGuid		
Packit 857059
 * PortGuid			SystemImageGuid	SA GetTable NodeRecords with PortGuid		
Packit 857059
 * PortGuid			NodeGuids		SA GetTable NodeRecords with PortGuid		
Packit 857059
 * PortGuid			PortGuids		SA GetTable NodeRecords with PortGuid		
Packit 857059
 * PortGuid			NodeDesc		SA GetTable NodeRecords with PortGuid		
Packit 857059
 *
Packit 857059
 * PortGuid			NodeRecord		SA GetTable NodeRecords with PortGuid		
Packit 857059
 * 									followed by a SA GetTable PathRecords
Packit 857059
 * 									from the local PortGuid and each
Packit 857059
 * 									Remote PortGuid reported in NodeRecords
Packit 857059
 *
Packit 857059
 * PortGuid			PathRecord		SA GetTable PathRecords
Packit 857059
 * 									from the local PortGuid to the
Packit 857059
 * 									given Remote PortGuid
Packit 857059
 *
Packit 857059
 * PortGuid			ServiceRecord	SA GetTable ServiceRecords
Packit 857059
 * 									provided by given PortGuid
Packit 857059
 *
Packit 857059
 * PortGuid			McMemberRecord	SA GetTable McMemberRecords
Packit 857059
 * 									for the given PortGuid
Packit 857059
 *
Packit 857059
 * PortGuid			TraceRecord		SA GetTraceTable TraceRecords
Packit 857059
 * 									from the local PortGuid to the
Packit 857059
 * 									given Remote PortGuid
Packit 857059
 *
Packit 857059
 * PortGuid			InformInfoRecord SA GetTable InformInfoRecords
Packit 857059
 * 									for the given PortGuid
Packit 857059
 *
Packit 857059
 * PortGid			PathRecord		SA GetTable PathRecords
Packit 857059
 * 									from the local PortGuid to the
Packit 857059
 * 									given Remote PortGid
Packit 857059
 *
Packit 857059
 * PortGid			ServiceRecord	SA GetTable ServiceRecords
Packit 857059
 * 									provided by given PortGid
Packit 857059
 *
Packit 857059
 * PortGid			McMemberRecord	SA GetTable McMemberRecords
Packit 857059
 * 									for the given PortGid
Packit 857059
 *
Packit 857059
 * PortGid			InformInfoRecord SA GetTable InformInfoRecords
Packit 857059
 * 									for the given PortGid
Packit 857059
 *
Packit 857059
 * PortGid			TraceRecord		SA GetTraceTable TraceRecords
Packit 857059
 * 									from the local PortGuid to the
Packit 857059
 * 									given Remote PortGid
Packit 857059
 *
Packit 857059
 * McGid			McMemberRecord	SA GetTable McMemberRecords
Packit 857059
 * 									for the given Multicast Gid
Packit 857059
 *
Packit 857059
 * PortGuidPair		PathRecord		SA GetTable PathRecords
Packit 857059
 * 									from the given source PortGuid to the
Packit 857059
 * 									given destination PortGuid
Packit 857059
 *
Packit 857059
 * PortGuidPair		TraceRecord		SA GetTraceTable TraceRecords
Packit 857059
 * 									from the given source PortGuid to the
Packit 857059
 * 									given destination PortGuid
Packit 857059
 *
Packit 857059
 * GidPair			PathRecord		SA GetTable PathRecords
Packit 857059
 * 									from the given source Gid to the
Packit 857059
 * 									given destination Gid
Packit 857059
 *
Packit 857059
 * GidPair			TraceRecord		SA GetTraceTable TraceRecords
Packit 857059
 * 									from the given source Gid to the
Packit 857059
 * 									given destination Gid
Packit 857059
 *
Packit 857059
 * PathRecord		PathRecord		SA GetTable PathRecords with PathRecord
Packit 857059
 * 									and component mask as given
Packit 857059
 *
Packit 857059
 * PathRecord		TraceRecord		SA GetTraceTable TraceRecords with PathRecord
Packit 857059
 * 									and component mask as given
Packit 857059
 *
Packit 857059
 * PortGuidList		PathRecord		SA GetTable MultiPathRecords
Packit 857059
 * 									from the given source PortGuids to the
Packit 857059
 * 									given destination PortGuids
Packit 857059
 *
Packit 857059
 * GidList			PathRecord		SA GetTable MultiPathRecords
Packit 857059
 * 									from the given source Gids to the
Packit 857059
 * 									given destination Gids
Packit 857059
 *
Packit 857059
 * MultiPathRecord	PathRecord		SA GetTable MultiPathRecords with
Packit 857059
 * 									MultiPathRecord and component mask as given
Packit 857059
 * 									
Packit 857059
 * Lid				Lids			SA GetTable NodeRecords with Lid		
Packit 857059
 * Lid				SystemImageGuid	SA GetTable NodeRecords with Lid		
Packit 857059
 * Lid				NodeGuids		SA GetTable NodeRecords with Lid		
Packit 857059
 * Lid				PortGuids		SA GetTable NodeRecords with Lid		
Packit 857059
 * Lid				NodeDesc		SA GetTable NodeRecords with Lid		
Packit 857059
 * Lid				NodeRecord		SA GetTable NodeRecords with Lid		
Packit 857059
 *
Packit 857059
 * Lid				PathRecord		SA GetTable NodeRecords with Lid		
Packit 857059
 * 									followed by a SA GetTable PathRecords
Packit 857059
 * 									from the local PortGuid and each
Packit 857059
 * 									Remote PortGuid reported in NodeRecords
Packit 857059
 *
Packit 857059
 * Lid				McMemberRecord	SA GetTable McRecords with given MLid		
Packit 857059
 * Lid				SwitchInfoRecord SA GetTable SwitchInfoRecords with Lid		
Packit 857059
 * Lid				LinearFDBRecord	SA GetTable LinearFDBRecords for switch Lid
Packit 857059
 * Lid				RandomFDBRecord	SA GetTable RandomFDBRecords for switch Lid
Packit 857059
 * Lid				MCastFDBRecord	SA GetTable MCastFDBRecords for switch Lid
Packit 857059
 * Lid				VLArbTableRecord SA GetTable VLArbTableRecords with Lid
Packit 857059
 * Lid				PKeyTableRecord SA GetTable PKeyTableRecords with Lid
Packit 857059
 * Lid				GuidInfoRecord	SA GetTable GuidInfoRecords with Lid
Packit 857059
 *
Packit 857059
 * NodeDesc			Lids			SA GetTable NodeRecords with NodeDesc		
Packit 857059
 * NodeDesc			SystemImageGuid	SA GetTable NodeRecords with NodeDesc		
Packit 857059
 * NodeDesc			NodeGuids		SA GetTable NodeRecords with NodeDesc		
Packit 857059
 * NodeDesc			PortGuids		SA GetTable NodeRecords with NodeDesc		
Packit 857059
 * NodeDesc			NodeDesc		SA GetTable NodeRecords with NodeDesc		
Packit 857059
 * NodeDesc			NodeRecord		SA GetTable NodeRecords with NodeDesc		
Packit 857059
 *
Packit 857059
 * NodeDesc			PathRecord		SA GetTable NodeRecords with NodeDesc		
Packit 857059
 * 									followed by a SA GetTable PathRecords
Packit 857059
 * 									from the local PortGuid and each
Packit 857059
 * 									Remote PortGuid reported in NodeRecords
Packit 857059
 *
Packit 857059
 * ServiceRecord	ServiceRecord	SA GetTable ServiceRecords with
Packit 857059
 * 									ServiceRecord and component mask given
Packit 857059
 *
Packit 857059
 * McMemberRecord	McMemberRecord	SA GetTable McMemberRecords with
Packit 857059
 * 									McMemberRecord and component mask given
Packit 857059
 */
Packit 857059
Packit 857059
/* record query selector(s) for QueryFabricInformation
Packit 857059
 * next to each is listed the corresponding field in the QUERY_INPUT_VALUE
Packit 857059
 * union below which will be used
Packit 857059
 */
Packit 857059
typedef enum  _QUERY_INPUT_TYPE
Packit 857059
{
Packit 857059
	InputTypeNoInput          = 0, /* No input. returns all records */
Packit 857059
	InputTypeNodeType         = 1, /* NodeType */
Packit 857059
	InputTypeSystemImageGuid  = 2, /* Guid - a system Image guid */
Packit 857059
	InputTypeNodeGuid         = 3, /* Guid - a node guid */
Packit 857059
	InputTypePortGuid         = 4, /* Guid - a port guid */
Packit 857059
	InputTypePortGid          = 5, /* Gid - a gid associated with a port */
Packit 857059
	InputTypeMcGid            = 6, /* Gid - a multicast gid */
Packit 857059
	InputTypePortGuidPair     = 7, /* GuidPair - a pair of port guids */
Packit 857059
	InputTypeGidPair          = 8, /* GidPair - a pair of gids */
Packit 857059
	InputTypePathRecord       = 9, /* PathRecord */
Packit 857059
	InputTypePathRecordNetworkOrder = 10, /* PathRecord in network byte order */
Packit 857059
	InputTypeLid             = 11, /* Lid - a lid in the local subnet */
Packit 857059
	InputTypePKey            = 12, /* PKey - a pkey */
Packit 857059
	InputTypeSL              = 13, /* SL - a service level */
Packit 857059
	InputTypeIndex           = 14, /* Index - an index associated with a VF */
Packit 857059
	InputTypeServiceId       = 15, /* ServiceId */
Packit 857059
	InputTypeNodeDesc        = 16, /* NodeDesc - a node description/name */
Packit 857059
	InputTypeServiceRecord   = 17, /* ServiceRecordValue - complete SA SERVICE_RECORD and component mask */
Packit 857059
	InputTypeMcMemberRecord  = 18, /* McMemberRecordValue - complete SA MCMEMBER_RECORD and component mask */
Packit 857059
	InputTypePortGuidList    = 19, /* GuidList - a list of port guids */
Packit 857059
	InputTypeGidList         = 20, /* GidList - a list of gids */
Packit 857059
	InputTypeMultiPathRecord = 21, /* MultiPathRecord */
Packit 857059
	InputTypeSourceGid       = 22,
Packit 857059
Packit 857059
	InputTypeStlBase         = 0x1000,
Packit 857059
	InputTypeDeviceGroup     = (InputTypeStlBase+2), /* A single device group name */
Packit 857059
Packit 857059
} QUERY_INPUT_TYPE, *PQUERY_INPUT_TYPE;
Packit 857059
Packit 857059
typedef struct _QueryInputString {
Packit 857059
	QUERY_INPUT_TYPE inputType;
Packit 857059
	const char *inputTypeStr;
Packit 857059
} QueryInputString_t;
Packit 857059
Packit 857059
/* convert QUERY_INPUT_TYPE to a string */
Packit 857059
IBA_API const char* iba_sd_query_input_type_msg(QUERY_INPUT_TYPE code);
Packit 857059
Packit 857059
/* output type requested for QueryFabricInformation
Packit 857059
 * next to each is listed the corresponding structure below which will be used
Packit 857059
 * for output
Packit 857059
 */
Packit 857059
typedef enum  _QUERY_RESULT_TYPE
Packit 857059
{
Packit 857059
	/* SA query results */
Packit 857059
	OutputTypeSystemImageGuid  = 0,   /* GUID_RESULTS a set of system image GUIDs */
Packit 857059
	OutputTypeNodeGuid         = 1,   /* GUID_RESULTS a set of node GUIDs */
Packit 857059
	OutputTypePortGuid         = 2,   /* GUID_RESULTS a set of port GUIDs */
Packit 857059
	OutputTypeLid              = 3,   /* LID_RESULTS is a set of LIDs */
Packit 857059
	OutputTypeGid              = 4,   /* GID_RESULTS is a set of GIDs */
Packit 857059
	OutputTypeNodeDesc         = 5,   /* NODEDESC_RESULTS set of node descr/names */
Packit 857059
	OutputTypePathRecord       = 6,   /* PATH_RESULTS is set of path records */
Packit 857059
	OutputTypePathRecordNetworkOrder = 7, /* PATH_RESULTS is set of path records in network byte order*/
Packit 857059
	OutputTypeNodeRecord       = 8,   /* NODE_RECORD_RESULTS complete SA NodeRecords */
Packit 857059
	OutputTypePortInfoRecord   = 9,   /* PORTINFO_RECORD_RESULTS complete SA PortInfoRecords */
Packit 857059
	OutputTypeSMInfoRecord     = 10,  /* SMINFO_RECORD_RESULTS complete SA SMInfoRecords */
Packit 857059
	OutputTypeLinkRecord       = 11,  /* LINK_RECORD_RESULTS complete SA LinkRecords */
Packit 857059
	OutputTypeServiceRecord    = 12,  /* SERVICE_RECORD_RESULTS complete SA IB_SERVICE_RECORD */
Packit 857059
	OutputTypeMcMemberRecord   = 13,  /* MCMEMBER_RECORD_RESULTS complete SA IB_MCMEMBER_RECORD */
Packit 857059
	OutputTypeInformInfoRecord = 14,  /* INFORM_INFO_RECORD_RESULTS complete SA IB_INFORM_INFO_RECORD */
Packit 857059
	OutputTypeTraceRecord      = 15,  /* TRACE_RECORD_RESULTS is set of trace records */
Packit 857059
	OutputTypeSwitchInfoRecord = 16,  /* SWITCHINFO_RECORD_RESULTS is set of switch info records */
Packit 857059
	OutputTypeLinearFDBRecord  = 17,  /* LINEAR_FDB_RECORD_RESULTS is set of linear FDB records */
Packit 857059
	OutputTypeRandomFDBRecord  = 18,  /* RANDOM_FDB_RECORD_RESULTS is set of random FDB records */
Packit 857059
	OutputTypeMCastFDBRecord   = 19,  /* MCAST_FDB_RECORD_RESULTS is set of multicast FDB records */
Packit 857059
	OutputTypeVLArbTableRecord = 20,  /* VLARBTABLE_RECORD_RESULTS is set of VL Arbitration records */
Packit 857059
	OutputTypePKeyTableRecord  = 21,  /* PKEYTABLE_RECORD_RESULTS is set of VL Arbitration records */
Packit 857059
	OutputTypeVfInfoRecord     = 22,  /* VF_RECORD_RESULTS is set of VF info records */
Packit 857059
	OutputTypeClassPortInfo    = 23,
Packit 857059
Packit 857059
	/* PA query results */
Packit 857059
	OutputTypePaRecord      = 24,     /* PA_PACKET_RESULTS complete PA SinglePacketRespRecords */
Packit 857059
	OutputTypePaTableRecord = 25,     /* PA_TABLE_PACKET_RESULTS complete PA MultiPacketRespRecords */
Packit 857059
Packit 857059
	/* New STL Types */
Packit 857059
	OutputTypeStlBase                        = 0x1000,
Packit 857059
	OutputTypeStlNodeRecord                  = (OutputTypeStlBase+1),
Packit 857059
	OutputTypeStlNodeDesc                    = (OutputTypeStlBase+2),
Packit 857059
	OutputTypeStlPortInfoRecord              = (OutputTypeStlBase+3),
Packit 857059
	OutputTypeStlSwitchInfoRecord            = (OutputTypeStlBase+4),
Packit 857059
	OutputTypeStlPKeyTableRecord             = (OutputTypeStlBase+5),
Packit 857059
	OutputTypeStlSLSCTableRecord             = (OutputTypeStlBase+6),
Packit 857059
	OutputTypeStlSMInfoRecord                = (OutputTypeStlBase+7),
Packit 857059
	OutputTypeStlLinearFDBRecord             = (OutputTypeStlBase+8),
Packit 857059
	OutputTypeStlVLArbTableRecord            = (OutputTypeStlBase+9),
Packit 857059
	OutputTypeStlLid                         = (OutputTypeStlBase+11),
Packit 857059
	OutputTypeStlMCastFDBRecord              = (OutputTypeStlBase+12),
Packit 857059
	OutputTypeStlLinkRecord                  = (OutputTypeStlBase+13),
Packit 857059
	OutputTypeStlSystemImageGuid             = (OutputTypeStlBase+14),
Packit 857059
	OutputTypeStlPortGuid                    = (OutputTypeStlBase+15),
Packit 857059
	OutputTypeStlNodeGuid                    = (OutputTypeStlBase+16),
Packit 857059
	OutputTypeStlInformInfoRecord            = (OutputTypeStlBase+18),
Packit 857059
	OutputTypeStlVfInfoRecord                = (OutputTypeStlBase+19),
Packit 857059
	OutputTypeStlTraceRecord                 = (OutputTypeStlBase+20),
Packit 857059
	OutputTypeStlQuarantinedNodeRecord       = (OutputTypeStlBase+21),
Packit 857059
	OutputTypeStlCongInfoRecord              = (OutputTypeStlBase+22),
Packit 857059
	OutputTypeStlSwitchCongRecord            = (OutputTypeStlBase+23),
Packit 857059
	OutputTypeStlSwitchPortCongRecord        = (OutputTypeStlBase+24),
Packit 857059
	OutputTypeStlHFICongRecord               = (OutputTypeStlBase+25),
Packit 857059
	OutputTypeStlHFICongCtrlRecord           = (OutputTypeStlBase+26),
Packit 857059
	OutputTypeStlBufCtrlTabRecord            = (OutputTypeStlBase+27),
Packit 857059
	OutputTypeStlCableInfoRecord             = (OutputTypeStlBase+28),
Packit 857059
	OutputTypeStlPortGroupRecord             = (OutputTypeStlBase+29),
Packit 857059
	OutputTypeStlPortGroupFwdRecord          = (OutputTypeStlBase+30),
Packit 857059
	OutputTypeStlSCSLTableRecord             = (OutputTypeStlBase+31),
Packit 857059
	OutputTypeStlSCVLtTableRecord            = (OutputTypeStlBase+32),
Packit 857059
	OutputTypeStlSCVLntTableRecord           = (OutputTypeStlBase+33),
Packit 857059
	OutputTypeStlSCSCTableRecord             = (OutputTypeStlBase+34),
Packit 857059
	OutputTypeStlClassPortInfo               = (OutputTypeStlBase+35),
Packit 857059
	OutputTypeStlFabricInfoRecord            = (OutputTypeStlBase+36),
Packit 857059
	OutputTypeStlSCVLrTableRecord            = (OutputTypeStlBase+38),
Packit 857059
	OutputTypeStlDeviceGroupNameRecord       = (OutputTypeStlBase+41),
Packit 857059
	OutputTypeStlDeviceGroupMemberRecord     = (OutputTypeStlBase+42),
Packit 857059
	OutputTypeStlDeviceTreeMemberRecord      = (OutputTypeStlBase+44),
Packit 857059
	OutputTypeStlSwitchCostRecord            = (OutputTypeStlBase+53),
Packit 857059
Packit 857059
} QUERY_RESULT_TYPE, *PQUERY_RESULT_TYPE;
Packit 857059
Packit 857059
typedef struct _QueryOutputString {
Packit 857059
	QUERY_RESULT_TYPE outputType;
Packit 857059
	const char *outputTypeStr;
Packit 857059
} QueryOutputString_t;
Packit 857059
Packit 857059
/* convert QUERY_RESULT_TYPE to a string */
Packit 857059
IBA_API const char* iba_sd_query_result_type_msg(QUERY_RESULT_TYPE code);
Packit 857059
Packit 857059
/* limit of 8 allows Multipath request to fit in a single output packet
Packit 857059
 * also allows QUERY_INPUT_VALUE to stay same overall size for backward
Packit 857059
 * compatibility
Packit 857059
 */
Packit 857059
#define MULTIPATH_GID_LIMIT	8
Packit 857059
/* input value for QueryFabricInformation, InputType selects field in union */
Packit 857059
typedef union _QUERY_INPUT_VALUE
Packit 857059
{
Packit 857059
    NODE_TYPE TypeOfNode;       /* Query input is a node type */
Packit 857059
	EUI64 Guid;                 /* Query input is a GUID */
Packit 857059
	IB_GID Gid;                 /* Query input is a GID */
Packit 857059
	struct						/* Query input is a GUID pair  */
Packit 857059
	{
Packit 857059
		EUI64 SourcePortGuid;   /* Query Input source port GUID */
Packit 857059
		EUI64 DestPortGuid;		/* Query Input destination port GUID */
Packit 857059
	} PortGuidPair;
Packit 857059
	struct						/* Query input is a GUID pair  */
Packit 857059
	{
Packit 857059
		IB_GID SourceGid;   	/* Query Input source GID */
Packit 857059
		IB_GID DestGid;			/* Query Input destination GID */
Packit 857059
	} GidPair;
Packit 857059
	struct						/* Query input is a GUID list  */
Packit 857059
	{
Packit 857059
		uint8 SourceGuidCount;	/* number of Source GUIDs in GuidList */
Packit 857059
		uint8 DestGuidCount;	/* number of Dest GUIDs in GuidList */
Packit 857059
		EUI64 GuidList[MULTIPATH_GID_LIMIT];/* Src GUIDs, followed by Dest GUIDs */
Packit 857059
	} PortGuidList;
Packit 857059
	struct						/* Query input is a GID list  */
Packit 857059
	{
Packit 857059
		uint8 SourceGidCount;	/* number of Source GIDs in GidList */
Packit 857059
		uint8 DestGidCount;		/* number of Dest GIDs in GidList */
Packit 857059
		IB_GID GidList[MULTIPATH_GID_LIMIT];/* Src GIDs, followed by Dest GIDs */
Packit 857059
	} GidList;
Packit 857059
Packit 857059
	STL_LID Lid;				/* Query input is a 32-bit LID */
Packit 857059
	uint16 PKey;				/* Query input is a pkey */
Packit 857059
	uint8  SL;					/* Query input is a SL */
Packit 857059
	uint16 vfIndex;				/* Query input is a vf index */
Packit 857059
	uint64 ServiceId;			/* Query input is a ServiceID */
Packit 857059
	struct
Packit 857059
	{
Packit 857059
		uint64 ComponentMask;
Packit 857059
		IB_PATH_RECORD PathRecord;
Packit 857059
	} PathRecordValue;
Packit 857059
	struct
Packit 857059
	{
Packit 857059
		uint64 ComponentMask;
Packit 857059
		IB_MULTIPATH_RECORD MultiPathRecord;
Packit 857059
		/* Gids below allows up to 8 SGID and/or DGID in MultiPathRecord.GIDList */
Packit 857059
		/* do not use Gids field directly, instead use */
Packit 857059
		/* MultiPathRecord.GIDList[0-7] */
Packit 857059
		IB_GID Gids[MULTIPATH_GID_LIMIT-1];
Packit 857059
	} MultiPathRecordValue;
Packit 857059
	struct
Packit 857059
	{
Packit 857059
		uint32 NameLength;	/* actual characters, no \0 terminator */
Packit 857059
		uint8 Name[NODE_DESCRIPTION_ARRAY_SIZE];	/* not \0 terminated */
Packit 857059
	} NodeDesc;
Packit 857059
	struct
Packit 857059
	{
Packit 857059
		uint64 ComponentMask;
Packit 857059
		IB_SERVICE_RECORD ServiceRecord;
Packit 857059
	} ServiceRecordValue;		/* Use InputTypeServiceRecord */
Packit 857059
	struct
Packit 857059
	{
Packit 857059
		uint64 ComponentMask;
Packit 857059
		IB_MCMEMBER_RECORD McMemberRecord;
Packit 857059
	} McMemberRecordValue;		/* Use InputTypeMcMemberRecord */
Packit 857059
	struct
Packit 857059
	{
Packit 857059
		uint32 NameLength;
Packit 857059
		char   Name[MAX_DG_NAME];
Packit 857059
	} DeviceGroup;
Packit 857059
} QUERY_INPUT_VALUE, *PQUERY_INPUT_VALUE;
Packit 857059
Packit 857059
/* description of a query for QueryFabricInformation */
Packit 857059
typedef struct _QUERY  {
Packit 857059
    QUERY_INPUT_TYPE InputType;     /* Type of input (i.e. query based on) */
Packit 857059
    QUERY_RESULT_TYPE OutputType;   /* Type of output (i.e. info requested) */
Packit 857059
    QUERY_INPUT_VALUE InputValue;   /* input record selection value input query */
Packit 857059
} QUERY, *PQUERY;
Packit 857059
Packit 857059
/* value returned from a query
Packit 857059
 * Status is primary status
Packit 857059
 * When status is FERROR, MadStatus indicates 16 Status and 16 bit
Packit 857059
 * Reserved fields from MAD response (see MAD_COMMON.u.NS in ib_mad.h)
Packit 857059
 * Status is in least significant 16 bits, Reserved in upper 16 bits
Packit 857059
 */
Packit 857059
typedef struct _QUERY_RESULT_VALUES  {
Packit 857059
    FSTATUS Status;			/* overall result of query */
Packit 857059
    uint32	MadStatus;		/* for FSUCCESS or FERROR Status: */
Packit 857059
							/* manager's Mad Status code from response */
Packit 857059
    uint32  ResultDataSize;	/* number of bytes in QueryResult */
Packit 857059
	uint32	reserved;		/* to force 64 bit alignment of QueryResult */
Packit 857059
    uint8   QueryResult[1];	/* one of the RESULTS types below as selected by */
Packit 857059
							/* OutputType in query */
Packit 857059
} QUERY_RESULT_VALUES, *PQUERY_RESULT_VALUES;
Packit 857059
Packit 857059
Packit 857059
/* convert SD MadStatus (uint32 reported by SD) to a string
Packit 857059
 * The string will only contain the message corresponding to the defined values
Packit 857059
 * to be safe, callers should also display the hex value in the event a
Packit 857059
 * reserved or undefined value is returned by the manager
Packit 857059
 */
Packit 857059
IBA_API const char* iba_sd_mad_status_msg(uint32 code);
Packit 857059
Packit 857059
/* --------------------------------------------------------------------------
Packit 857059
 * Structures for Result types for QueryFabricInformation
Packit 857059
 * OutputType in query selects which record format will be returned
Packit 857059
 * in QueryResult
Packit 857059
 */
Packit 857059
Packit 857059
typedef struct _GUID_RESULTS  {
Packit 857059
    uint32 NumGuids;                /* Number of GUIDs returned */
Packit 857059
	EUI64 Guids[1];                 /* Start of the list of GUIDs returned */
Packit 857059
} GUID_RESULTS, *PGUID_RESULTS;
Packit 857059
Packit 857059
typedef struct _LID_RESULTS  {
Packit 857059
    uint32 NumLids;                 /* Number of LIDs returned */
Packit 857059
    IB_LID Lids[1];                 /* list of LIDs returned */
Packit 857059
} LID_RESULTS, *PLID_RESULTS;
Packit 857059
Packit 857059
typedef struct _GID_RESULTS  {
Packit 857059
    uint32 NumGids;                 /* Number of GIDs returned */
Packit 857059
	IB_GID Gids[1];                 /* list of GIDs returned */
Packit 857059
} GID_RESULTS, *PGID_RESULTS;
Packit 857059
Packit 857059
typedef struct _PATH_RESULTS  {
Packit 857059
    uint32 			NumPathRecords;  /* Number of PathRecords returned */
Packit 857059
	IB_PATH_RECORD 	PathRecords[1];   /* list of path records returned */
Packit 857059
} PATH_RESULTS, *PPATH_RESULTS;
Packit 857059
Packit 857059
typedef struct _NODE_RECORD_RESULTS  {
Packit 857059
    uint32 				NumNodeRecords;     /* Number of NodeRecords returned */
Packit 857059
    IB_NODE_RECORD 		NodeRecords[1];		/* list of Node records returned */
Packit 857059
} NODE_RECORD_RESULTS, *PNODE_RECORD_RESULTS;
Packit 857059
Packit 857059
typedef struct _PORTINFO_RECORD_RESULTS  {
Packit 857059
    uint32 				NumPortInfoRecords;	/* Number of PortInfoRecords returned */
Packit 857059
    IB_PORTINFO_RECORD 	PortInfoRecords[1];  /* list of PortInfo records returned */
Packit 857059
} PORTINFO_RECORD_RESULTS, *PPORTINFO_RECORD_RESULTS;
Packit 857059
Packit 857059
typedef struct _NODEDESC_RESULTS {
Packit 857059
    uint32 			 NumDescs;               /* Number of NodeDescs returned */
Packit 857059
	NODE_DESCRIPTION NodeDescs[1];			/* NodeDesc, not \0 terminated */
Packit 857059
} NODEDESC_RESULTS, *PNODEDESC_RESULTS;
Packit 857059
Packit 857059
typedef struct _SERVICE_RECORD_RESULTS  {
Packit 857059
    uint32              NumServiceRecords;	/* Number of records returned */
Packit 857059
    IB_SERVICE_RECORD   ServiceRecords[1];	/* list of records returned */
Packit 857059
} SERVICE_RECORD_RESULTS, *PSERVICE_RECORD_RESULTS;
Packit 857059
Packit 857059
typedef struct _MCMEMBER_RECORD_RESULTS  {
Packit 857059
    uint32              NumMcMemberRecords;	/* Number of records returned */
Packit 857059
    IB_MCMEMBER_RECORD  McMemberRecords[1];	/* list of records returned */
Packit 857059
} MCMEMBER_RECORD_RESULTS, *PMCMEMBER_RECORD_RESULTS;
Packit 857059
Packit 857059
typedef struct _INFORM_INFO_RECORD_RESULTS  {
Packit 857059
    uint32              NumInformInfoRecords;	/* Number of records returned */
Packit 857059
    IB_INFORM_INFO_RECORD  InformInfoRecords[1];/* list of records returned */
Packit 857059
} INFORM_INFO_RECORD_RESULTS, *PINFORM_INFO_RECORD_RESULTS;
Packit 857059
Packit 857059
typedef struct _IB_CLASS_PORT_INFO_RESULTS  {
Packit 857059
    uint32 			    NumClassPortInfo;   /* Number of records returned */
Packit 857059
	IB_CLASS_PORT_INFO	ClassPortInfo[1];   /* list of records returned */
Packit 857059
} IB_CLASS_PORT_INFO_RESULTS, *PIB_CLASS_PORT_INFO_RESULTS;
Packit 857059
Packit 857059
/* ===========================================================================
Packit 857059
 * FabricOperation
Packit 857059
 * Data structures used to manage records in the SA/SM via Set or Delete
Packit 857059
 * for a fabric operation a single record is provided in conjunction with
Packit 857059
 * an operation to perform.  In response a single record is returned.
Packit 857059
 * For some Set operations the SA may augment or modify the original record
Packit 857059
 * provided in which case the returned record is interesting.
Packit 857059
 * However for delete operations the record is generally uninteresting.
Packit 857059
 */
Packit 857059
Packit 857059
/* FabricOperations Supported:
Packit 857059
 *
Packit 857059
 * OperationType		Operation performed
Packit 857059
 * -------------        -------------------
Packit 857059
 * SetServiceRecord		SA Set ServiceRecord with service record given
Packit 857059
 * 						creates a service record to register this node/port
Packit 857059
 * 						as providing the given service
Packit 857059
 *
Packit 857059
 * DeleteServiceRecord	SA Delete ServiceRecord with service record given
Packit 857059
 * 						deletes a service record to indicate this node/port
Packit 857059
 * 						no longer provides the given service
Packit 857059
 *
Packit 857059
 * SetMcMemberRecord	SA Set McMemberRecord with McMemberRecord given
Packit 857059
 * 						creates and/or joins a multicast group
Packit 857059
 *
Packit 857059
 * JoinMcGroup			SA Set McMemberRecord with MGID and JoinState given
Packit 857059
 * 						joins an existing multicast group
Packit 857059
 *						input is McJoinLeave, output is McMemberRecord
Packit 857059
 *
Packit 857059
 * LeaveMcGroup			SA Delete McMemberRecord with MGID and JoinState given
Packit 857059
 * 						Leave an existing multicast group
Packit 857059
 *						input is McJoinLeave, output is McMemberRecord
Packit 857059
 *
Packit 857059
 * DeleteMcMemberRecord	SA Delete McMemberRecord with McMemberRecord given
Packit 857059
 * 						leaves and/or deletes a multicast group
Packit 857059
 *
Packit 857059
 * SetInfomInfo			SA Set InformInfo with InformInfo given
Packit 857059
 * 						Subscribe for Traps/Notices to be sent to this port
Packit 857059
 */
Packit 857059
Packit 857059
/* Fabric Operation to perform */
Packit 857059
typedef enum  _FABRIC_OPERATION_TYPE
Packit 857059
{
Packit 857059
	/* SA operations */
Packit 857059
	FabOpSetServiceRecord =0,		/* Set a service record */
Packit 857059
	FabOpDeleteServiceRecord,		/* Delete a service record */
Packit 857059
	FabOpSetMcMemberRecord,			/* Set a Multicast Member record */
Packit 857059
	FabOpJoinMcGroup,				/* Join a Multicast Group */
Packit 857059
	FabOpLeaveMcGroup,				/* Leave a Multicast Group */
Packit 857059
	FabOpDeleteMcMemberRecord,		/* Delete a Multicast Member record */
Packit 857059
	FabOpSetInformInfo,				/* Set InformInfo to register for notices */
Packit 857059
} FABRIC_OPERATION_TYPE;
Packit 857059
Packit 857059
/* convert FABRIC_OPERATION_TYPE to a string */
Packit 857059
IBA_API const char* iba_sd_fabric_op_type_msg(FABRIC_OPERATION_TYPE code);
Packit 857059
Packit 857059
/* value for a FabricOperation, used as input and output */
Packit 857059
typedef	union	_FABRIC_OPERATION_VALUE
Packit 857059
{
Packit 857059
	/* Data for SA operations */
Packit 857059
	struct
Packit 857059
	{
Packit 857059
		uint64 ComponentMask;	/* input only, only for DeleteServiceRecord */
Packit 857059
		IB_SERVICE_RECORD ServiceRecord;
Packit 857059
	} ServiceRecordValue;
Packit 857059
	struct
Packit 857059
	{
Packit 857059
		uint64 ComponentMask;	/* input only */
Packit 857059
		IB_MCMEMBER_RECORD McMemberRecord;
Packit 857059
	} McMemberRecordValue;
Packit 857059
	struct {
Packit 857059
		IB_GID	MGID;
Packit 857059
		uint8	JoinFullMember:1;
Packit 857059
		uint8	JoinNonMember:1;
Packit 857059
		uint8	JoinSendOnlyMember:1;
Packit 857059
		uint8	Reserved:5;
Packit 857059
	} McJoinLeave;
Packit 857059
	IB_INFORM_INFO				InformInfo;
Packit 857059
} FABRIC_OPERATION_VALUE;
Packit 857059
Packit 857059
/* Data for a FabricOperation, also returned as result */
Packit 857059
typedef	struct	_FABRIC_OPERATION_DATA
Packit 857059
{
Packit 857059
	FABRIC_OPERATION_TYPE	Type;
Packit 857059
	FABRIC_OPERATION_VALUE	Value;
Packit 857059
} FABRIC_OPERATION_DATA, *PFABRIC_OPERATION_DATA;
Packit 857059
Packit 857059
/* ===========================================================================
Packit 857059
 * common (kernel/user) mode function interface
Packit 857059
 */
Packit 857059
Packit 857059
/* Register as a client with the Subnet Data Interface
Packit 857059
 * handle is returned which must be used in all subsequent calls on behalf
Packit 857059
 * of this registration
Packit 857059
 * pass a NULL to use default ClientParameters
Packit 857059
 * this does not preempt
Packit 857059
 * data pointed to only used during duration of call
Packit 857059
 */
Packit 857059
typedef  FSTATUS
Packit 857059
		(SD_REGISTER)(
Packit 857059
		 IN OUT CLIENT_HANDLE				*ClientHandle,
Packit 857059
   IN PCLIENT_CONTROL_PARAMETERS		pClientParameters OPTIONAL
Packit 857059
					 );
Packit 857059
IBA_API SD_REGISTER iba_sd_register;
Packit 857059
Packit 857059
/* DeRegister as a client with the Subnet Data Interface
Packit 857059
 * this does not preempt
Packit 857059
 */
Packit 857059
typedef  FSTATUS
Packit 857059
		(SD_DEREGISTER)(
Packit 857059
		 IN CLIENT_HANDLE					ClientHandle
Packit 857059
					   );
Packit 857059
IBA_API SD_DEREGISTER iba_sd_deregister;
Packit 857059
Packit 857059
/* get present parameters to control queries/operations by client
Packit 857059
 * this does not preempt
Packit 857059
 * data pointed to only used during duration of call
Packit 857059
 */
Packit 857059
typedef FSTATUS
Packit 857059
		(SD_GET_CLIENT_CONTROL_PARAMETERS)(
Packit 857059
		 IN CLIENT_HANDLE					ClientHandle,
Packit 857059
   IN OUT PCLIENT_CONTROL_PARAMETERS	pClientControlParameters
Packit 857059
										  );
Packit 857059
IBA_API SD_GET_CLIENT_CONTROL_PARAMETERS iba_sd_get_client_control_parameters;
Packit 857059
Packit 857059
/* set parameters to control queries/operations by client
Packit 857059
 * this does not preempt
Packit 857059
 * data pointed to only used during duration of call
Packit 857059
 */
Packit 857059
typedef FSTATUS
Packit 857059
		(SD_SET_CLIENT_CONTROL_PARAMETERS)(
Packit 857059
		 IN CLIENT_HANDLE					ClientHandle,
Packit 857059
   IN PCLIENT_CONTROL_PARAMETERS		pClientControlParameters
Packit 857059
										  );
Packit 857059
IBA_API SD_SET_CLIENT_CONTROL_PARAMETERS iba_sd_set_client_control_parameters;
Packit 857059
Packit 857059
/* Callback made when a Report Request is received
Packit 857059
 * this callback occurs in a thread context, however it should not preempt
Packit 857059
 * for long durations
Packit 857059
 * data pointed to only valid during duration of call
Packit 857059
 */
Packit 857059
typedef
Packit 857059
		void (SD_REPORT_NOTICE_CALLBACK)(
Packit 857059
			  IN void   *pContext, /* as supplied at subscription time */
Packit 857059
	 IN IB_NOTICE *pNotice,  /* IB_NOTICE record returned in the Report Request */
Packit 857059
  IN EUI64   PortGuid  /* Port Guid from which Report Request was received */
Packit 857059
										);
Packit 857059
typedef SD_REPORT_NOTICE_CALLBACK *PREPORT_NOTICE_CALLBACK;/* deprecated */
Packit 857059
Packit 857059
/* Callback made in kernel mode when a multicast group's state changes
Packit 857059
 * this callback occurs in a thread context, however it should not preempt
Packit 857059
 * for long durations
Packit 857059
 * data pointed to only valid during duration of call
Packit 857059
 *
Packit 857059
 * There are three basic combinations of callback:
Packit 857059
 * State                        Status       pMcMemberRecord
Packit 857059
 * MC_GROUP_STATE_JOIN_FAILED   failure code Only fields from request are valid
Packit 857059
 * MC_GROUP_STATE_AVAILABLE     FSUCCESS     All fields valid, response from SA
Packit 857059
 * MC_GROUP_STATE_UNAVAILABLE   N/A          Only fields from request are valid
Packit 857059
 */
Packit 857059
typedef 
Packit 857059
		void (SD_MULTICAST_CALLBACK)(
Packit 857059
			  IN void               *pContext,       /* as supplied at group join time */
Packit 857059
	 IN FSTATUS            Status,          /* reason code */
Packit 857059
  IN MC_GROUP_STATE     State,           /* current state of multicast group */
Packit 857059
  IN IB_MCMEMBER_RECORD *pMcMemberRecord /* current member record settings */
Packit 857059
									);
Packit 857059
typedef SD_MULTICAST_CALLBACK *PMULTICAST_CALLBACK;/* deprecated */
Packit 857059
Packit 857059
#ifdef __cplusplus
Packit 857059
};
Packit 857059
#endif
Packit 857059
Packit 857059
#endif  /* _IBA_IB_SD_H_ */