2006-09-15 22:32:43 +04:00
/* parser auto-generated by pidl */
# include "includes.h"
2008-12-16 18:32:18 +03:00
# include "../librpc/gen_ndr/ndr_initshutdown.h"
2006-09-15 22:32:43 +04:00
2008-09-17 17:43:04 +04:00
# include "librpc/gen_ndr/ndr_lsa.h"
2007-11-09 16:38:47 +03:00
static enum ndr_err_code ndr_push_initshutdown_Init ( struct ndr_push * ndr , int flags , const struct initshutdown_Init * r )
2006-09-15 22:32:43 +04:00
{
if ( flags & NDR_IN ) {
NDR_CHECK ( ndr_push_unique_ptr ( ndr , r - > in . hostname ) ) ;
if ( r - > in . hostname ) {
NDR_CHECK ( ndr_push_uint16 ( ndr , NDR_SCALARS , * r - > in . hostname ) ) ;
}
NDR_CHECK ( ndr_push_unique_ptr ( ndr , r - > in . message ) ) ;
if ( r - > in . message ) {
2008-10-15 18:13:02 +04:00
NDR_CHECK ( ndr_push_lsa_StringLarge ( ndr , NDR_SCALARS | NDR_BUFFERS , r - > in . message ) ) ;
2006-09-15 22:32:43 +04:00
}
NDR_CHECK ( ndr_push_uint32 ( ndr , NDR_SCALARS , r - > in . timeout ) ) ;
NDR_CHECK ( ndr_push_uint8 ( ndr , NDR_SCALARS , r - > in . force_apps ) ) ;
2008-10-15 18:25:06 +04:00
NDR_CHECK ( ndr_push_uint8 ( ndr , NDR_SCALARS , r - > in . do_reboot ) ) ;
2006-09-15 22:32:43 +04:00
}
if ( flags & NDR_OUT ) {
NDR_CHECK ( ndr_push_WERROR ( ndr , NDR_SCALARS , r - > out . result ) ) ;
}
2007-11-09 16:38:47 +03:00
return NDR_ERR_SUCCESS ;
2006-09-15 22:32:43 +04:00
}
2007-11-09 16:38:47 +03:00
static enum ndr_err_code ndr_pull_initshutdown_Init ( struct ndr_pull * ndr , int flags , struct initshutdown_Init * r )
2006-09-15 22:32:43 +04:00
{
uint32_t _ptr_hostname ;
uint32_t _ptr_message ;
TALLOC_CTX * _mem_save_hostname_0 ;
TALLOC_CTX * _mem_save_message_0 ;
if ( flags & NDR_IN ) {
NDR_CHECK ( ndr_pull_generic_ptr ( ndr , & _ptr_hostname ) ) ;
if ( _ptr_hostname ) {
NDR_PULL_ALLOC ( ndr , r - > in . hostname ) ;
} else {
r - > in . hostname = NULL ;
}
if ( r - > in . hostname ) {
_mem_save_hostname_0 = NDR_PULL_GET_MEM_CTX ( ndr ) ;
NDR_PULL_SET_MEM_CTX ( ndr , r - > in . hostname , 0 ) ;
NDR_CHECK ( ndr_pull_uint16 ( ndr , NDR_SCALARS , r - > in . hostname ) ) ;
NDR_PULL_SET_MEM_CTX ( ndr , _mem_save_hostname_0 , 0 ) ;
}
NDR_CHECK ( ndr_pull_generic_ptr ( ndr , & _ptr_message ) ) ;
if ( _ptr_message ) {
NDR_PULL_ALLOC ( ndr , r - > in . message ) ;
} else {
r - > in . message = NULL ;
}
if ( r - > in . message ) {
_mem_save_message_0 = NDR_PULL_GET_MEM_CTX ( ndr ) ;
NDR_PULL_SET_MEM_CTX ( ndr , r - > in . message , 0 ) ;
2008-10-15 18:13:02 +04:00
NDR_CHECK ( ndr_pull_lsa_StringLarge ( ndr , NDR_SCALARS | NDR_BUFFERS , r - > in . message ) ) ;
2006-09-15 22:32:43 +04:00
NDR_PULL_SET_MEM_CTX ( ndr , _mem_save_message_0 , 0 ) ;
}
NDR_CHECK ( ndr_pull_uint32 ( ndr , NDR_SCALARS , & r - > in . timeout ) ) ;
NDR_CHECK ( ndr_pull_uint8 ( ndr , NDR_SCALARS , & r - > in . force_apps ) ) ;
2008-10-15 18:25:06 +04:00
NDR_CHECK ( ndr_pull_uint8 ( ndr , NDR_SCALARS , & r - > in . do_reboot ) ) ;
2006-09-15 22:32:43 +04:00
}
if ( flags & NDR_OUT ) {
NDR_CHECK ( ndr_pull_WERROR ( ndr , NDR_SCALARS , & r - > out . result ) ) ;
}
2007-11-09 16:38:47 +03:00
return NDR_ERR_SUCCESS ;
2006-09-15 22:32:43 +04:00
}
_PUBLIC_ void ndr_print_initshutdown_Init ( struct ndr_print * ndr , const char * name , int flags , const struct initshutdown_Init * r )
{
ndr_print_struct ( ndr , name , " initshutdown_Init " ) ;
ndr - > depth + + ;
if ( flags & NDR_SET_VALUES ) {
ndr - > flags | = LIBNDR_PRINT_SET_VALUES ;
}
if ( flags & NDR_IN ) {
ndr_print_struct ( ndr , " in " , " initshutdown_Init " ) ;
ndr - > depth + + ;
ndr_print_ptr ( ndr , " hostname " , r - > in . hostname ) ;
ndr - > depth + + ;
if ( r - > in . hostname ) {
ndr_print_uint16 ( ndr , " hostname " , * r - > in . hostname ) ;
}
ndr - > depth - - ;
ndr_print_ptr ( ndr , " message " , r - > in . message ) ;
ndr - > depth + + ;
if ( r - > in . message ) {
2008-10-15 18:13:02 +04:00
ndr_print_lsa_StringLarge ( ndr , " message " , r - > in . message ) ;
2006-09-15 22:32:43 +04:00
}
ndr - > depth - - ;
ndr_print_uint32 ( ndr , " timeout " , r - > in . timeout ) ;
ndr_print_uint8 ( ndr , " force_apps " , r - > in . force_apps ) ;
2008-10-15 18:25:06 +04:00
ndr_print_uint8 ( ndr , " do_reboot " , r - > in . do_reboot ) ;
2006-09-15 22:32:43 +04:00
ndr - > depth - - ;
}
if ( flags & NDR_OUT ) {
ndr_print_struct ( ndr , " out " , " initshutdown_Init " ) ;
ndr - > depth + + ;
ndr_print_WERROR ( ndr , " result " , r - > out . result ) ;
ndr - > depth - - ;
}
ndr - > depth - - ;
}
2007-11-09 16:38:47 +03:00
static enum ndr_err_code ndr_push_initshutdown_Abort ( struct ndr_push * ndr , int flags , const struct initshutdown_Abort * r )
2006-09-15 22:32:43 +04:00
{
if ( flags & NDR_IN ) {
NDR_CHECK ( ndr_push_unique_ptr ( ndr , r - > in . server ) ) ;
if ( r - > in . server ) {
NDR_CHECK ( ndr_push_uint16 ( ndr , NDR_SCALARS , * r - > in . server ) ) ;
}
}
if ( flags & NDR_OUT ) {
NDR_CHECK ( ndr_push_WERROR ( ndr , NDR_SCALARS , r - > out . result ) ) ;
}
2007-11-09 16:38:47 +03:00
return NDR_ERR_SUCCESS ;
2006-09-15 22:32:43 +04:00
}
2007-11-09 16:38:47 +03:00
static enum ndr_err_code ndr_pull_initshutdown_Abort ( struct ndr_pull * ndr , int flags , struct initshutdown_Abort * r )
2006-09-15 22:32:43 +04:00
{
uint32_t _ptr_server ;
TALLOC_CTX * _mem_save_server_0 ;
if ( flags & NDR_IN ) {
NDR_CHECK ( ndr_pull_generic_ptr ( ndr , & _ptr_server ) ) ;
if ( _ptr_server ) {
NDR_PULL_ALLOC ( ndr , r - > in . server ) ;
} else {
r - > in . server = NULL ;
}
if ( r - > in . server ) {
_mem_save_server_0 = NDR_PULL_GET_MEM_CTX ( ndr ) ;
NDR_PULL_SET_MEM_CTX ( ndr , r - > in . server , 0 ) ;
NDR_CHECK ( ndr_pull_uint16 ( ndr , NDR_SCALARS , r - > in . server ) ) ;
NDR_PULL_SET_MEM_CTX ( ndr , _mem_save_server_0 , 0 ) ;
}
}
if ( flags & NDR_OUT ) {
NDR_CHECK ( ndr_pull_WERROR ( ndr , NDR_SCALARS , & r - > out . result ) ) ;
}
2007-11-09 16:38:47 +03:00
return NDR_ERR_SUCCESS ;
2006-09-15 22:32:43 +04:00
}
_PUBLIC_ void ndr_print_initshutdown_Abort ( struct ndr_print * ndr , const char * name , int flags , const struct initshutdown_Abort * r )
{
ndr_print_struct ( ndr , name , " initshutdown_Abort " ) ;
ndr - > depth + + ;
if ( flags & NDR_SET_VALUES ) {
ndr - > flags | = LIBNDR_PRINT_SET_VALUES ;
}
if ( flags & NDR_IN ) {
ndr_print_struct ( ndr , " in " , " initshutdown_Abort " ) ;
ndr - > depth + + ;
ndr_print_ptr ( ndr , " server " , r - > in . server ) ;
ndr - > depth + + ;
if ( r - > in . server ) {
ndr_print_uint16 ( ndr , " server " , * r - > in . server ) ;
}
ndr - > depth - - ;
ndr - > depth - - ;
}
if ( flags & NDR_OUT ) {
ndr_print_struct ( ndr , " out " , " initshutdown_Abort " ) ;
ndr - > depth + + ;
ndr_print_WERROR ( ndr , " result " , r - > out . result ) ;
ndr - > depth - - ;
}
ndr - > depth - - ;
}
2007-11-09 16:38:47 +03:00
static enum ndr_err_code ndr_push_initshutdown_InitEx ( struct ndr_push * ndr , int flags , const struct initshutdown_InitEx * r )
2006-09-15 22:32:43 +04:00
{
if ( flags & NDR_IN ) {
NDR_CHECK ( ndr_push_unique_ptr ( ndr , r - > in . hostname ) ) ;
if ( r - > in . hostname ) {
NDR_CHECK ( ndr_push_uint16 ( ndr , NDR_SCALARS , * r - > in . hostname ) ) ;
}
NDR_CHECK ( ndr_push_unique_ptr ( ndr , r - > in . message ) ) ;
if ( r - > in . message ) {
2008-10-15 18:13:02 +04:00
NDR_CHECK ( ndr_push_lsa_StringLarge ( ndr , NDR_SCALARS | NDR_BUFFERS , r - > in . message ) ) ;
2006-09-15 22:32:43 +04:00
}
NDR_CHECK ( ndr_push_uint32 ( ndr , NDR_SCALARS , r - > in . timeout ) ) ;
NDR_CHECK ( ndr_push_uint8 ( ndr , NDR_SCALARS , r - > in . force_apps ) ) ;
2008-10-15 18:25:06 +04:00
NDR_CHECK ( ndr_push_uint8 ( ndr , NDR_SCALARS , r - > in . do_reboot ) ) ;
2006-09-15 22:32:43 +04:00
NDR_CHECK ( ndr_push_uint32 ( ndr , NDR_SCALARS , r - > in . reason ) ) ;
}
if ( flags & NDR_OUT ) {
NDR_CHECK ( ndr_push_WERROR ( ndr , NDR_SCALARS , r - > out . result ) ) ;
}
2007-11-09 16:38:47 +03:00
return NDR_ERR_SUCCESS ;
2006-09-15 22:32:43 +04:00
}
2007-11-09 16:38:47 +03:00
static enum ndr_err_code ndr_pull_initshutdown_InitEx ( struct ndr_pull * ndr , int flags , struct initshutdown_InitEx * r )
2006-09-15 22:32:43 +04:00
{
uint32_t _ptr_hostname ;
uint32_t _ptr_message ;
TALLOC_CTX * _mem_save_hostname_0 ;
TALLOC_CTX * _mem_save_message_0 ;
if ( flags & NDR_IN ) {
NDR_CHECK ( ndr_pull_generic_ptr ( ndr , & _ptr_hostname ) ) ;
if ( _ptr_hostname ) {
NDR_PULL_ALLOC ( ndr , r - > in . hostname ) ;
} else {
r - > in . hostname = NULL ;
}
if ( r - > in . hostname ) {
_mem_save_hostname_0 = NDR_PULL_GET_MEM_CTX ( ndr ) ;
NDR_PULL_SET_MEM_CTX ( ndr , r - > in . hostname , 0 ) ;
NDR_CHECK ( ndr_pull_uint16 ( ndr , NDR_SCALARS , r - > in . hostname ) ) ;
NDR_PULL_SET_MEM_CTX ( ndr , _mem_save_hostname_0 , 0 ) ;
}
NDR_CHECK ( ndr_pull_generic_ptr ( ndr , & _ptr_message ) ) ;
if ( _ptr_message ) {
NDR_PULL_ALLOC ( ndr , r - > in . message ) ;
} else {
r - > in . message = NULL ;
}
if ( r - > in . message ) {
_mem_save_message_0 = NDR_PULL_GET_MEM_CTX ( ndr ) ;
NDR_PULL_SET_MEM_CTX ( ndr , r - > in . message , 0 ) ;
2008-10-15 18:13:02 +04:00
NDR_CHECK ( ndr_pull_lsa_StringLarge ( ndr , NDR_SCALARS | NDR_BUFFERS , r - > in . message ) ) ;
2006-09-15 22:32:43 +04:00
NDR_PULL_SET_MEM_CTX ( ndr , _mem_save_message_0 , 0 ) ;
}
NDR_CHECK ( ndr_pull_uint32 ( ndr , NDR_SCALARS , & r - > in . timeout ) ) ;
NDR_CHECK ( ndr_pull_uint8 ( ndr , NDR_SCALARS , & r - > in . force_apps ) ) ;
2008-10-15 18:25:06 +04:00
NDR_CHECK ( ndr_pull_uint8 ( ndr , NDR_SCALARS , & r - > in . do_reboot ) ) ;
2006-09-15 22:32:43 +04:00
NDR_CHECK ( ndr_pull_uint32 ( ndr , NDR_SCALARS , & r - > in . reason ) ) ;
}
if ( flags & NDR_OUT ) {
NDR_CHECK ( ndr_pull_WERROR ( ndr , NDR_SCALARS , & r - > out . result ) ) ;
}
2007-11-09 16:38:47 +03:00
return NDR_ERR_SUCCESS ;
2006-09-15 22:32:43 +04:00
}
_PUBLIC_ void ndr_print_initshutdown_InitEx ( struct ndr_print * ndr , const char * name , int flags , const struct initshutdown_InitEx * r )
{
ndr_print_struct ( ndr , name , " initshutdown_InitEx " ) ;
ndr - > depth + + ;
if ( flags & NDR_SET_VALUES ) {
ndr - > flags | = LIBNDR_PRINT_SET_VALUES ;
}
if ( flags & NDR_IN ) {
ndr_print_struct ( ndr , " in " , " initshutdown_InitEx " ) ;
ndr - > depth + + ;
ndr_print_ptr ( ndr , " hostname " , r - > in . hostname ) ;
ndr - > depth + + ;
if ( r - > in . hostname ) {
ndr_print_uint16 ( ndr , " hostname " , * r - > in . hostname ) ;
}
ndr - > depth - - ;
ndr_print_ptr ( ndr , " message " , r - > in . message ) ;
ndr - > depth + + ;
if ( r - > in . message ) {
2008-10-15 18:13:02 +04:00
ndr_print_lsa_StringLarge ( ndr , " message " , r - > in . message ) ;
2006-09-15 22:32:43 +04:00
}
ndr - > depth - - ;
ndr_print_uint32 ( ndr , " timeout " , r - > in . timeout ) ;
ndr_print_uint8 ( ndr , " force_apps " , r - > in . force_apps ) ;
2008-10-15 18:25:06 +04:00
ndr_print_uint8 ( ndr , " do_reboot " , r - > in . do_reboot ) ;
2006-09-15 22:32:43 +04:00
ndr_print_uint32 ( ndr , " reason " , r - > in . reason ) ;
ndr - > depth - - ;
}
if ( flags & NDR_OUT ) {
ndr_print_struct ( ndr , " out " , " initshutdown_InitEx " ) ;
ndr - > depth + + ;
ndr_print_WERROR ( ndr , " result " , r - > out . result ) ;
ndr - > depth - - ;
}
ndr - > depth - - ;
}
2007-09-20 00:03:43 +04:00
static const struct ndr_interface_call initshutdown_calls [ ] = {
2006-09-15 22:32:43 +04:00
{
" initshutdown_Init " ,
sizeof ( struct initshutdown_Init ) ,
( ndr_push_flags_fn_t ) ndr_push_initshutdown_Init ,
( ndr_pull_flags_fn_t ) ndr_pull_initshutdown_Init ,
( ndr_print_function_t ) ndr_print_initshutdown_Init ,
2007-09-20 00:03:43 +04:00
false ,
2006-09-15 22:32:43 +04:00
} ,
{
" initshutdown_Abort " ,
sizeof ( struct initshutdown_Abort ) ,
( ndr_push_flags_fn_t ) ndr_push_initshutdown_Abort ,
( ndr_pull_flags_fn_t ) ndr_pull_initshutdown_Abort ,
( ndr_print_function_t ) ndr_print_initshutdown_Abort ,
2007-09-20 00:03:43 +04:00
false ,
2006-09-15 22:32:43 +04:00
} ,
{
" initshutdown_InitEx " ,
sizeof ( struct initshutdown_InitEx ) ,
( ndr_push_flags_fn_t ) ndr_push_initshutdown_InitEx ,
( ndr_pull_flags_fn_t ) ndr_pull_initshutdown_InitEx ,
( ndr_print_function_t ) ndr_print_initshutdown_InitEx ,
2007-09-20 00:03:43 +04:00
false ,
2006-09-15 22:32:43 +04:00
} ,
2007-09-20 00:03:43 +04:00
{ NULL , 0 , NULL , NULL , NULL , false }
2006-09-15 22:32:43 +04:00
} ;
2007-09-20 00:03:43 +04:00
static const char * const initshutdown_endpoint_strings [ ] = {
2006-09-15 22:32:43 +04:00
" ncacn_np:[ \\ pipe \\ InitShutdown] " ,
} ;
2007-09-20 00:03:43 +04:00
static const struct ndr_interface_string_array initshutdown_endpoints = {
2006-09-15 22:32:43 +04:00
. count = 1 ,
. names = initshutdown_endpoint_strings
} ;
2007-09-20 00:03:43 +04:00
static const char * const initshutdown_authservice_strings [ ] = {
2006-09-15 22:32:43 +04:00
" host " ,
} ;
2007-09-20 00:03:43 +04:00
static const struct ndr_interface_string_array initshutdown_authservices = {
2006-09-15 22:32:43 +04:00
. count = 1 ,
. names = initshutdown_authservice_strings
} ;
2007-08-20 01:23:28 +04:00
const struct ndr_interface_table ndr_table_initshutdown = {
2006-09-15 22:32:43 +04:00
. name = " initshutdown " ,
. syntax_id = {
{ 0x894de0c0 , 0x0d55 , 0x11d3 , { 0xa3 , 0x22 } , { 0x00 , 0xc0 , 0x4f , 0xa3 , 0x21 , 0xa1 } } ,
2007-08-20 02:10:11 +04:00
NDR_INITSHUTDOWN_VERSION
2006-09-15 22:32:43 +04:00
} ,
2007-08-20 02:10:11 +04:00
. helpstring = NDR_INITSHUTDOWN_HELPSTRING ,
2006-09-15 22:32:43 +04:00
. num_calls = 3 ,
. calls = initshutdown_calls ,
. endpoints = & initshutdown_endpoints ,
. authservices = & initshutdown_authservices
} ;