summaryrefslogtreecommitdiff
path: root/librpc
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2009-12-14 14:08:34 +0100
committerStefan Metzmacher <metze@samba.org>2010-02-18 13:43:59 +0100
commitbc20d3446aa6de9f1d21d167c384e9eb4edd55eb (patch)
treeee299afc6fb3cf0d4e89ab39bf1080e863b62703 /librpc
parent494819773d61daa32d4ee2a0a15088f3b4abe6e2 (diff)
downloadsamba-bc20d3446aa6de9f1d21d167c384e9eb4edd55eb.tar.gz
samba-bc20d3446aa6de9f1d21d167c384e9eb4edd55eb.tar.bz2
samba-bc20d3446aa6de9f1d21d167c384e9eb4edd55eb.zip
libndr: add ndr_push_relative_ptr2_start and ndr_push_relative_ptr2_end.
Guenther
Diffstat (limited to 'librpc')
-rw-r--r--librpc/ndr/libndr.h2
-rw-r--r--librpc/ndr/ndr.c24
2 files changed, 26 insertions, 0 deletions
diff --git a/librpc/ndr/libndr.h b/librpc/ndr/libndr.h
index 09e5334aa4..95ccb27912 100644
--- a/librpc/ndr/libndr.h
+++ b/librpc/ndr/libndr.h
@@ -385,6 +385,8 @@ enum ndr_err_code ndr_push_setup_relative_base_offset2(struct ndr_push *ndr, con
enum ndr_err_code ndr_push_relative_ptr1(struct ndr_push *ndr, const void *p);
enum ndr_err_code ndr_push_short_relative_ptr1(struct ndr_push *ndr, const void *p);
enum ndr_err_code ndr_push_relative_ptr2(struct ndr_push *ndr, const void *p);
+enum ndr_err_code ndr_push_relative_ptr2_start(struct ndr_push *ndr, const void *p);
+enum ndr_err_code ndr_push_relative_ptr2_end(struct ndr_push *ndr, const void *p);
enum ndr_err_code ndr_push_short_relative_ptr2(struct ndr_push *ndr, const void *p);
uint32_t ndr_pull_get_relative_base_offset(struct ndr_pull *ndr);
void ndr_pull_restore_relative_base_offset(struct ndr_pull *ndr, uint32_t offset);
diff --git a/librpc/ndr/ndr.c b/librpc/ndr/ndr.c
index a151994b6a..fb1e5671fe 100644
--- a/librpc/ndr/ndr.c
+++ b/librpc/ndr/ndr.c
@@ -1145,6 +1145,30 @@ _PUBLIC_ enum ndr_err_code ndr_push_short_relative_ptr2(struct ndr_push *ndr, co
}
/*
+ push a relative object - stage2 start
+ this is called during buffers processing
+*/
+_PUBLIC_ enum ndr_err_code ndr_push_relative_ptr2_start(struct ndr_push *ndr, const void *p)
+{
+ if (p == NULL) {
+ return NDR_ERR_SUCCESS;
+ }
+ return ndr_push_relative_ptr2(ndr, p);
+}
+
+/*
+ push a relative object - stage2 end
+ this is called during buffers processing
+*/
+_PUBLIC_ enum ndr_err_code ndr_push_relative_ptr2_end(struct ndr_push *ndr, const void *p)
+{
+ if (p == NULL) {
+ return NDR_ERR_SUCCESS;
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+/*
get the current base for relative pointers for the pull
*/
_PUBLIC_ uint32_t ndr_pull_get_relative_base_offset(struct ndr_pull *ndr)