11545703d8cf3bc45aea1bd310f60f8a7dcd8a3f
[ddiss/samba.git] / source3 / winbindd / winbindd_locator.c
1 /*
2    Unix SMB/CIFS implementation.
3
4    Winbind daemon - miscellaneous other functions
5
6    Copyright (C) Tim Potter      2000
7    Copyright (C) Andrew Bartlett 2002
8
9    This program is free software; you can redistribute it and/or modify
10    it under the terms of the GNU General Public License as published by
11    the Free Software Foundation; either version 3 of the License, or
12    (at your option) any later version.
13
14    This program is distributed in the hope that it will be useful,
15    but WITHOUT ANY WARRANTY; without even the implied warranty of
16    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17    GNU General Public License for more details.
18
19    You should have received a copy of the GNU General Public License
20    along with this program.  If not, see <http://www.gnu.org/licenses/>.
21 */
22
23 #include "includes.h"
24 #include "winbindd.h"
25
26 #undef DBGC_CLASS
27 #define DBGC_CLASS DBGC_WINBIND
28
29
30 static struct winbindd_child static_locator_child;
31
32 struct winbindd_child *locator_child(void)
33 {
34         return &static_locator_child;
35 }
36
37 static const struct winbindd_child_dispatch_table locator_dispatch_table[] = {
38         {
39                 .name           = "PING",
40                 .struct_cmd     = WINBINDD_PING,
41                 .type           = WINBINDD_CHILD_DISPATCH_SYNC,
42                 .sync.struct_fn = winbindd_dual_ping,
43         },{
44                 .name           = "NDRCMD",
45                 .struct_cmd     = WINBINDD_DUAL_NDRCMD,
46                 .type           = WINBINDD_CHILD_DISPATCH_SYNC,
47                 .sync.struct_fn = winbindd_dual_ndrcmd,
48         },{
49                 .name           = NULL,
50         }
51 };
52
53 void init_locator_child(void)
54 {
55         setup_child(NULL, &static_locator_child,
56                     locator_dispatch_table,
57                     "log.winbindd", "locator");
58 }