2 * Unix SMB/CIFS implementation.
4 * RPC Pipe client / server routines
6 * Copyright (C) Tim Potter 2003
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
26 #define DBGC_CLASS DBGC_RPC_PARSE
28 void init_echo_q_add_one(ECHO_Q_ADD_ONE *q_d, uint32 request)
30 q_d->request = request;
33 BOOL echo_io_q_add_one(const char *desc, ECHO_Q_ADD_ONE *q_d,
34 prs_struct *ps, int depth)
36 if (!prs_uint32("request", ps, 0, &q_d->request))
42 BOOL echo_io_r_add_one(const char *desc, ECHO_R_ADD_ONE *q_d,
43 prs_struct *ps, int depth)
45 if (!prs_uint32("response", ps, 0, &q_d->response))
52 void init_echo_q_echo_data(ECHO_Q_ECHO_DATA *q_d, uint32 size, char *data)
58 BOOL echo_io_q_echo_data(const char *desc, ECHO_Q_ECHO_DATA *q_d,
59 prs_struct *ps, int depth)
61 if (!prs_uint32("size", ps, depth, &q_d->size))
64 if (!prs_uint32("size", ps, depth, &q_d->size))
67 if (UNMARSHALLING(ps)) {
68 q_d->data = PRS_ALLOC_MEM(ps, char, q_d->size);
74 if (!prs_uint8s(False, "data", ps, depth, (unsigned char *)q_d->data, q_d->size))
80 BOOL echo_io_r_echo_data(const char *desc, ECHO_R_ECHO_DATA *q_d,
81 prs_struct *ps, int depth)
83 if (!prs_uint32("size", ps, 0, &q_d->size))
86 if (UNMARSHALLING(ps)) {
87 q_d->data = PRS_ALLOC_MEM(ps, char, q_d->size);
93 if (!prs_uint8s(False, "data", ps, depth, (unsigned char *)q_d->data, q_d->size))
99 void init_echo_q_sink_data(ECHO_Q_SINK_DATA *q_d, uint32 size, char *data)
105 BOOL echo_io_q_sink_data(const char *desc, ECHO_Q_SINK_DATA *q_d,
106 prs_struct *ps, int depth)
108 if (!prs_uint32("size", ps, depth, &q_d->size))
111 if (!prs_uint32("size", ps, depth, &q_d->size))
114 if (UNMARSHALLING(ps)) {
115 q_d->data = PRS_ALLOC_MEM(ps, char, q_d->size);
121 if (!prs_uint8s(False, "data", ps, depth, (unsigned char *)q_d->data, q_d->size))
127 BOOL echo_io_r_sink_data(const char *desc, ECHO_R_SINK_DATA *q_d,
128 prs_struct *ps, int depth)
133 void init_echo_q_source_data(ECHO_Q_SOURCE_DATA *q_d, uint32 size)
138 BOOL echo_io_q_source_data(const char *desc, ECHO_Q_SOURCE_DATA *q_d,
139 prs_struct *ps, int depth)
141 if (!prs_uint32("size", ps, depth, &q_d->size))
147 BOOL echo_io_r_source_data(const char *desc, ECHO_R_SOURCE_DATA *q_d,
148 prs_struct *ps, int depth)
150 if (!prs_uint32("size", ps, 0, &q_d->size))
153 if (UNMARSHALLING(ps)) {
154 q_d->data = PRS_ALLOC_MEM(ps, char, q_d->size);
160 if (!prs_uint8s(False, "data", ps, depth, (unsigned char *)q_d->data, q_d->size))