/* parser auto-generated by pidl */ #include "includes.h" NTSTATUS ndr_push_echo_AddOne(struct ndr_push *ndr, struct echo_AddOne *r) { NDR_CHECK(ndr_push_uint32(ndr, *r->in.v)); return NT_STATUS_OK; } NTSTATUS ndr_push_echo_EchoData(struct ndr_push *ndr, struct echo_EchoData *r) { NDR_CHECK(ndr_push_uint32(ndr, r->in.len)); if (r->in.in_data) { NDR_CHECK(ndr_push_uint32(ndr, r->in.len)); NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.in_data, r->in.len)); } return NT_STATUS_OK; } NTSTATUS ndr_push_echo_SinkData(struct ndr_push *ndr, struct echo_SinkData *r) { NDR_CHECK(ndr_push_uint32(ndr, r->in.len)); if (r->in.data) { NDR_CHECK(ndr_push_uint32(ndr, r->in.len)); NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.data, r->in.len)); } return NT_STATUS_OK; } NTSTATUS ndr_push_echo_SourceData(struct ndr_push *ndr, struct echo_SourceData *r) { NDR_CHECK(ndr_push_uint32(ndr, r->in.len)); return NT_STATUS_OK; } NTSTATUS ndr_push_TestCall(struct ndr_push *ndr, struct TestCall *r) { NDR_CHECK(ndr_push_ptr(ndr, r->in.s)); if (r->in.s) { NDR_CHECK(ndr_push_unistr(ndr, r->in.s)); } return NT_STATUS_OK; } NTSTATUS ndr_pull_echo_AddOne(struct ndr_pull *ndr, struct echo_AddOne *r) { NDR_CHECK(ndr_pull_uint32(ndr, r->out.v)); return NT_STATUS_OK; } NTSTATUS ndr_pull_echo_EchoData(struct ndr_pull *ndr, struct echo_EchoData *r) { if (r->out.out_data) { { uint32 _array_size; NDR_CHECK(ndr_pull_uint32(ndr, &_array_size)); if (r->in.len > _array_size) { return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should be %u", _array_size, r->in.len); } } NDR_ALLOC_N_SIZE(ndr, r->out.out_data, r->in.len, sizeof(r->out.out_data[0])); NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.out_data, r->in.len)); } return NT_STATUS_OK; } NTSTATUS ndr_pull_echo_SinkData(struct ndr_pull *ndr, struct echo_SinkData *r) { return NT_STATUS_OK; } NTSTATUS ndr_pull_echo_SourceData(struct ndr_pull *ndr, struct echo_SourceData *r) { if (r->out.data) { { uint32 _array_size; NDR_CHECK(ndr_pull_uint32(ndr, &_array_size)); if (r->in.len > _array_size) { return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should be %u", _array_size, r->in.len); } } NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.data, r->in.len)); } return NT_STATUS_OK; } NTSTATUS ndr_pull_TestCall(struct ndr_pull *ndr, struct TestCall *r) { return NT_STATUS_OK; }