xref: /illumos-gate/usr/src/lib/udapl/libdat/include/dat_sr.h (revision ddb365bfc9e868ad24ccdcb0dc91af18b10df082)
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 2003 Sun Microsystems, Inc.  All rights reserved.
28  * Use is subject to license terms.
29  */
30 
31 /*
32  *
33  * HEADER: dat_sr.h
34  *
35  * PURPOSE: static registry (SR) inteface declarations
36  *
37  * $Id: dat_sr.h,v 1.7 2003/07/31 14:04:19 jlentini Exp $
38  */
39 
40 #ifndef _DAT_SR_H_
41 #define	_DAT_SR_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  * Structures
55  *
56  */
57 
58 typedef struct
59 {
60     DAT_PROVIDER_INFO 		info;
61     char			*lib_path;
62     char  			*ia_params;
63     DAT_OS_LIBRARY_HANDLE 	lib_handle;
64     DAT_PROVIDER_INIT_FUNC 	init_func;
65     DAT_PROVIDER_FINI_FUNC	fini_func;
66     DAT_COUNT 			ref_count;
67 } DAT_SR_ENTRY;
68 
69 
70 /*
71  *
72  * Function Declarations
73  *
74  */
75 
76 extern DAT_RETURN
77 dat_sr_init(void);
78 
79 extern DAT_RETURN
80 dat_sr_fini(void);
81 
82 extern DAT_RETURN
83 dat_sr_insert(
84     IN  const DAT_PROVIDER_INFO *info,
85     IN  DAT_SR_ENTRY 		*entry);
86 
87 extern DAT_RETURN
88 dat_sr_size(
89     OUT	DAT_COUNT		*size);
90 
91 extern DAT_RETURN
92 dat_sr_list(
93     IN  DAT_COUNT		max_to_return,
94     OUT DAT_COUNT		*entries_returned,
95     OUT DAT_PROVIDER_INFO	*(dat_provider_list[]));
96 
97 extern DAT_RETURN
98 dat_sr_provider_open(
99     IN  const DAT_PROVIDER_INFO *info);
100 
101 extern DAT_RETURN
102 dat_sr_provider_close(
103     IN  const DAT_PROVIDER_INFO *info);
104 
105 #ifdef	__cplusplus
106 }
107 #endif
108 
109 #endif	/* _DAT_SR_H_ */
110