1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-14 19:24:43 +03:00
samba-mirror/source3/librpc/gen_ndr/cli_initshutdown.c
Zach Loafman 863a6aa07e Fix warnings on FreeBSD-based platforms
Fix two shadowed declaration warnings on FreeBSD-based platform:
'reboot' is a 4.0BSD syscall in unistd.h and 'tcp_seq' is a typedef in
netinet/tcp.h.
(This used to be commit 14d2a4da1da38d6f69c63505d35990322f253e5d)
2008-07-22 15:00:48 +02:00

156 lines
3.0 KiB
C

/*
* Unix SMB/CIFS implementation.
* client auto-generated by pidl. DO NOT MODIFY!
*/
#include "includes.h"
#include "librpc/gen_ndr/cli_initshutdown.h"
NTSTATUS rpccli_initshutdown_Init(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
uint16_t *hostname /* [in] [unique] */,
struct initshutdown_String *message /* [in] [unique] */,
uint32_t timeout /* [in] */,
uint8_t force_apps /* [in] */,
uint8_t do_reboot /* [in] */,
WERROR *werror)
{
struct initshutdown_Init r;
NTSTATUS status;
/* In parameters */
r.in.hostname = hostname;
r.in.message = message;
r.in.timeout = timeout;
r.in.force_apps = force_apps;
r.in.do_reboot = do_reboot;
if (DEBUGLEVEL >= 10) {
NDR_PRINT_IN_DEBUG(initshutdown_Init, &r);
}
status = cli_do_rpc_ndr(cli,
mem_ctx,
&ndr_table_initshutdown,
NDR_INITSHUTDOWN_INIT,
&r);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
if (DEBUGLEVEL >= 10) {
NDR_PRINT_OUT_DEBUG(initshutdown_Init, &r);
}
if (NT_STATUS_IS_ERR(status)) {
return status;
}
/* Return variables */
/* Return result */
if (werror) {
*werror = r.out.result;
}
return werror_to_ntstatus(r.out.result);
}
NTSTATUS rpccli_initshutdown_Abort(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
uint16_t *server /* [in] [unique] */,
WERROR *werror)
{
struct initshutdown_Abort r;
NTSTATUS status;
/* In parameters */
r.in.server = server;
if (DEBUGLEVEL >= 10) {
NDR_PRINT_IN_DEBUG(initshutdown_Abort, &r);
}
status = cli_do_rpc_ndr(cli,
mem_ctx,
&ndr_table_initshutdown,
NDR_INITSHUTDOWN_ABORT,
&r);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
if (DEBUGLEVEL >= 10) {
NDR_PRINT_OUT_DEBUG(initshutdown_Abort, &r);
}
if (NT_STATUS_IS_ERR(status)) {
return status;
}
/* Return variables */
/* Return result */
if (werror) {
*werror = r.out.result;
}
return werror_to_ntstatus(r.out.result);
}
NTSTATUS rpccli_initshutdown_InitEx(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
uint16_t *hostname /* [in] [unique] */,
struct initshutdown_String *message /* [in] [unique] */,
uint32_t timeout /* [in] */,
uint8_t force_apps /* [in] */,
uint8_t do_reboot /* [in] */,
uint32_t reason /* [in] */,
WERROR *werror)
{
struct initshutdown_InitEx r;
NTSTATUS status;
/* In parameters */
r.in.hostname = hostname;
r.in.message = message;
r.in.timeout = timeout;
r.in.force_apps = force_apps;
r.in.do_reboot = do_reboot;
r.in.reason = reason;
if (DEBUGLEVEL >= 10) {
NDR_PRINT_IN_DEBUG(initshutdown_InitEx, &r);
}
status = cli_do_rpc_ndr(cli,
mem_ctx,
&ndr_table_initshutdown,
NDR_INITSHUTDOWN_INITEX,
&r);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
if (DEBUGLEVEL >= 10) {
NDR_PRINT_OUT_DEBUG(initshutdown_InitEx, &r);
}
if (NT_STATUS_IS_ERR(status)) {
return status;
}
/* Return variables */
/* Return result */
if (werror) {
*werror = r.out.result;
}
return werror_to_ntstatus(r.out.result);
}