@@ -53,6 +53,7 @@
#include <opensm/osm_mcm_port.h>
#include <opensm/osm_subnet.h>
#include <opensm/osm_log.h>
+#include <opensm/osm_sm.h>
#ifdef __cplusplus
# define BEGIN_C_DECLS extern "C" {
@@ -193,6 +194,38 @@ osm_mgrp_t *osm_mgrp_new(IN osm_subn_t * subn, IN ib_net16_t mlid,
* Multicast Group, osm_mgrp_delete
*********/
+/*
+ * Need a forward declaration to work around include loop:
+ * osm_sm.h <- osm_multicast.h
+ */
+struct osm_sm;
+
+/****f* OpenSM: Multicast Tree/osm_purge_mtree
+* NAME
+* osm_purge_mtree
+*
+* DESCRIPTION
+* Frees all the nodes in a multicast spanning tree
+*
+* SYNOPSIS
+*/
+void osm_purge_mtree(IN struct osm_sm * sm, IN osm_mgrp_box_t * mgb);
+/*
+* PARAMETERS
+* sm
+* [in] Pointer to osm_sm_t object.
+* mgb
+* [in] Pointer to an osm_mgrp_box_t object.
+*
+* RETURN VALUES
+* None.
+*
+*
+* NOTES
+*
+* SEE ALSO
+*********/
+
/****f* OpenSM: Multicast Group/osm_mgrp_is_guid
* NAME
* osm_mgrp_is_guid
@@ -147,7 +147,7 @@ static void mcast_mgr_purge_tree_node(IN osm_mtree_node_t * p_mtn)
free(p_mtn);
}
-static void mcast_mgr_purge_tree(osm_sm_t * sm, IN osm_mgrp_box_t * mbox)
+void osm_purge_mtree(osm_sm_t * sm, IN osm_mgrp_box_t * mbox)
{
OSM_LOG_ENTER(sm->p_log);
@@ -736,7 +736,7 @@ static ib_api_status_t mcast_mgr_build_spanning_tree(osm_sm_t * sm,
on multicast forwarding table information if the user wants to
preserve existing multicast routes.
*/
- mcast_mgr_purge_tree(sm, mbox);
+ osm_purge_mtree(sm, mbox);
/* build the first "subset" containing all member ports */
if (make_port_list(&port_list, mbox)) {