summaryrefslogtreecommitdiff
path: root/source3/librpc/ndr
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2007-01-31 11:48:14 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:17:33 -0500
commit8bfa9351614115ceb8bfaa6f76355ddc14ec248b (patch)
treed74dcfe5ed206d06f2c036d81a45f094013619b2 /source3/librpc/ndr
parent05f298b47e4493ccf04b8a1698c0593c8a0deaac (diff)
downloadsamba-8bfa9351614115ceb8bfaa6f76355ddc14ec248b.tar.gz
samba-8bfa9351614115ceb8bfaa6f76355ddc14ec248b.tar.bz2
samba-8bfa9351614115ceb8bfaa6f76355ddc14ec248b.zip
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)
Diffstat (limited to 'source3/librpc/ndr')
-rw-r--r--source3/librpc/ndr/ndr_misc.c33
1 files changed, 33 insertions, 0 deletions
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--;
+}