summaryrefslogtreecommitdiff
path: root/source4/librpc/ndr/ndr_echo.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2003-11-17 11:55:56 +0000
committerAndrew Tridgell <tridge@samba.org>2003-11-17 11:55:56 +0000
commitd285c6f14f7ad7037e1a81d59da8b3c892a49884 (patch)
tree07c6ac5184aef953d5cf82b653f9f56dd6942cfd /source4/librpc/ndr/ndr_echo.c
parentfb53302c8eb32603098b17bcf2fad16af66e9a60 (diff)
downloadsamba-d285c6f14f7ad7037e1a81d59da8b3c892a49884.tar.gz
samba-d285c6f14f7ad7037e1a81d59da8b3c892a49884.tar.bz2
samba-d285c6f14f7ad7037e1a81d59da8b3c892a49884.zip
* add another WERR err code
* use the top-level function argument printing to show more detail in RPC-* tests (This used to be commit 33bb8785625b1845750f28f2d810e7096afe9f8e)
Diffstat (limited to 'source4/librpc/ndr/ndr_echo.c')
-rw-r--r--source4/librpc/ndr/ndr_echo.c118
1 files changed, 118 insertions, 0 deletions
diff --git a/source4/librpc/ndr/ndr_echo.c b/source4/librpc/ndr/ndr_echo.c
index 62a2428792..c3c3f7161b 100644
--- a/source4/librpc/ndr/ndr_echo.c
+++ b/source4/librpc/ndr/ndr_echo.c
@@ -100,3 +100,121 @@ NTSTATUS ndr_pull_TestCall(struct ndr_pull *ndr, struct TestCall *r)
return NT_STATUS_OK;
}
+void ndr_print_echo_AddOne(struct ndr_print *ndr, const char *name, int flags, struct echo_AddOne *r)
+{
+ ndr_print_struct(ndr, name, "echo_AddOne");
+ ndr->depth++;
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "echo_AddOne");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "v", r->in.v);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "v", *r->in.v);
+ ndr->depth--;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "echo_AddOne");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "v", r->out.v);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "v", *r->out.v);
+ ndr->depth--;
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+void ndr_print_echo_EchoData(struct ndr_print *ndr, const char *name, int flags, struct echo_EchoData *r)
+{
+ ndr_print_struct(ndr, name, "echo_EchoData");
+ ndr->depth++;
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "echo_EchoData");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "len", r->in.len);
+ ndr_print_ptr(ndr, "in_data", r->in.in_data);
+ ndr->depth++;
+ ndr_print_array_uint8(ndr, "in_data", r->in.in_data, r->in.len);
+ ndr->depth--;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "echo_EchoData");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "out_data", r->out.out_data);
+ ndr->depth++;
+ ndr_print_array_uint8(ndr, "out_data", r->out.out_data, r->in.len);
+ ndr->depth--;
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+void ndr_print_echo_SinkData(struct ndr_print *ndr, const char *name, int flags, struct echo_SinkData *r)
+{
+ ndr_print_struct(ndr, name, "echo_SinkData");
+ ndr->depth++;
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "echo_SinkData");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "len", r->in.len);
+ ndr_print_ptr(ndr, "data", r->in.data);
+ ndr->depth++;
+ ndr_print_array_uint8(ndr, "data", r->in.data, r->in.len);
+ ndr->depth--;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "echo_SinkData");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+void ndr_print_echo_SourceData(struct ndr_print *ndr, const char *name, int flags, struct echo_SourceData *r)
+{
+ ndr_print_struct(ndr, name, "echo_SourceData");
+ ndr->depth++;
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "echo_SourceData");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "len", r->in.len);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "echo_SourceData");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "data", r->out.data);
+ ndr->depth++;
+ ndr_print_array_uint8(ndr, "data", r->out.data, r->in.len);
+ ndr->depth--;
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+void ndr_print_TestCall(struct ndr_print *ndr, const char *name, int flags, struct TestCall *r)
+{
+ ndr_print_struct(ndr, name, "TestCall");
+ ndr->depth++;
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "TestCall");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "s", r->in.s);
+ ndr->depth++;
+ if (r->in.s) {
+ ndr_print_unistr(ndr, "s", r->in.s);
+ }
+ ndr->depth--;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "TestCall");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+