2 * Copyright (c) 2004-2007 Voltaire, Inc. All rights reserved.
3 * Copyright (c) 2002-2005 Mellanox Technologies LTD. All rights reserved.
4 * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
6 * This software is available to you under a choice of one of two
7 * licenses. You may choose to be licensed under the terms of the GNU
8 * General Public License (GPL) Version 2, available from the file
9 * COPYING in the main directory of this source tree, or the
10 * OpenIB.org BSD license below:
12 * Redistribution and use in source and binary forms, with or
13 * without modification, are permitted provided that the following
16 * - Redistributions of source code must retain the above
17 * copyright notice, this list of conditions and the following
20 * - Redistributions in binary form must reproduce the above
21 * copyright notice, this list of conditions and the following
22 * disclaimer in the documentation and/or other materials
23 * provided with the distribution.
25 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
26 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
28 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
29 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
30 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
31 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
38 * Declaration of osm_mcm_port_t.
39 * This object represents the membership of a port in a multicast group.
40 * This object is part of the OpenSM family of objects.
43 #ifndef _OSM_MCM_PORT_H_
44 #define _OSM_MCM_PORT_H_
46 #include <iba/ib_types.h>
47 #include <complib/cl_qmap.h>
48 #include <opensm/osm_base.h>
51 # define BEGIN_C_DECLS extern "C" {
52 # define END_C_DECLS }
53 #else /* !__cplusplus */
54 # define BEGIN_C_DECLS
56 #endif /* __cplusplus */
59 /****s* OpenSM: MCM Port Object/osm_mcm_port_t
64 * This object represents a particular port as a member of a
67 * This object should be treated as opaque and should
68 * be manipulated only through the provided functions.
72 typedef struct osm_mcm_port {
73 cl_map_item_t map_item;
81 * Map Item for qmap linkage. Must be first element!!
84 * GID of the member port.
90 * If FALSE - Join was performed by the endport identified
91 * by PortGID. If TRUE - Join was performed on behalf of
92 * the endport identified by PortGID by another port within
99 /****f* OpenSM: MCM Port Object/osm_mcm_port_new
104 * The osm_mcm_port_new function allocates and initializes a
105 * MCM Port Object for use.
109 osm_mcm_port_t *osm_mcm_port_new(IN const ib_gid_t * const p_port_gid,
110 IN const uint8_t scope_state,
111 IN const boolean_t proxy_join);
115 * [in] Pointer to the GID of the port to add to the multicast group.
118 * [in] scope state of the join request
121 * [in] proxy_join state analyzed from the request
124 * Pointer to the allocated and initialized MCM Port object.
129 * MCM Port Object, osm_mcm_port_delete,
132 /****f* OpenSM: MCM Port Object/osm_mcm_port_delete
134 * osm_mcm_port_delete
137 * The osm_mcm_port_delete function destroys and dellallocates an
138 * MCM Port Object, releasing all resources.
142 void osm_mcm_port_delete(IN osm_mcm_port_t * const p_mcm);
146 * [in] Pointer to a MCM Port Object to delete.
149 * This function does not return a value.
154 * MCM Port Object, osm_mcm_port_new
158 #endif /* _OSM_MCM_PORT_H_ */