From 8bfa9351614115ceb8bfaa6f76355ddc14ec248b Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Wed, 31 Jan 2007 11:48:14 +0000 Subject: r21074: Preparation for the import of samba4 notify: Add the file notify.idl and the resulting marshalling/unmarshalling routines in gen_ndr/ Volker (This used to be commit a2ea54c23456925a8ed317edb1adf82d074041fc) --- source3/librpc/ndr/ndr_misc.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'source3/librpc/ndr') diff --git a/source3/librpc/ndr/ndr_misc.c b/source3/librpc/ndr/ndr_misc.c index 0be13eec33..54face8d7a 100644 --- a/source3/librpc/ndr/ndr_misc.c +++ b/source3/librpc/ndr/ndr_misc.c @@ -237,3 +237,36 @@ void ndr_print_policy_handle(struct ndr_print *ndr, const char *name, const stru ndr_print_GUID(ndr, "uuid", &r->uuid); ndr->depth--; } + +NTSTATUS ndr_push_server_id(struct ndr_push *ndr, int ndr_flags, const struct server_id *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, + (uint32_t)r->id.pid)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_server_id(struct ndr_pull *ndr, int ndr_flags, struct server_id *r) +{ + if (ndr_flags & NDR_SCALARS) { + uint32_t pid; + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &pid)); + r->id.pid = (pid_t)pid; + } + if (ndr_flags & NDR_BUFFERS) { + } + return NT_STATUS_OK; +} + +void ndr_print_server_id(struct ndr_print *ndr, const char *name, const struct server_id *r) +{ + ndr_print_struct(ndr, name, "server_id"); + ndr->depth++; + ndr_print_uint32(ndr, "id", (uint32_t)r->id.pid); + ndr->depth--; +} -- cgit