summaryrefslogtreecommitdiff
path: root/librpc
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2010-02-09 18:27:37 +0100
committerStefan Metzmacher <metze@samba.org>2010-02-18 13:44:02 +0100
commita2c34296fa6ca2ffb69cb69698a9b5f81803e8a8 (patch)
treecd949bb8e3f9076224a906d39316844e7d3cb694 /librpc
parentee13a51b0514ec3ac4ca9c532c2b101a08ec9784 (diff)
downloadsamba-a2c34296fa6ca2ffb69cb69698a9b5f81803e8a8.tar.gz
samba-a2c34296fa6ca2ffb69cb69698a9b5f81803e8a8.tar.bz2
samba-a2c34296fa6ca2ffb69cb69698a9b5f81803e8a8.zip
libndr: add LIBNDR_FLAG_NO_RELATIVE_REVERSE so that relative reverse processing
can be disabled for single structure elements. Guenther
Diffstat (limited to 'librpc')
-rw-r--r--librpc/idl/idl_types.h1
-rw-r--r--librpc/ndr/libndr.h3
-rw-r--r--librpc/ndr/ndr.c3
3 files changed, 7 insertions, 0 deletions
diff --git a/librpc/idl/idl_types.h b/librpc/idl/idl_types.h
index 193a1f612f..3c6c12cd84 100644
--- a/librpc/idl/idl_types.h
+++ b/librpc/idl/idl_types.h
@@ -69,3 +69,4 @@
#define NDR_PAHEX LIBNDR_PRINT_ARRAY_HEX
#define NDR_RELATIVE_REVERSE LIBNDR_FLAG_RELATIVE_REVERSE
+#define NDR_NO_RELATIVE_REVERSE LIBNDR_FLAG_NO_RELATIVE_REVERSE
diff --git a/librpc/ndr/libndr.h b/librpc/ndr/libndr.h
index 39ae25f7e6..124c5f0d6e 100644
--- a/librpc/ndr/libndr.h
+++ b/librpc/ndr/libndr.h
@@ -124,6 +124,9 @@ struct ndr_print {
#define LIBNDR_FLAG_STR_UTF8 (1<<12)
#define LIBNDR_STRING_FLAGS (0x7FFC)
+/* set if relative pointers should *not* be marshalled in reverse order */
+#define LIBNDR_FLAG_NO_RELATIVE_REVERSE (1<<18)
+
/* set if relative pointers are marshalled in reverse order */
#define LIBNDR_FLAG_RELATIVE_REVERSE (1<<19)
diff --git a/librpc/ndr/ndr.c b/librpc/ndr/ndr.c
index 80025d71f0..4e584e102b 100644
--- a/librpc/ndr/ndr.c
+++ b/librpc/ndr/ndr.c
@@ -367,6 +367,9 @@ _PUBLIC_ void ndr_set_flags(uint32_t *pflags, uint32_t new_flags)
if (new_flags & LIBNDR_ALIGN_FLAGS) {
(*pflags) &= ~LIBNDR_FLAG_REMAINING;
}
+ if (new_flags & LIBNDR_FLAG_NO_RELATIVE_REVERSE) {
+ (*pflags) &= ~LIBNDR_FLAG_RELATIVE_REVERSE;
+ }
(*pflags) |= new_flags;
}