[openib-general] [PATCH] OpenSM/osm_vendor_sa_api.h: Add MCMemberRecord query result support
Hal Rosenstock
halr at voltaire.com
Mon Jul 10 03:07:34 PDT 2006
OpenSM/osm_vendor_sa_api.h: Add MCMemberRecord query result support
Signed-off-by: Hal Rosenstock <halr at voltaire.com>
Index: osm/include/vendor/osm_vendor_sa_api.h
===================================================================
--- osm/include/vendor/osm_vendor_sa_api.h (revision 8462)
+++ osm/include/vendor/osm_vendor_sa_api.h (working copy)
@@ -609,6 +609,47 @@ osmv_get_query_svc_rec(
* osmv_query_res_t, osm_madw_t, osmv_get_query_result, ib_service_record_t
*****/
+/****f* OpenSM Vendor SA Client/osmv_get_query_mc_rec
+* NAME
+* osmv_get_query_mc_rec
+*
+* DESCRIPTION
+* Retrieves a multicast record result from a MAD returned by a call to
+* osmv_query_sa().
+*
+* SYNOPSIS
+*/
+static inline ib_member_rec_t*
+osmv_get_query_mc_rec(
+ IN osm_madw_t *p_result_madw,
+ IN uint32_t result_index )
+{
+ ib_sa_mad_t *p_sa_mad;
+
+ CL_ASSERT( p_result_madw );
+ p_sa_mad = (ib_sa_mad_t*)osm_madw_get_mad_ptr( p_result_madw );
+ CL_ASSERT( p_sa_mad && p_sa_mad->attr_id == IB_MAD_ATTR_MCMEMBER_RECORD );
+
+ return( (ib_member_rec_t*)osmv_get_query_result( p_result_madw,
+ result_index ) );
+}
+/*
+* PARAMETERS
+* p_result_madw
+* [in] This is a reference to the MAD returned as a result of the
+* query.
+*
+* result_index
+* [in] A zero-based index indicating which result to return.
+*
+* NOTES
+* This call returns a pointer to the start of a service record result from
+* a call to osmv_query_sa().
+*
+* SEE ALSO
+* osmv_query_res_t, osm_madw_t, osmv_get_query_result, ib_member_rec_t
+*****/
+
/****f* OpenSM Vendor SA Client/osmv_pfn_query_cb_t
* NAME
* osmv_pfn_query_cb_t
More information about the general
mailing list