| 1 | /*
|
|---|
| 2 | * Unix SMB/CIFS implementation.
|
|---|
| 3 | * client auto-generated by pidl. DO NOT MODIFY!
|
|---|
| 4 | */
|
|---|
| 5 |
|
|---|
| 6 | #include "includes.h"
|
|---|
| 7 | #include "librpc/gen_ndr/cli_initshutdown.h"
|
|---|
| 8 |
|
|---|
| 9 | NTSTATUS rpccli_initshutdown_Init(struct rpc_pipe_client *cli,
|
|---|
| 10 | TALLOC_CTX *mem_ctx,
|
|---|
| 11 | uint16_t *hostname /* [in] [unique] */,
|
|---|
| 12 | struct initshutdown_String *message /* [in] [unique] */,
|
|---|
| 13 | uint32_t timeout /* [in] */,
|
|---|
| 14 | uint8_t force_apps /* [in] */,
|
|---|
| 15 | uint8_t reboot /* [in] */,
|
|---|
| 16 | WERROR *werror)
|
|---|
| 17 | {
|
|---|
| 18 | struct initshutdown_Init r;
|
|---|
| 19 | NTSTATUS status;
|
|---|
| 20 |
|
|---|
| 21 | /* In parameters */
|
|---|
| 22 | r.in.hostname = hostname;
|
|---|
| 23 | r.in.message = message;
|
|---|
| 24 | r.in.timeout = timeout;
|
|---|
| 25 | r.in.force_apps = force_apps;
|
|---|
| 26 | r.in.reboot = reboot;
|
|---|
| 27 |
|
|---|
| 28 | if (DEBUGLEVEL >= 10) {
|
|---|
| 29 | NDR_PRINT_IN_DEBUG(initshutdown_Init, &r);
|
|---|
| 30 | }
|
|---|
| 31 |
|
|---|
| 32 | status = cli_do_rpc_ndr(cli,
|
|---|
| 33 | mem_ctx,
|
|---|
| 34 | PI_INITSHUTDOWN,
|
|---|
| 35 | &ndr_table_initshutdown,
|
|---|
| 36 | NDR_INITSHUTDOWN_INIT,
|
|---|
| 37 | &r);
|
|---|
| 38 |
|
|---|
| 39 | if (!NT_STATUS_IS_OK(status)) {
|
|---|
| 40 | return status;
|
|---|
| 41 | }
|
|---|
| 42 |
|
|---|
| 43 | if (DEBUGLEVEL >= 10) {
|
|---|
| 44 | NDR_PRINT_OUT_DEBUG(initshutdown_Init, &r);
|
|---|
| 45 | }
|
|---|
| 46 |
|
|---|
| 47 | if (NT_STATUS_IS_ERR(status)) {
|
|---|
| 48 | return status;
|
|---|
| 49 | }
|
|---|
| 50 |
|
|---|
| 51 | /* Return variables */
|
|---|
| 52 |
|
|---|
| 53 | /* Return result */
|
|---|
| 54 | if (werror) {
|
|---|
| 55 | *werror = r.out.result;
|
|---|
| 56 | }
|
|---|
| 57 |
|
|---|
| 58 | return werror_to_ntstatus(r.out.result);
|
|---|
| 59 | }
|
|---|
| 60 |
|
|---|
| 61 | NTSTATUS rpccli_initshutdown_Abort(struct rpc_pipe_client *cli,
|
|---|
| 62 | TALLOC_CTX *mem_ctx,
|
|---|
| 63 | uint16_t *server /* [in] [unique] */,
|
|---|
| 64 | WERROR *werror)
|
|---|
| 65 | {
|
|---|
| 66 | struct initshutdown_Abort r;
|
|---|
| 67 | NTSTATUS status;
|
|---|
| 68 |
|
|---|
| 69 | /* In parameters */
|
|---|
| 70 | r.in.server = server;
|
|---|
| 71 |
|
|---|
| 72 | if (DEBUGLEVEL >= 10) {
|
|---|
| 73 | NDR_PRINT_IN_DEBUG(initshutdown_Abort, &r);
|
|---|
| 74 | }
|
|---|
| 75 |
|
|---|
| 76 | status = cli_do_rpc_ndr(cli,
|
|---|
| 77 | mem_ctx,
|
|---|
| 78 | PI_INITSHUTDOWN,
|
|---|
| 79 | &ndr_table_initshutdown,
|
|---|
| 80 | NDR_INITSHUTDOWN_ABORT,
|
|---|
| 81 | &r);
|
|---|
| 82 |
|
|---|
| 83 | if (!NT_STATUS_IS_OK(status)) {
|
|---|
| 84 | return status;
|
|---|
| 85 | }
|
|---|
| 86 |
|
|---|
| 87 | if (DEBUGLEVEL >= 10) {
|
|---|
| 88 | NDR_PRINT_OUT_DEBUG(initshutdown_Abort, &r);
|
|---|
| 89 | }
|
|---|
| 90 |
|
|---|
| 91 | if (NT_STATUS_IS_ERR(status)) {
|
|---|
| 92 | return status;
|
|---|
| 93 | }
|
|---|
| 94 |
|
|---|
| 95 | /* Return variables */
|
|---|
| 96 |
|
|---|
| 97 | /* Return result */
|
|---|
| 98 | if (werror) {
|
|---|
| 99 | *werror = r.out.result;
|
|---|
| 100 | }
|
|---|
| 101 |
|
|---|
| 102 | return werror_to_ntstatus(r.out.result);
|
|---|
| 103 | }
|
|---|
| 104 |
|
|---|
| 105 | NTSTATUS rpccli_initshutdown_InitEx(struct rpc_pipe_client *cli,
|
|---|
| 106 | TALLOC_CTX *mem_ctx,
|
|---|
| 107 | uint16_t *hostname /* [in] [unique] */,
|
|---|
| 108 | struct initshutdown_String *message /* [in] [unique] */,
|
|---|
| 109 | uint32_t timeout /* [in] */,
|
|---|
| 110 | uint8_t force_apps /* [in] */,
|
|---|
| 111 | uint8_t reboot /* [in] */,
|
|---|
| 112 | uint32_t reason /* [in] */,
|
|---|
| 113 | WERROR *werror)
|
|---|
| 114 | {
|
|---|
| 115 | struct initshutdown_InitEx r;
|
|---|
| 116 | NTSTATUS status;
|
|---|
| 117 |
|
|---|
| 118 | /* In parameters */
|
|---|
| 119 | r.in.hostname = hostname;
|
|---|
| 120 | r.in.message = message;
|
|---|
| 121 | r.in.timeout = timeout;
|
|---|
| 122 | r.in.force_apps = force_apps;
|
|---|
| 123 | r.in.reboot = reboot;
|
|---|
| 124 | r.in.reason = reason;
|
|---|
| 125 |
|
|---|
| 126 | if (DEBUGLEVEL >= 10) {
|
|---|
| 127 | NDR_PRINT_IN_DEBUG(initshutdown_InitEx, &r);
|
|---|
| 128 | }
|
|---|
| 129 |
|
|---|
| 130 | status = cli_do_rpc_ndr(cli,
|
|---|
| 131 | mem_ctx,
|
|---|
| 132 | PI_INITSHUTDOWN,
|
|---|
| 133 | &ndr_table_initshutdown,
|
|---|
| 134 | NDR_INITSHUTDOWN_INITEX,
|
|---|
| 135 | &r);
|
|---|
| 136 |
|
|---|
| 137 | if (!NT_STATUS_IS_OK(status)) {
|
|---|
| 138 | return status;
|
|---|
| 139 | }
|
|---|
| 140 |
|
|---|
| 141 | if (DEBUGLEVEL >= 10) {
|
|---|
| 142 | NDR_PRINT_OUT_DEBUG(initshutdown_InitEx, &r);
|
|---|
| 143 | }
|
|---|
| 144 |
|
|---|
| 145 | if (NT_STATUS_IS_ERR(status)) {
|
|---|
| 146 | return status;
|
|---|
| 147 | }
|
|---|
| 148 |
|
|---|
| 149 | /* Return variables */
|
|---|
| 150 |
|
|---|
| 151 | /* Return result */
|
|---|
| 152 | if (werror) {
|
|---|
| 153 | *werror = r.out.result;
|
|---|
| 154 | }
|
|---|
| 155 |
|
|---|
| 156 | return werror_to_ntstatus(r.out.result);
|
|---|
| 157 | }
|
|---|
| 158 |
|
|---|