/* push a uint3264 */ _PUBLIC_ enum ndr_err_code ndr_push_uint3264(struct ndr_push *ndr, int ndr_flags, uint32_t v) { if (unlikely(ndr->flags & LIBNDR_FLAG_NDR64)) { return ndr_push_hyper(ndr, ndr_flags, v); } return ndr_push_uint32(ndr, ndr_flags, v); }
/* push a NTTIME_1sec */ _PUBLIC_ enum ndr_err_code ndr_push_NTTIME_1sec(struct ndr_push *ndr, int ndr_flags, NTTIME t) { NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags); t /= 10000000; NDR_CHECK(ndr_push_hyper(ndr, ndr_flags, t)); return NDR_ERR_SUCCESS; }
_PUBLIC_ enum ndr_err_code ndr_push_timeval(struct ndr_push *ndr, int ndr_flags, const struct timeval *t) { NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags); NDR_CHECK(ndr_push_hyper(ndr, ndr_flags, t->tv_sec)); NDR_CHECK(ndr_push_uint32(ndr, ndr_flags, t->tv_usec)); return NDR_ERR_SUCCESS; }
static enum ndr_err_code ndr_push_STRUCT_echo_info4(struct ndr_push *ndr, int ndr_flags, const struct echo_info4 *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 8)); NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->v)); } if (ndr_flags & NDR_BUFFERS) { } return NDR_ERR_SUCCESS; }
_PUBLIC_ enum ndr_err_code ndr_push_pipe_chunk_trailer(struct ndr_push *ndr, int ndr_flags, uint32_t count) { if (ndr->flags & LIBNDR_FLAG_NDR64) { int64_t tmp = 0 - (int64_t)count; uint64_t ncount = tmp; NDR_CHECK(ndr_push_hyper(ndr, ndr_flags, ncount)); } return NDR_ERR_SUCCESS; }
_PUBLIC_ enum ndr_err_code ndr_push_PERF_DATA_BLOCK(struct ndr_push *ndr, int ndr_flags, const struct PERF_DATA_BLOCK *r) { uint32_t cntr_Signature_0; uint32_t cntr_objects_0; if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 8)); for (cntr_Signature_0 = 0; cntr_Signature_0 < 4; cntr_Signature_0++) { NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->Signature[cntr_Signature_0])); } NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->LittleEndian)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->Version)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->Revision)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->TotalByteLength)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->HeaderLength)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->NumObjectTypes)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->DefaultObject)); NDR_CHECK(ndr_push_SYSTEMTIME(ndr, NDR_SCALARS, &r->SystemTime)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->Padding)); NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->PerfTime)); NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->PerfFreq)); NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->PerfTime100nSec)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->SystemNameLength)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->SystemNameOffset)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->data)); for (cntr_objects_0 = 0; cntr_objects_0 < r->NumObjectTypes; cntr_objects_0++) { NDR_CHECK(ndr_push_PERF_OBJECT_TYPE(ndr, NDR_SCALARS, &r->objects[cntr_objects_0])); } NDR_CHECK(ndr_push_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { if (r->data) { NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, *r->data)); } for (cntr_objects_0 = 0; cntr_objects_0 < r->NumObjectTypes; cntr_objects_0++) { NDR_CHECK(ndr_push_PERF_OBJECT_TYPE(ndr, NDR_BUFFERS, &r->objects[cntr_objects_0])); } } return NDR_ERR_SUCCESS; }
_PUBLIC_ enum ndr_err_code ndr_push_PERF_OBJECT_TYPE(struct ndr_push *ndr, int ndr_flags, const struct PERF_OBJECT_TYPE *r) { uint32_t cntr_counters_0; uint32_t cntr_instances_0; if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 8)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->TotalByteLength)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->DefinitionLength)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->HeaderLength)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ObjectNameTitleIndex)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ObjectNameTitlePointer)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ObjectHelpTitleIndex)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ObjectHelpTitlePointer)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->DetailLevel)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->NumCounters)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->DefaultCounter)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->NumInstances)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->CodePage)); NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->PerfTime)); NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->PerfFreq)); for (cntr_counters_0 = 0; cntr_counters_0 < r->NumCounters; cntr_counters_0++) { NDR_CHECK(ndr_push_PERF_COUNTER_DEFINITION(ndr, NDR_SCALARS, &r->counters[cntr_counters_0])); } for (cntr_instances_0 = 0; cntr_instances_0 < r->NumInstances; cntr_instances_0++) { NDR_CHECK(ndr_push_PERF_INSTANCE_DEFINITION(ndr, NDR_SCALARS, &r->instances[cntr_instances_0])); } NDR_CHECK(ndr_push_PERF_COUNTER_BLOCK(ndr, NDR_SCALARS, &r->counter_data)); NDR_CHECK(ndr_push_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { for (cntr_instances_0 = 0; cntr_instances_0 < r->NumInstances; cntr_instances_0++) { NDR_CHECK(ndr_push_PERF_INSTANCE_DEFINITION(ndr, NDR_BUFFERS, &r->instances[cntr_instances_0])); } } return NDR_ERR_SUCCESS; }
/* push a NTTIME_hyper */ _PUBLIC_ enum ndr_err_code ndr_push_NTTIME_hyper(struct ndr_push *ndr, int ndr_flags, NTTIME t) { NDR_CHECK(ndr_push_hyper(ndr, ndr_flags, t)); return NDR_ERR_SUCCESS; }
/* push a gid_t */ _PUBLIC_ enum ndr_err_code ndr_push_gid_t(struct ndr_push *ndr, int ndr_flags, gid_t g) { NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags); return ndr_push_hyper(ndr, NDR_SCALARS, (uint64_t)g); }
static enum ndr_err_code ndr_push_RemoteActivation(struct ndr_push *ndr, int flags, const struct RemoteActivation *r) { uint32_t cntr_pIIDs_1; uint32_t cntr_protseq_0; uint32_t cntr_ifaces_0; uint32_t cntr_results_0; if (flags & NDR_IN) { NDR_CHECK(ndr_push_ORPCTHIS(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.this_object)); NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->in.Clsid)); if (r->in.pwszObjectName == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pwszObjectName, CH_UTF16))); NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0)); NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pwszObjectName, CH_UTF16))); NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pwszObjectName, ndr_charset_length(r->in.pwszObjectName, CH_UTF16), sizeof(uint16_t), CH_UTF16)); if (r->in.pObjectStorage == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } NDR_CHECK(ndr_push_MInterfacePointer(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.pObjectStorage)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.ClientImpLevel)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.Mode)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.Interfaces)); if (r->in.pIIDs == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.Interfaces)); for (cntr_pIIDs_1 = 0; cntr_pIIDs_1 < r->in.Interfaces; cntr_pIIDs_1++) { NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->in.pIIDs[cntr_pIIDs_1])); } NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.num_protseqs)); NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.num_protseqs)); for (cntr_protseq_0 = 0; cntr_protseq_0 < r->in.num_protseqs; cntr_protseq_0++) { NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.protseq[cntr_protseq_0])); } } if (flags & NDR_OUT) { if (r->out.that == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } NDR_CHECK(ndr_push_ORPCTHAT(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.that)); if (r->out.pOxid == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, *r->out.pOxid)); if (r->out.pdsaOxidBindings == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } NDR_CHECK(ndr_push_DUALSTRINGARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.pdsaOxidBindings)); if (r->out.ipidRemUnknown == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, r->out.ipidRemUnknown)); if (r->out.AuthnHint == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.AuthnHint)); if (r->out.ServerVersion == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } NDR_CHECK(ndr_push_COMVERSION(ndr, NDR_SCALARS, r->out.ServerVersion)); if (r->out.hr == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, *r->out.hr)); NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.Interfaces)); for (cntr_ifaces_0 = 0; cntr_ifaces_0 < r->in.Interfaces; cntr_ifaces_0++) { if (r->out.ifaces[cntr_ifaces_0] == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } } for (cntr_ifaces_0 = 0; cntr_ifaces_0 < r->in.Interfaces; cntr_ifaces_0++) { NDR_CHECK(ndr_push_MInterfacePointer(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ifaces[cntr_ifaces_0])); } NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.Interfaces)); for (cntr_results_0 = 0; cntr_results_0 < r->in.Interfaces; cntr_results_0++) { NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.results[cntr_results_0])); } NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; }