xref: /titanic_41/usr/src/lib/udapl/libdat/include/dat_dr.h (revision 657a8c206b913d1ee578fd725f0b25eca5b77253)
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 #pragma ident	"%Z%%M%	%I%	%E% SMI"
44 
45 #include <dat/udat.h>
46 #include <dat/dat_registry.h>
47 
48 #include <dat_osd.h>
49 
50 #ifdef	__cplusplus
51 extern "C" {
52 #endif
53 
54 /*
55  *
56  * Strucutres
57  *
58  */
59 
60 typedef struct
61 {
62     DAT_COUNT 			ref_count;
63     DAT_IA_OPEN_FUNC 		ia_open_func;
64     DAT_PROVIDER_INFO 		info;
65 } DAT_DR_ENTRY;
66 
67 
68 /*
69  *
70  * Function Declarations
71  *
72  */
73 
74 extern DAT_RETURN
75 dat_dr_init(void);
76 
77 extern DAT_RETURN
78 dat_dr_fini(void);
79 
80 extern DAT_RETURN
81 dat_dr_insert(
82     IN  const DAT_PROVIDER_INFO *info,
83     IN  DAT_DR_ENTRY 		*entry);
84 
85 extern DAT_RETURN
86 dat_dr_remove(
87     IN  const DAT_PROVIDER_INFO *info);
88 
89 
90 extern DAT_RETURN
91 dat_dr_provider_open(
92     IN  const DAT_PROVIDER_INFO *info,
93     OUT DAT_IA_OPEN_FUNC	*p_ia_open_func);
94 
95 extern DAT_RETURN
96 dat_dr_provider_close(
97     IN  const DAT_PROVIDER_INFO *info);
98 
99 extern DAT_RETURN
100 dat_dr_size(
101     OUT	DAT_COUNT		*size);
102 
103 extern DAT_RETURN
104 dat_dr_list(
105     IN	DAT_COUNT		max_to_return,
106     OUT	DAT_COUNT		*entries_returned,
107     OUT	DAT_PROVIDER_INFO	* (dat_provider_list[]));
108 
109 #ifdef	__cplusplus
110 }
111 #endif
112 
113 #endif /* __DAT_DR_H__ */
114