1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License (the "License").
6  * You may not use this file except in compliance with the License.
7  *
8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9  * or http://www.opensolaris.org/os/licensing.
10  * See the License for the specific language governing permissions
11  * and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL HEADER in each
14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15  * If applicable, add the following below this CDDL HEADER, with the
16  * fields enclosed by brackets "[]" replaced with your own identifying
17  * information: Portions Copyright [yyyy] [name of copyright owner]
18  *
19  * CDDL HEADER END
20  */
21 
22 /*
23  * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
24  */
25 
26 /*
27  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
28  * Use is subject to license terms.
29  */
30 
31 /*
32  *
33  * HEADER: dapl_ia_util.h
34  *
35  * PURPOSE: Utility defs & routines for the IA data structure
36  *
37  * $Id: dapl_ia_util.h,v 1.9 2003/07/25 19:24:11 sjs2 Exp $
38  */
39 
40 #ifndef _DAPL_IA_UTIL_H_
41 #define	_DAPL_IA_UTIL_H_
42 
43 #ifdef __cplusplus
44 extern "C" {
45 #endif
46 
47 #include "dapl.h"
48 
49 DAPL_IA *
50 dapl_ia_alloc(
51 	DAT_PROVIDER	*provider,
52 	DAPL_HCA	*hca_ptr);
53 
54 DAT_RETURN
55 dapl_ia_abrupt_close(
56 	IN DAPL_IA 	*ia_ptr);
57 
58 DAT_RETURN
59 dapl_ia_graceful_close(
60 	IN DAPL_IA 	*ia_ptr);
61 
62 void
63 dapls_ia_free(DAPL_IA *ia_ptr);
64 
65 void
66 dapl_ia_link_ep(
67 	IN DAPL_IA 	*ia_ptr,
68 	IN DAPL_EP	*ep_info);
69 
70 void
71 dapl_ia_unlink_ep(
72 	IN DAPL_IA 	*ia_ptr,
73 	IN DAPL_EP	*ep_info);
74 
75 void
76 dapl_ia_link_lmr(
77 	IN DAPL_IA 	*ia_ptr,
78 	IN DAPL_LMR	*lmr_info);
79 
80 void
81 dapl_ia_unlink_lmr(
82 	IN DAPL_IA 	*ia_ptr,
83 	IN DAPL_LMR	*lmr_info);
84 
85 void
86 dapl_ia_link_rmr(
87 	IN DAPL_IA 	*ia_ptr,
88 	IN DAPL_RMR	*rmr_info);
89 
90 void
91 dapl_ia_unlink_rmr(
92 	IN DAPL_IA 	*ia_ptr,
93 	IN DAPL_RMR	*rmr_info);
94 
95 void
96 dapl_ia_link_pz(
97 	IN DAPL_IA 	*ia_ptr,
98 	IN DAPL_PZ	*pz_info);
99 
100 void
101 dapl_ia_unlink_pz(
102 	IN DAPL_IA 	*ia_ptr,
103 	IN DAPL_PZ	*pz_info);
104 
105 void
106 dapl_ia_link_evd(
107 	IN DAPL_IA 	*ia_ptr,
108 	IN DAPL_EVD	*evd_info);
109 
110 void
111 dapl_ia_unlink_evd(
112 	IN DAPL_IA 	*ia_ptr,
113 	IN DAPL_EVD	*evd_info);
114 
115 void
116 dapl_ia_link_cno(
117 	IN DAPL_IA 	*ia_ptr,
118 	IN DAPL_CNO	*cno_info);
119 
120 void
121 dapl_ia_unlink_cno(
122 	IN DAPL_IA 	*ia_ptr,
123 	IN DAPL_CNO	*cno_info);
124 
125 void
126 dapl_ia_link_psp(
127 	IN DAPL_IA 	*ia_ptr,
128 	IN DAPL_SP	*sp_info);
129 
130 void
131 dapls_ia_unlink_sp(
132 	IN DAPL_IA 	*ia_ptr,
133 	IN DAPL_SP	*sp_info);
134 
135 void
136 dapl_ia_link_rsp(
137 	IN DAPL_IA 	*ia_ptr,
138 	IN DAPL_SP	*sp_info);
139 
140 
141 DAPL_SP *
142 dapls_ia_sp_search(
143 	IN	DAPL_IA		   *ia_ptr,
144 	IN	DAT_CONN_QUAL	   conn_qual,
145 	IN	DAT_BOOLEAN	   is_psp);
146 
147 void
148 dapl_ia_link_srq(
149 	IN DAPL_IA 	*ia_ptr,
150 	IN DAPL_SRQ	*srq_info);
151 
152 void
153 dapl_ia_unlink_srq(
154 	IN DAPL_IA 	*ia_ptr,
155 	IN DAPL_SRQ	*srq_info);
156 
157 DAT_RETURN
158 dapls_ia_setup_callbacks(
159     IN	DAPL_IA		*ia_ptr,
160     IN	DAPL_EVD	*async_evd_ptr);
161 
162 DAT_RETURN
163 dapls_ia_teardown_callbacks(
164     IN	DAPL_IA		*ia_ptr);
165 
166 #ifdef __cplusplus
167 }
168 #endif
169 
170 #endif /* _DAPL_IA_UTIL_H_ */
171