xref: /illumos-gate/usr/src/lib/udapl/libdat/include/dat_dr.h (revision 1da57d551424de5a9d469760be7c4b4d4f10a755)
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, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
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.
13  *
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]
19  *
20  * CDDL HEADER END
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: dat_dr.h
34  *
35  * PURPOSE: dynamic registry interface declarations
36  *
37  * $Id: dat_dr.h,v 1.7 2003/07/31 14:04:19 jlentini Exp $
38  */
39 
40 #ifndef __DAT_DR_H__
41 #define	__DAT_DR_H__
42 
43 #include <dat/udat.h>
44 #include <dat/dat_registry.h>
45 
46 #include <dat_osd.h>
47 
48 #ifdef	__cplusplus
49 extern "C" {
50 #endif
51 
52 /*
53  *
54  * Strucutres
55  *
56  */
57 
58 typedef struct
59 {
60     DAT_COUNT 			ref_count;
61     DAT_IA_OPEN_FUNC 		ia_open_func;
62     DAT_PROVIDER_INFO 		info;
63 } DAT_DR_ENTRY;
64 
65 
66 /*
67  *
68  * Function Declarations
69  *
70  */
71 
72 extern DAT_RETURN
73 dat_dr_init(void);
74 
75 extern DAT_RETURN
76 dat_dr_fini(void);
77 
78 extern DAT_RETURN
79 dat_dr_insert(
80     IN  const DAT_PROVIDER_INFO *info,
81     IN  DAT_DR_ENTRY 		*entry);
82 
83 extern DAT_RETURN
84 dat_dr_remove(
85     IN  const DAT_PROVIDER_INFO *info);
86 
87 
88 extern DAT_RETURN
89 dat_dr_provider_open(
90     IN  const DAT_PROVIDER_INFO *info,
91     OUT DAT_IA_OPEN_FUNC	*p_ia_open_func);
92 
93 extern DAT_RETURN
94 dat_dr_provider_close(
95     IN  const DAT_PROVIDER_INFO *info);
96 
97 extern DAT_RETURN
98 dat_dr_size(
99     OUT	DAT_COUNT		*size);
100 
101 extern DAT_RETURN
102 dat_dr_list(
103     IN	DAT_COUNT		max_to_return,
104     OUT	DAT_COUNT		*entries_returned,
105     OUT	DAT_PROVIDER_INFO	* (dat_provider_list[]));
106 
107 #ifdef	__cplusplus
108 }
109 #endif
110 
111 #endif /* __DAT_DR_H__ */
112