summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2014-09-25 21:53:46 +0200
committerGünther Deschner <gd@samba.org>2015-07-03 02:00:28 +0200
commitcb8c156671530296b746d8b71fd62e677fa88cd0 (patch)
tree88afbcabead38f042f7944a7eb9c23d1f7482800
parentf3f1c3892596e438c716172c053a016ee4ba464a (diff)
downloadsamba-cb8c156671530296b746d8b71fd62e677fa88cd0.tar.gz
midltests: add valid/midltests_DRS_EXTENSIONS.*
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
-rw-r--r--testprogs/win32/midltests/valid/midltests_DRS_EXTENSIONS.idl64
-rw-r--r--testprogs/win32/midltests/valid/midltests_DRS_EXTENSIONS.out43
2 files changed, 107 insertions, 0 deletions
diff --git a/testprogs/win32/midltests/valid/midltests_DRS_EXTENSIONS.idl b/testprogs/win32/midltests/valid/midltests_DRS_EXTENSIONS.idl
new file mode 100644
index 00000000000..73aeb16d379
--- /dev/null
+++ b/testprogs/win32/midltests/valid/midltests_DRS_EXTENSIONS.idl
@@ -0,0 +1,64 @@
+#ifndef MIDLTESTS_C_CODE
+
+/*
+ * For midltests_tcp.exe you may want to
+ * redirect the traffic via rinetd
+ * with a /etc/rinetd.conf like this:
+ *
+ * 172.31.9.1 5032 172.31.9.8 5032
+ * 172.31.9.1 5064 172.31.9.8 5064
+ *
+ * This is useful to watch the traffic with
+ * a network sniffer.
+ */
+/*
+cpp_quote("#define LISTEN_IP \"0.0.0.0\"")
+cpp_quote("#define FORWARD_IP \"127.0.0.1\"")
+cpp_quote("#define CONNECT_IP \"172.31.9.1\"")
+*/
+
+/*
+ * With midltests_tcp.exe NDR64 is enforced by default.
+ * For testing it might be needed to allow downgrades
+ * to NDR32. This is needed when you use 'pipe'.
+ */
+//cpp_quote("#define DONOT_FORCE_NDR64 1")
+
+[
+ uuid("225b9fcb-eb3d-497b-8b0b-591f049a2507"),
+ pointer_default(unique)
+]
+interface midltests
+{
+
+ typedef struct {
+ [range(1,10000)] long cb;
+ [size_is(cb)] char rcg[];
+ } DRS_EXTENSIONS;
+
+ long midltests_fn(
+ [out] DRS_EXTENSIONS **e
+ );
+}
+
+#elif MIDLTESTS_C_CODE
+
+static void midltests(void)
+{
+ DRS_EXTENSIONS *e = NULL;
+ cli_midltests_fn(&e);
+}
+
+long srv_midltests_fn(DRS_EXTENSIONS **_e)
+{
+ DRS_EXTENSIONS *e;
+ printf("srv_midltests_fn: Start\n");
+ e = (DRS_EXTENSIONS *)malloc(sizeof(DRS_EXTENSIONS) + 0x34);
+ e->cb = 0x34;
+ memset(e->rcg, 0xcd, e->cb);
+ *_e = e;
+ printf("srv_midltests_fn: End\n");
+ return 0x65757254;
+}
+
+#endif
diff --git a/testprogs/win32/midltests/valid/midltests_DRS_EXTENSIONS.out b/testprogs/win32/midltests/valid/midltests_DRS_EXTENSIONS.out
new file mode 100644
index 00000000000..e0b3a0ee338
--- /dev/null
+++ b/testprogs/win32/midltests/valid/midltests_DRS_EXTENSIONS.out
@@ -0,0 +1,43 @@
+Wait for setup of server threads
+
+Test NDR32
+
+ndr32: disable NDR64
+
+ndr32:in => out: ptype[request] flen[24] plen[0] ahint[0]
+
+
+srv_midltests_fn: Start
+srv_midltests_fn: End
+
+ndr32:out => in: ptype[response] flen[92] plen[68] ahint[68]
+
+[000] 00 00 02 00 34 00 00 00 34 00 00 00 CD CD CD CD ....4... 4.......
+[010] CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD ........ ........
+[020] CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD ........ ........
+[030] CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD ........ ........
+[040] 54 72 75 65 True
+
+NDRTcpThread[ndr32] stop
+
+Test NDR64
+
+ndr64: got NDR64
+
+ndr64:in => out: ptype[request] flen[24] plen[0] ahint[0]
+
+
+srv_midltests_fn: Start
+srv_midltests_fn: End
+
+ndr64:out => in: ptype[response] flen[100] plen[76] ahint[76]
+
+[000] 00 00 02 00 00 00 00 00 34 00 00 00 00 00 00 00 ........ 4.......
+[010] 34 00 00 00 CD CD CD CD CD CD CD CD CD CD CD CD 4....... ........
+[020] CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD ........ ........
+[030] CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD ........ ........
+[040] CD CD CD CD CD CD CD CD 54 72 75 65 ........ True
+
+NDRTcpThread[ndr64] stop
+
+Test OK