]> git.sur5r.net Git - openldap/blob - servers/slapd/back-dnssrv/init.c
first step towards removing back-*/external.h
[openldap] / servers / slapd / back-dnssrv / init.c
1 /* init.c - initialize ldap backend */
2 /* $OpenLDAP$ */
3 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
4  *
5  * Copyright 2000-2004 The OpenLDAP Foundation.
6  * Portions Copyright 2000-2003 Kurt D. Zeilenga.
7  * All rights reserved.
8  *
9  * Redistribution and use in source and binary forms, with or without
10  * modification, are permitted only as authorized by the OpenLDAP
11  * Public License.
12  *
13  * A copy of this license is available in the file LICENSE in the
14  * top-level directory of the distribution or, alternatively, at
15  * <http://www.OpenLDAP.org/license.html>.
16  */
17 /* ACKNOWLEDGEMENTS:
18  * This work was originally developed by Kurt D. Zeilenga for inclusion
19  * in OpenLDAP Software.
20  */
21
22 #include "portable.h"
23
24 #include <stdio.h>
25
26 #include <ac/socket.h>
27
28 #include "slap.h"
29 #include "proto-dnssrv.h"
30 #include "external.h"
31
32 int
33 dnssrv_back_initialize(
34     BackendInfo *bi )
35 {
36         static char *controls[] = {
37                 LDAP_CONTROL_MANAGEDSAIT,
38                 LDAP_CONTROL_VALUESRETURNFILTER,
39                 NULL
40         };
41
42         bi->bi_controls = controls;
43
44         bi->bi_open = 0;
45         bi->bi_config = 0;
46         bi->bi_close = 0;
47         bi->bi_destroy = 0;
48
49         bi->bi_db_init = 0;
50         bi->bi_db_destroy = 0;
51         bi->bi_db_config = dnssrv_back_db_config;
52         bi->bi_db_open = 0;
53         bi->bi_db_close = 0;
54
55         bi->bi_chk_referrals = dnssrv_back_referrals;
56
57         bi->bi_op_bind = dnssrv_back_bind;
58         bi->bi_op_search = dnssrv_back_search;
59         bi->bi_op_compare = 0 /* dnssrv_back_compare */;
60         bi->bi_op_modify = 0;
61         bi->bi_op_modrdn = 0;
62         bi->bi_op_add = 0;
63         bi->bi_op_delete = 0;
64         bi->bi_op_abandon = 0;
65         bi->bi_op_unbind = 0;
66
67         bi->bi_extended = 0;
68
69         bi->bi_connection_init = 0;
70         bi->bi_connection_destroy = 0;
71
72         return 0;
73 }
74
75 int
76 dnssrv_back_db_init(
77     Backend     *be )
78 {
79         return 0;
80 }
81
82 int
83 dnssrv_back_db_destroy(
84     Backend     *be )
85 {
86         return 0;
87 }
88
89 #if SLAPD_DNSSRV == SLAPD_MOD_DYNAMIC
90
91 int
92 init_module( int argc, char *argv[] )
93 {
94         BackendInfo bi;
95
96         memset( &bi, '\0', sizeof( bi ) );
97         bi.bi_type = "dnssrv";
98         bi.bi_init = dnssrv_back_initialize;
99
100         backend_add( &bi );
101
102         return 0;
103 }
104
105 #endif /* SLAPD_DNSSRV */
106