4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
23 * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
27 #pragma ident "%Z%%M% %I% %E% SMI"
32 * This file contains Transport API functions that implement the
33 * verbs related to Multicast Groups. These are only applicable
37 #include <sys/ib/ibtl/impl/ibtl.h>
39 static char ibtl_mcg
[] = "ibtl_mcg";
45 * ud_chan A channel handle returned from ibt_alloc_ud_channel().
46 * This is the UD channel handle, that is to be used to
47 * receive data sent to the multicast group.
49 * mcg_info A pointer to an ibt_mcg_info_t struct returned from an
50 * ibt_join_mcg() or ibt_query_mcg() call, that identifies
51 * the multicast group to attach this channel to.
55 * IBT_CHAN_SRV_TYPE_INVALID
56 * Return value as of ibc_attach_mcg() call.
58 * Attaches a UD channel to the specified multicast group.
61 ibt_attach_mcg(ibt_channel_hdl_t ud_chan
, ibt_mcg_info_t
*mcg_info
)
63 IBTF_DPRINTF_L3(ibtl_mcg
, "ibt_attach_mcg(%p, %p)", ud_chan
, mcg_info
);
65 /* re-direct the call to CI's call */
66 return (IBTL_CHAN2CIHCAOPS_P(ud_chan
)->ibc_attach_mcg(
67 IBTL_CHAN2CIHCA(ud_chan
), ud_chan
->ch_qp
.qp_ibc_qp_hdl
,
68 mcg_info
->mc_adds_vect
.av_dgid
, mcg_info
->mc_adds_vect
.av_dlid
));
76 * ud_chan A channel handle returned from ibt_alloc_ud_channel().
77 * This is the UD channel handle, that is to be used to
78 * receive data sent to the multicast group.
80 * mcg_info A pointer to an ibt_mcg_info_t struct returned from an
81 * ibt_join_mcg() or ibt_query_mcg() call, that identifies
82 * the multicast group to detach this channel from.
86 * IBT_CHAN_SRV_TYPE_INVALID
87 * Return value as of ibc_detach_mcg() call.
89 * Detach the specified UD channel from the specified multicast group.
92 ibt_detach_mcg(ibt_channel_hdl_t ud_chan
, ibt_mcg_info_t
*mcg_info
)
94 IBTF_DPRINTF_L3(ibtl_mcg
, "ibt_detach_mcg(%p, %p", ud_chan
, mcg_info
);
96 /* re-direct the call to CI's call */
97 return (IBTL_CHAN2CIHCAOPS_P(ud_chan
)->ibc_detach_mcg(
98 IBTL_CHAN2CIHCA(ud_chan
), ud_chan
->ch_qp
.qp_ibc_qp_hdl
,
99 mcg_info
->mc_adds_vect
.av_dgid
, mcg_info
->mc_adds_vect
.av_dlid
));