dc1b2d18dc276a4f012a721d6a4736fc116f9017
[ddiss/samba.git] / source3 / winbindd / winbindd_idmap.c
1 /*
2    Unix SMB/CIFS implementation.
3
4    Async helpers for blocking functions
5
6    Copyright (C) Volker Lendecke 2005
7    Copyright (C) Gerald Carter 2006
8    Copyright (C) Simo Sorce 2007
9
10    This program is free software; you can redistribute it and/or modify
11    it under the terms of the GNU General Public License as published by
12    the Free Software Foundation; either version 3 of the License, or
13    (at your option) any later version.
14
15    This program is distributed in the hope that it will be useful,
16    but WITHOUT ANY WARRANTY; without even the implied warranty of
17    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18    GNU General Public License for more details.
19
20    You should have received a copy of the GNU General Public License
21    along with this program.  If not, see <http://www.gnu.org/licenses/>.
22 */
23
24 #include "includes.h"
25 #include "winbindd.h"
26
27 #undef DBGC_CLASS
28 #define DBGC_CLASS DBGC_WINBIND
29
30 static struct winbindd_child static_idmap_child;
31
32 struct winbindd_child *idmap_child(void)
33 {
34         return &static_idmap_child;
35 }
36
37 static const struct winbindd_child_dispatch_table idmap_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_ASYNC,
47                 .async.struct_fn_send = winbindd_dual_ndrcmd_send,
48                 .async.struct_fn_recv = winbindd_dual_ndrcmd_recv,
49         },{
50                 .name           = NULL,
51         }
52 };
53
54 void init_idmap_child(void)
55 {
56         setup_child(NULL, &static_idmap_child,
57                     idmap_dispatch_table,
58                     "log.winbindd", "idmap");
59 }