* 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.
{
RPC_ASYNC_STATE aping;
RPC_ASYNC_STATE afn;
+ RPC_STATUS status = 0;
long ret;
struct msg out1;
unsigned char out1b[3];
struct pipe_structtype_state ins;
ASYNC_pipe_structtype inp;
struct msg in1;
- unsigned char in1b[3000];
+ unsigned char in1b[300];
+ structtype inpb[2500];
+ structtype *outb = NULL;
+ unsigned long outb_size = 0;
+ unsigned long outb_len = 0;
in1.l = sizeof(in1b);
memset(&in1b, 0xAA, sizeof(in1b));
memset(&ins, 0, sizeof(ins));
ins.name = "inp";
- ins.count = 35;
+ ins.count = 0;
memset(&inp, 0, sizeof(inp));
inp.pull = pipe_structtype_pull;
inp.push = pipe_structtype_push;
out1.l = sizeof(out1b);
memset(&out1b, 0xFF, sizeof(out1b));
out1.m = out1b;
-
+#if 0
RpcAsyncInitializeHandle(&aping, sizeof(aping));
cli_midltests_ping(&aping, in1);
+
while (TRUE) {
RPC_STATUS status;
status = RpcAsyncCompleteCall(&aping, &ret);
}
Sleep(100);
}
+#endif
+ ret = 0;
+
+ printf("HERE:%s:%d:%s()\n", __FILE__, __LINE__, __FUNCTION__);
RpcAsyncInitializeHandle(&afn, sizeof(afn));
cli_midltests_fn(&afn, &out1, &outp, &inp, in1);
+#if 0
+ printf("HERE:%s:%d:%s()\n", __FILE__, __LINE__, __FUNCTION__);
+ Sleep(500);
+ memset(inpb, 0xEE, sizeof(inpb));
+ printf("HERE:%s:%d:%s()\n", __FILE__, __LINE__, __FUNCTION__);
+ inp.push(inp.state, inpb, sizeof(inpb));
+ Sleep(500);
+#endif
+ printf("HERE:%s:%d:%s()\n", __FILE__, __LINE__, __FUNCTION__);
+ inp.push(inp.state, inpb, 0);
+ outb_size = 0;
+ do {
+ outp.pull(outp.state, outb, sizeof(outb), &outb_len);
+ Sleep(1000);
+ printf("HERE:%s:%d:%s() %d\n", __FILE__, __LINE__, __FUNCTION__,
+outb_len);
+ outb_size--;
+ } while (outb_len > 0);
while (TRUE) {
- RPC_STATUS status;
- status = RpcAsyncCompleteCall(&aping, &ret);
+ printf("HERE:%s:%d:%s()\n", __FILE__, __LINE__, __FUNCTION__);
+ status = RpcAsyncCompleteCall(&afn, &ret);
if (status != RPC_S_ASYNC_CALL_PENDING) {
break;
}
- Sleep(100);
+ Sleep(2000);
}
+ printf("HERE:%s:%d:%s() %\n",
+ __FILE__, __LINE__, __FUNCTION__,
+ status, ret);
}
void srv_midltests_fn(
fflush(stdout);
} while (inb_len > 0);
- outb_size = 50;
+ outb_size = 0;
do {
outp->alloc(outp->state, outb_size, &outb, &outb_len);
memset(outb, 0xCC, outb_len * sizeof(*outb));