2 * Unix SMB/CIFS implementation.
3 * RPC Pipe client / server routines
4 * Copyright (C) Jim McDonough (jmcd@us.ibm.com) 2003.
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 #define DBGC_CLASS DBGC_RPC_PARSE
26 /*******************************************************************
28 ********************************************************************/
30 void init_shutdown_q_init(SHUTDOWN_Q_INIT
*q_s
, const char *msg
,
31 uint32 timeout
, BOOL do_reboot
, BOOL force
)
37 init_unistr2(&q_s
->uni_msg
, msg
, UNI_FLAGS_NONE
);
38 init_uni_hdr(&q_s
->hdr_msg
, &q_s
->uni_msg
);
40 q_s
->timeout
= timeout
;
42 q_s
->reboot
= do_reboot
? 1 : 0;
43 q_s
->force
= force
? 1 : 0;
46 /*******************************************************************
47 reads or writes a structure.
48 ********************************************************************/
50 BOOL
shutdown_io_q_init(const char *desc
, SHUTDOWN_Q_INIT
*q_s
, prs_struct
*ps
,
56 prs_debug(ps
, depth
, desc
, "shutdown_io_q_init");
62 if (!prs_uint32("ptr_server", ps
, depth
, &(q_s
->ptr_server
)))
64 if (!prs_uint16("server", ps
, depth
, &(q_s
->server
)))
69 if (!prs_uint32("ptr_msg", ps
, depth
, &(q_s
->ptr_msg
)))
72 if (!smb_io_unihdr("hdr_msg", &(q_s
->hdr_msg
), ps
, depth
))
74 if (!smb_io_unistr2("uni_msg", &(q_s
->uni_msg
), q_s
->hdr_msg
.buffer
, ps
, depth
))
79 if (!prs_uint32("timeout", ps
, depth
, &(q_s
->timeout
)))
81 if (!prs_uint8("force ", ps
, depth
, &(q_s
->force
)))
83 if (!prs_uint8("reboot ", ps
, depth
, &(q_s
->reboot
)))
89 /*******************************************************************
90 reads or writes a structure.
91 ********************************************************************/
92 BOOL
shutdown_io_r_init(const char *desc
, SHUTDOWN_R_INIT
* r_s
, prs_struct
*ps
,
98 prs_debug(ps
, depth
, desc
, "shutdown_io_r_init");
104 if(!prs_ntstatus("status", ps
, depth
, &r_s
->status
))
110 /*******************************************************************
112 ********************************************************************/
113 void init_shutdown_q_abort(SHUTDOWN_Q_ABORT
*q_s
)
120 /*******************************************************************
121 reads or writes a structure.
122 ********************************************************************/
123 BOOL
shutdown_io_q_abort(const char *desc
, SHUTDOWN_Q_ABORT
*q_s
,
124 prs_struct
*ps
, int depth
)
129 prs_debug(ps
, depth
, desc
, "shutdown_io_q_abort");
135 if (!prs_uint32("ptr_server", ps
, depth
, &(q_s
->ptr_server
)))
137 if (q_s
->ptr_server
!= 0)
138 if (!prs_uint16("server", ps
, depth
, &(q_s
->server
)))
144 /*******************************************************************
145 reads or writes a structure.
146 ********************************************************************/
147 BOOL
shutdown_io_r_abort(const char *desc
, SHUTDOWN_R_ABORT
*r_s
,
148 prs_struct
*ps
, int depth
)
153 prs_debug(ps
, depth
, desc
, "shutdown_io_r_abort");
159 if (!prs_ntstatus("status", ps
, depth
, &r_s
->status
))