summaryrefslogtreecommitdiff
path: root/librpc/gen_ndr/srv_initshutdown.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-12-16 15:59:06 +0100
committerJelmer Vernooij <jelmer@samba.org>2008-12-16 15:59:06 +0100
commitca7e4ce97a39f1536047478388302c708d34d372 (patch)
treece1b9b68ce74394e4ead049f34caea86f2651433 /librpc/gen_ndr/srv_initshutdown.c
parentb2a01ef5dd66618a130e2a1d4cc1d755ba3624a8 (diff)
downloadsamba-ca7e4ce97a39f1536047478388302c708d34d372.tar.gz
samba-ca7e4ce97a39f1536047478388302c708d34d372.tar.bz2
samba-ca7e4ce97a39f1536047478388302c708d34d372.zip
Move shared gen_ndr files to librpc/gen_ndr in the root.
At the moment these files are used just by Samba 3, but the next step will be using them from Samba 4 as well.
Diffstat (limited to 'librpc/gen_ndr/srv_initshutdown.c')
-rw-r--r--librpc/gen_ndr/srv_initshutdown.c246
1 files changed, 246 insertions, 0 deletions
diff --git a/librpc/gen_ndr/srv_initshutdown.c b/librpc/gen_ndr/srv_initshutdown.c
new file mode 100644
index 0000000000..51098074ac
--- /dev/null
+++ b/librpc/gen_ndr/srv_initshutdown.c
@@ -0,0 +1,246 @@
+/*
+ * Unix SMB/CIFS implementation.
+ * server auto-generated by pidl. DO NOT MODIFY!
+ */
+
+#include "includes.h"
+#include "librpc/gen_ndr/srv_initshutdown.h"
+
+static bool api_initshutdown_Init(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct initshutdown_Init *r;
+
+ call = &ndr_table_initshutdown.calls[NDR_INITSHUTDOWN_INIT];
+
+ r = talloc(talloc_tos(), struct initshutdown_Init);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r, NULL);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(initshutdown_Init, r);
+ }
+
+ r->out.result = _initshutdown_Init(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(initshutdown_Init, r);
+ }
+
+ push = ndr_push_init_ctx(r, NULL);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_initshutdown_Abort(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct initshutdown_Abort *r;
+
+ call = &ndr_table_initshutdown.calls[NDR_INITSHUTDOWN_ABORT];
+
+ r = talloc(talloc_tos(), struct initshutdown_Abort);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r, NULL);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(initshutdown_Abort, r);
+ }
+
+ r->out.result = _initshutdown_Abort(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(initshutdown_Abort, r);
+ }
+
+ push = ndr_push_init_ctx(r, NULL);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_initshutdown_InitEx(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct initshutdown_InitEx *r;
+
+ call = &ndr_table_initshutdown.calls[NDR_INITSHUTDOWN_INITEX];
+
+ r = talloc(talloc_tos(), struct initshutdown_InitEx);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r, NULL);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(initshutdown_InitEx, r);
+ }
+
+ r->out.result = _initshutdown_InitEx(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(initshutdown_InitEx, r);
+ }
+
+ push = ndr_push_init_ctx(r, NULL);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
+
+/* Tables */
+static struct api_struct api_initshutdown_cmds[] =
+{
+ {"INITSHUTDOWN_INIT", NDR_INITSHUTDOWN_INIT, api_initshutdown_Init},
+ {"INITSHUTDOWN_ABORT", NDR_INITSHUTDOWN_ABORT, api_initshutdown_Abort},
+ {"INITSHUTDOWN_INITEX", NDR_INITSHUTDOWN_INITEX, api_initshutdown_InitEx},
+};
+
+void initshutdown_get_pipe_fns(struct api_struct **fns, int *n_fns)
+{
+ *fns = api_initshutdown_cmds;
+ *n_fns = sizeof(api_initshutdown_cmds) / sizeof(struct api_struct);
+}
+
+NTSTATUS rpc_initshutdown_init(void)
+{
+ return rpc_pipe_register_commands(SMB_RPC_INTERFACE_VERSION, "initshutdown", "initshutdown", &ndr_table_initshutdown.syntax_id, api_initshutdown_cmds, sizeof(api_initshutdown_cmds) / sizeof(struct api_struct));
+}