}
struct rpccli_bh_raw_call_state {
+ struct dcerpc_call *call;
DATA_BLOB in_data;
DATA_BLOB out_data;
uint32_t out_flags;
struct rpccli_bh_raw_call_state *state;
bool ok;
struct tevent_req *subreq;
+ bool bigendian = false;
req = tevent_req_create(mem_ctx, &state,
struct rpccli_bh_raw_call_state);
return tevent_req_post(req, ev);
}
- subreq = rpc_api_pipe_req_send(state, ev, hs->rpc_cli,
- opnum, object, &state->in_data);
+ state->call = dcerpc_call_allocate(state,
+ hs->rpc_cli->assoc,
+ hs->rpc_cli->sec,
+ hs->rpc_cli->pres);
+
+ if (in_flags & LIBNDR_FLAG_BIGENDIAN) {
+ bigendian = true;
+ }
+
+ subreq = dcerpc_do_request_send(state, ev, hs->rpc_cli->conn,
+ state->call, object, opnum,
+ &state->in_data, bigendian);
+// subreq = rpc_api_pipe_req_send(state, ev, hs->rpc_cli,
+// opnum, &state->in_data);
if (tevent_req_nomem(subreq, req)) {
return tevent_req_post(req, ev);
}
tevent_req_data(req,
struct rpccli_bh_raw_call_state);
NTSTATUS status;
+ bool bigendian = false;
state->out_flags = 0;
/* TODO: support bigendian responses */
- status = rpc_api_pipe_req_recv(subreq, state, &state->out_data);
+ status = dcerpc_do_request_recv(subreq, state, &state->out_data,
+ &bigendian);
+ //status = rpc_api_pipe_req_recv(subreq, state, &state->out_data);
TALLOC_FREE(subreq);
if (!NT_STATUS_IS_OK(status)) {
tevent_req_nterror(req, status);
return;
}
+ if (bigendian) {
+ state->out_flags |= LIBNDR_FLAG_BIGENDIAN;
+ }
+
tevent_req_done(req);
}