1 /* parser auto-generated by pidl */
4 #include "../librpc/gen_ndr/ndr_initshutdown.h"
6 #include "librpc/gen_ndr/ndr_lsa.h"
7 static enum ndr_err_code ndr_push_initshutdown_Init(struct ndr_push *ndr, int flags, const struct initshutdown_Init *r)
10 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.hostname));
12 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, *r->in.hostname));
14 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.message));
16 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.message));
18 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.timeout));
19 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.force_apps));
20 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.do_reboot));
22 if (flags & NDR_OUT) {
23 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
25 return NDR_ERR_SUCCESS;
28 static enum ndr_err_code ndr_pull_initshutdown_Init(struct ndr_pull *ndr, int flags, struct initshutdown_Init *r)
30 uint32_t _ptr_hostname;
31 uint32_t _ptr_message;
32 TALLOC_CTX *_mem_save_hostname_0;
33 TALLOC_CTX *_mem_save_message_0;
35 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_hostname));
37 NDR_PULL_ALLOC(ndr, r->in.hostname);
39 r->in.hostname = NULL;
42 _mem_save_hostname_0 = NDR_PULL_GET_MEM_CTX(ndr);
43 NDR_PULL_SET_MEM_CTX(ndr, r->in.hostname, 0);
44 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, r->in.hostname));
45 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_hostname_0, 0);
47 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_message));
49 NDR_PULL_ALLOC(ndr, r->in.message);
54 _mem_save_message_0 = NDR_PULL_GET_MEM_CTX(ndr);
55 NDR_PULL_SET_MEM_CTX(ndr, r->in.message, 0);
56 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.message));
57 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_message_0, 0);
59 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.timeout));
60 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in.force_apps));
61 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in.do_reboot));
63 if (flags & NDR_OUT) {
64 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
66 return NDR_ERR_SUCCESS;
69 _PUBLIC_ void ndr_print_initshutdown_Init(struct ndr_print *ndr, const char *name, int flags, const struct initshutdown_Init *r)
71 ndr_print_struct(ndr, name, "initshutdown_Init");
73 if (flags & NDR_SET_VALUES) {
74 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
77 ndr_print_struct(ndr, "in", "initshutdown_Init");
79 ndr_print_ptr(ndr, "hostname", r->in.hostname);
82 ndr_print_uint16(ndr, "hostname", *r->in.hostname);
85 ndr_print_ptr(ndr, "message", r->in.message);
88 ndr_print_lsa_StringLarge(ndr, "message", r->in.message);
91 ndr_print_uint32(ndr, "timeout", r->in.timeout);
92 ndr_print_uint8(ndr, "force_apps", r->in.force_apps);
93 ndr_print_uint8(ndr, "do_reboot", r->in.do_reboot);
96 if (flags & NDR_OUT) {
97 ndr_print_struct(ndr, "out", "initshutdown_Init");
99 ndr_print_WERROR(ndr, "result", r->out.result);
105 static enum ndr_err_code ndr_push_initshutdown_Abort(struct ndr_push *ndr, int flags, const struct initshutdown_Abort *r)
107 if (flags & NDR_IN) {
108 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server));
110 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, *r->in.server));
113 if (flags & NDR_OUT) {
114 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
116 return NDR_ERR_SUCCESS;
119 static enum ndr_err_code ndr_pull_initshutdown_Abort(struct ndr_pull *ndr, int flags, struct initshutdown_Abort *r)
121 uint32_t _ptr_server;
122 TALLOC_CTX *_mem_save_server_0;
123 if (flags & NDR_IN) {
124 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server));
126 NDR_PULL_ALLOC(ndr, r->in.server);
131 _mem_save_server_0 = NDR_PULL_GET_MEM_CTX(ndr);
132 NDR_PULL_SET_MEM_CTX(ndr, r->in.server, 0);
133 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, r->in.server));
134 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_0, 0);
137 if (flags & NDR_OUT) {
138 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
140 return NDR_ERR_SUCCESS;
143 _PUBLIC_ void ndr_print_initshutdown_Abort(struct ndr_print *ndr, const char *name, int flags, const struct initshutdown_Abort *r)
145 ndr_print_struct(ndr, name, "initshutdown_Abort");
147 if (flags & NDR_SET_VALUES) {
148 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
150 if (flags & NDR_IN) {
151 ndr_print_struct(ndr, "in", "initshutdown_Abort");
153 ndr_print_ptr(ndr, "server", r->in.server);
156 ndr_print_uint16(ndr, "server", *r->in.server);
161 if (flags & NDR_OUT) {
162 ndr_print_struct(ndr, "out", "initshutdown_Abort");
164 ndr_print_WERROR(ndr, "result", r->out.result);
170 static enum ndr_err_code ndr_push_initshutdown_InitEx(struct ndr_push *ndr, int flags, const struct initshutdown_InitEx *r)
172 if (flags & NDR_IN) {
173 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.hostname));
174 if (r->in.hostname) {
175 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, *r->in.hostname));
177 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.message));
179 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.message));
181 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.timeout));
182 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.force_apps));
183 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.do_reboot));
184 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.reason));
186 if (flags & NDR_OUT) {
187 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
189 return NDR_ERR_SUCCESS;
192 static enum ndr_err_code ndr_pull_initshutdown_InitEx(struct ndr_pull *ndr, int flags, struct initshutdown_InitEx *r)
194 uint32_t _ptr_hostname;
195 uint32_t _ptr_message;
196 TALLOC_CTX *_mem_save_hostname_0;
197 TALLOC_CTX *_mem_save_message_0;
198 if (flags & NDR_IN) {
199 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_hostname));
201 NDR_PULL_ALLOC(ndr, r->in.hostname);
203 r->in.hostname = NULL;
205 if (r->in.hostname) {
206 _mem_save_hostname_0 = NDR_PULL_GET_MEM_CTX(ndr);
207 NDR_PULL_SET_MEM_CTX(ndr, r->in.hostname, 0);
208 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, r->in.hostname));
209 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_hostname_0, 0);
211 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_message));
213 NDR_PULL_ALLOC(ndr, r->in.message);
215 r->in.message = NULL;
218 _mem_save_message_0 = NDR_PULL_GET_MEM_CTX(ndr);
219 NDR_PULL_SET_MEM_CTX(ndr, r->in.message, 0);
220 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.message));
221 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_message_0, 0);
223 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.timeout));
224 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in.force_apps));
225 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in.do_reboot));
226 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.reason));
228 if (flags & NDR_OUT) {
229 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
231 return NDR_ERR_SUCCESS;
234 _PUBLIC_ void ndr_print_initshutdown_InitEx(struct ndr_print *ndr, const char *name, int flags, const struct initshutdown_InitEx *r)
236 ndr_print_struct(ndr, name, "initshutdown_InitEx");
238 if (flags & NDR_SET_VALUES) {
239 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
241 if (flags & NDR_IN) {
242 ndr_print_struct(ndr, "in", "initshutdown_InitEx");
244 ndr_print_ptr(ndr, "hostname", r->in.hostname);
246 if (r->in.hostname) {
247 ndr_print_uint16(ndr, "hostname", *r->in.hostname);
250 ndr_print_ptr(ndr, "message", r->in.message);
253 ndr_print_lsa_StringLarge(ndr, "message", r->in.message);
256 ndr_print_uint32(ndr, "timeout", r->in.timeout);
257 ndr_print_uint8(ndr, "force_apps", r->in.force_apps);
258 ndr_print_uint8(ndr, "do_reboot", r->in.do_reboot);
259 ndr_print_uint32(ndr, "reason", r->in.reason);
262 if (flags & NDR_OUT) {
263 ndr_print_struct(ndr, "out", "initshutdown_InitEx");
265 ndr_print_WERROR(ndr, "result", r->out.result);
271 static const struct ndr_interface_call initshutdown_calls[] = {
274 sizeof(struct initshutdown_Init),
275 (ndr_push_flags_fn_t) ndr_push_initshutdown_Init,
276 (ndr_pull_flags_fn_t) ndr_pull_initshutdown_Init,
277 (ndr_print_function_t) ndr_print_initshutdown_Init,
281 "initshutdown_Abort",
282 sizeof(struct initshutdown_Abort),
283 (ndr_push_flags_fn_t) ndr_push_initshutdown_Abort,
284 (ndr_pull_flags_fn_t) ndr_pull_initshutdown_Abort,
285 (ndr_print_function_t) ndr_print_initshutdown_Abort,
289 "initshutdown_InitEx",
290 sizeof(struct initshutdown_InitEx),
291 (ndr_push_flags_fn_t) ndr_push_initshutdown_InitEx,
292 (ndr_pull_flags_fn_t) ndr_pull_initshutdown_InitEx,
293 (ndr_print_function_t) ndr_print_initshutdown_InitEx,
296 { NULL, 0, NULL, NULL, NULL, false }
299 static const char * const initshutdown_endpoint_strings[] = {
300 "ncacn_np:[\\pipe\\InitShutdown]",
303 static const struct ndr_interface_string_array initshutdown_endpoints = {
305 .names = initshutdown_endpoint_strings
308 static const char * const initshutdown_authservice_strings[] = {
312 static const struct ndr_interface_string_array initshutdown_authservices = {
314 .names = initshutdown_authservice_strings
318 const struct ndr_interface_table ndr_table_initshutdown = {
319 .name = "initshutdown",
321 {0x894de0c0,0x0d55,0x11d3,{0xa3,0x22},{0x00,0xc0,0x4f,0xa3,0x21,0xa1}},
322 NDR_INITSHUTDOWN_VERSION
324 .helpstring = NDR_INITSHUTDOWN_HELPSTRING,
326 .calls = initshutdown_calls,
327 .endpoints = &initshutdown_endpoints,
328 .authservices = &initshutdown_authservices