git add -f bin/default/librpc/gen_ndr/*.{c,h,ndr,pidl} bin/default/source*/librpc...
[metze/samba/wip.git] / bin / default / librpc / gen_ndr / s3compat_oxidresolver.c
1 #include "includes.h"
2 #include "ntdomain.h"
3 #include "bin/default/librpc/gen_ndr/s3compat_oxidresolver.h"
4
5 struct _s3_compat_ResolveOxid_state {
6         struct tevent_context *ev;
7         struct dcerpc_call_handle *call;
8         struct ResolveOxid *r;
9 };
10
11 static struct tevent_req *_s3_compat_ResolveOxid_send(TALLOC_CTX *mem_ctx,
12                                         struct tevent_context *ev,
13                                         struct dcerpc_call_handle *call,
14                                         struct ResolveOxid *r)
15 {
16         struct tevent_req *req
17         struct _s3_compat_ResolveOxid_state *state;
18         struct pipes_struct *p;
19
20         req = tevent_req_create(mem_ctx, &state,
21                                 struct _s3_compat_ResolveOxid_state);
22         if (req == NULL) {
23                 return NULL;
24         }
25         state->ev = ev;
26         state->call = call;
27         state->r = r;
28
29         p = dcerpc_call_handle_get_pipes_struct(call);
30
31         ZERO_STRUCT(r->out);
32         r->out.ppdsaOxidBindings = talloc_zero(r, struct DUALSTRINGARRAY *);
33         if (tevent_req_nomem(r->out.ppdsaOxidBindings, req)) {
34                 return tevent_req_post(req, ev);
35         }
36
37         r->out.pipidRemUnknown = talloc_zero(r, struct GUID);
38         if (tevent_req_nomem(r->out.pipidRemUnknown, req)) {
39                 return tevent_req_post(req, ev);
40         }
41
42         r->out.pAuthnHint = talloc_zero(r, uint32_t);
43         if (tevent_req_nomem(r->out.pAuthnHint, req)) {
44                 return tevent_req_post(req, ev);
45         }
46
47         r->out.result = _ResolveOxid(p, r);
48
49         if (p->fault_state) {
50                 NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state);
51                 tevent_req_nterror(status);
52                 return tevent_req_post(req, ev);
53         }
54
55         tevent_req_done(req);
56         return tevent_req_post(req, ev);
57 }
58
59 static NTSTATUS _s3_compat_ResolveOxid_recv(struct tevent_req *req)
60 {
61         return tevent_req_simple_recv_ntstatus(req);
62 }
63
64 struct _s3_compat_SimplePing_state {
65         struct tevent_context *ev;
66         struct dcerpc_call_handle *call;
67         struct SimplePing *r;
68 };
69
70 static struct tevent_req *_s3_compat_SimplePing_send(TALLOC_CTX *mem_ctx,
71                                         struct tevent_context *ev,
72                                         struct dcerpc_call_handle *call,
73                                         struct SimplePing *r)
74 {
75         struct tevent_req *req
76         struct _s3_compat_SimplePing_state *state;
77         struct pipes_struct *p;
78
79         req = tevent_req_create(mem_ctx, &state,
80                                 struct _s3_compat_SimplePing_state);
81         if (req == NULL) {
82                 return NULL;
83         }
84         state->ev = ev;
85         state->call = call;
86         state->r = r;
87
88         p = dcerpc_call_handle_get_pipes_struct(call);
89
90         r->out.result = _SimplePing(p, r);
91
92         if (p->fault_state) {
93                 NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state);
94                 tevent_req_nterror(status);
95                 return tevent_req_post(req, ev);
96         }
97
98         tevent_req_done(req);
99         return tevent_req_post(req, ev);
100 }
101
102 static NTSTATUS _s3_compat_SimplePing_recv(struct tevent_req *req)
103 {
104         return tevent_req_simple_recv_ntstatus(req);
105 }
106
107 struct _s3_compat_ComplexPing_state {
108         struct tevent_context *ev;
109         struct dcerpc_call_handle *call;
110         struct ComplexPing *r;
111 };
112
113 static struct tevent_req *_s3_compat_ComplexPing_send(TALLOC_CTX *mem_ctx,
114                                         struct tevent_context *ev,
115                                         struct dcerpc_call_handle *call,
116                                         struct ComplexPing *r)
117 {
118         struct tevent_req *req
119         struct _s3_compat_ComplexPing_state *state;
120         struct pipes_struct *p;
121
122         req = tevent_req_create(mem_ctx, &state,
123                                 struct _s3_compat_ComplexPing_state);
124         if (req == NULL) {
125                 return NULL;
126         }
127         state->ev = ev;
128         state->call = call;
129         state->r = r;
130
131         p = dcerpc_call_handle_get_pipes_struct(call);
132
133         ZERO_STRUCT(r->out);
134         r->out.SetId = r->in.SetId;
135         r->out.PingBackoffFactor = talloc_zero(r, uint16_t);
136         if (tevent_req_nomem(r->out.PingBackoffFactor, req)) {
137                 return tevent_req_post(req, ev);
138         }
139
140         r->out.result = _ComplexPing(p, r);
141
142         if (p->fault_state) {
143                 NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state);
144                 tevent_req_nterror(status);
145                 return tevent_req_post(req, ev);
146         }
147
148         tevent_req_done(req);
149         return tevent_req_post(req, ev);
150 }
151
152 static NTSTATUS _s3_compat_ComplexPing_recv(struct tevent_req *req)
153 {
154         return tevent_req_simple_recv_ntstatus(req);
155 }
156
157 struct _s3_compat_ServerAlive_state {
158         struct tevent_context *ev;
159         struct dcerpc_call_handle *call;
160         struct ServerAlive *r;
161 };
162
163 static struct tevent_req *_s3_compat_ServerAlive_send(TALLOC_CTX *mem_ctx,
164                                         struct tevent_context *ev,
165                                         struct dcerpc_call_handle *call,
166                                         struct ServerAlive *r)
167 {
168         struct tevent_req *req
169         struct _s3_compat_ServerAlive_state *state;
170         struct pipes_struct *p;
171
172         req = tevent_req_create(mem_ctx, &state,
173                                 struct _s3_compat_ServerAlive_state);
174         if (req == NULL) {
175                 return NULL;
176         }
177         state->ev = ev;
178         state->call = call;
179         state->r = r;
180
181         p = dcerpc_call_handle_get_pipes_struct(call);
182
183         r->out.result = _ServerAlive(p, r);
184
185         if (p->fault_state) {
186                 NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state);
187                 tevent_req_nterror(status);
188                 return tevent_req_post(req, ev);
189         }
190
191         tevent_req_done(req);
192         return tevent_req_post(req, ev);
193 }
194
195 static NTSTATUS _s3_compat_ServerAlive_recv(struct tevent_req *req)
196 {
197         return tevent_req_simple_recv_ntstatus(req);
198 }
199
200 struct _s3_compat_ResolveOxid2_state {
201         struct tevent_context *ev;
202         struct dcerpc_call_handle *call;
203         struct ResolveOxid2 *r;
204 };
205
206 static struct tevent_req *_s3_compat_ResolveOxid2_send(TALLOC_CTX *mem_ctx,
207                                         struct tevent_context *ev,
208                                         struct dcerpc_call_handle *call,
209                                         struct ResolveOxid2 *r)
210 {
211         struct tevent_req *req
212         struct _s3_compat_ResolveOxid2_state *state;
213         struct pipes_struct *p;
214
215         req = tevent_req_create(mem_ctx, &state,
216                                 struct _s3_compat_ResolveOxid2_state);
217         if (req == NULL) {
218                 return NULL;
219         }
220         state->ev = ev;
221         state->call = call;
222         state->r = r;
223
224         p = dcerpc_call_handle_get_pipes_struct(call);
225
226         ZERO_STRUCT(r->out);
227         r->out.pdsaOxidBindings = talloc_zero(r, struct DUALSTRINGARRAY *);
228         if (tevent_req_nomem(r->out.pdsaOxidBindings, req)) {
229                 return tevent_req_post(req, ev);
230         }
231
232         r->out.ipidRemUnknown = talloc_zero(r, struct GUID);
233         if (tevent_req_nomem(r->out.ipidRemUnknown, req)) {
234                 return tevent_req_post(req, ev);
235         }
236
237         r->out.AuthnHint = talloc_zero(r, uint32_t);
238         if (tevent_req_nomem(r->out.AuthnHint, req)) {
239                 return tevent_req_post(req, ev);
240         }
241
242         r->out.ComVersion = talloc_zero(r, struct COMVERSION);
243         if (tevent_req_nomem(r->out.ComVersion, req)) {
244                 return tevent_req_post(req, ev);
245         }
246
247         r->out.result = _ResolveOxid2(p, r);
248
249         if (p->fault_state) {
250                 NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state);
251                 tevent_req_nterror(status);
252                 return tevent_req_post(req, ev);
253         }
254
255         tevent_req_done(req);
256         return tevent_req_post(req, ev);
257 }
258
259 static NTSTATUS _s3_compat_ResolveOxid2_recv(struct tevent_req *req)
260 {
261         return tevent_req_simple_recv_ntstatus(req);
262 }
263
264 struct _s3_compat_ServerAlive2_state {
265         struct tevent_context *ev;
266         struct dcerpc_call_handle *call;
267         struct ServerAlive2 *r;
268 };
269
270 static struct tevent_req *_s3_compat_ServerAlive2_send(TALLOC_CTX *mem_ctx,
271                                         struct tevent_context *ev,
272                                         struct dcerpc_call_handle *call,
273                                         struct ServerAlive2 *r)
274 {
275         struct tevent_req *req
276         struct _s3_compat_ServerAlive2_state *state;
277         struct pipes_struct *p;
278
279         req = tevent_req_create(mem_ctx, &state,
280                                 struct _s3_compat_ServerAlive2_state);
281         if (req == NULL) {
282                 return NULL;
283         }
284         state->ev = ev;
285         state->call = call;
286         state->r = r;
287
288         p = dcerpc_call_handle_get_pipes_struct(call);
289
290         ZERO_STRUCT(r->out);
291         r->out.info = talloc_zero(r, struct COMINFO);
292         if (tevent_req_nomem(r->out.info, req)) {
293                 return tevent_req_post(req, ev);
294         }
295
296         r->out.dualstring = talloc_zero(r, struct DUALSTRINGARRAY);
297         if (tevent_req_nomem(r->out.dualstring, req)) {
298                 return tevent_req_post(req, ev);
299         }
300
301         r->out.unknown2 = talloc_zero(r, uint8_t);
302         if (tevent_req_nomem(r->out.unknown2, req)) {
303                 return tevent_req_post(req, ev);
304         }
305
306         r->out.unknown3 = talloc_zero(r, uint8_t);
307         if (tevent_req_nomem(r->out.unknown3, req)) {
308                 return tevent_req_post(req, ev);
309         }
310
311         r->out.unknown4 = talloc_zero(r, uint8_t);
312         if (tevent_req_nomem(r->out.unknown4, req)) {
313                 return tevent_req_post(req, ev);
314         }
315
316         r->out.result = _ServerAlive2(p, r);
317
318         if (p->fault_state) {
319                 NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state);
320                 tevent_req_nterror(status);
321                 return tevent_req_post(req, ev);
322         }
323
324         tevent_req_done(req);
325         return tevent_req_post(req, ev);
326 }
327
328 static NTSTATUS _s3_compat_ServerAlive2_recv(struct tevent_req *req)
329 {
330         return tevent_req_simple_recv_ntstatus(req);
331 }
332
333
334 static const struct dcerpc_call_entry_point_fns struct _s3_compat_IOXIDResolver_fns[] = {
335         {
336                 .send_fn = (dcerpc_call_entry_point_send_fn_t)
337                         _s3_compat_ResolveOxid_send,
338                 .recv_fn = (dcerpc_call_entry_point_recv_fn_t)
339                         _s3_compat_ResolveOxid_recv,
340         },
341         {
342                 .send_fn = (dcerpc_call_entry_point_send_fn_t)
343                         _s3_compat_SimplePing_send,
344                 .recv_fn = (dcerpc_call_entry_point_recv_fn_t)
345                         _s3_compat_SimplePing_recv,
346         },
347         {
348                 .send_fn = (dcerpc_call_entry_point_send_fn_t)
349                         _s3_compat_ComplexPing_send,
350                 .recv_fn = (dcerpc_call_entry_point_recv_fn_t)
351                         _s3_compat_ComplexPing_recv,
352         },
353         {
354                 .send_fn = (dcerpc_call_entry_point_send_fn_t)
355                         _s3_compat_ServerAlive_send,
356                 .recv_fn = (dcerpc_call_entry_point_recv_fn_t)
357                         _s3_compat_ServerAlive_recv,
358         },
359         {
360                 .send_fn = (dcerpc_call_entry_point_send_fn_t)
361                         _s3_compat_ResolveOxid2_send,
362                 .recv_fn = (dcerpc_call_entry_point_recv_fn_t)
363                         _s3_compat_ResolveOxid2_recv,
364         },
365         {
366                 .send_fn = (dcerpc_call_entry_point_send_fn_t)
367                         _s3_compat_ServerAlive2_send,
368                 .recv_fn = (dcerpc_call_entry_point_recv_fn_t)
369                         _s3_compat_ServerAlive2_recv,
370         },
371         {
372                 .send_fn = NULL,
373                 .recv_fn = NULL,
374         },
375 };
376
377 static const struct dcerpc_call_entry_point_vector _s3_compat_IOXIDResolver_epv[] = {
378         .name = "_s3_compat_IOXIDResolver",
379         .table = &ndr_table_IOXIDResolver,
380         .num_fns = 6,
381         .fns = _s3_compat_IOXIDResolver_fns,
382 };
383
384 NTSTATUS dcerpc_server_setup_s3compat_IOXIDResolver(struct dcerpc_server *server)
385 {
386         return NT_STATUS_NOT_IMPLEMENTED;
387 }