summaryrefslogtreecommitdiff
path: root/source4/librpc/ndr/libndr.h
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-08-12 05:15:41 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:57:54 -0500
commite2357c67f5afbfeacafab6997b57ea262cd3c05a (patch)
treef003a9ce63846a5ce8340b366df502d8bf49c381 /source4/librpc/ndr/libndr.h
parentfa8d37adae70a5f479262b722e47aa7fc21aaf5c (diff)
downloadsamba-e2357c67f5afbfeacafab6997b57ea262cd3c05a.tar.gz
samba-e2357c67f5afbfeacafab6997b57ea262cd3c05a.tar.bz2
samba-e2357c67f5afbfeacafab6997b57ea262cd3c05a.zip
r1757: much simpler (and smaller, faster etc) way of doing relative pointers
in pidl. This mechanism should be much easier to extend to the "retrospective subcontexts" that jelmer needs. also produced more standards complient full-pointer offsets. This keeps ethereal happy with decoding our epmapper frames. (This used to be commit ecb7378bbcd86727aedfa04a9e302e06b0a2ccd9)
Diffstat (limited to 'source4/librpc/ndr/libndr.h')
-rw-r--r--source4/librpc/ndr/libndr.h31
1 files changed, 14 insertions, 17 deletions
diff --git a/source4/librpc/ndr/libndr.h b/source4/librpc/ndr/libndr.h
index 57d9766811..7ab5de52fa 100644
--- a/source4/librpc/ndr/libndr.h
+++ b/source4/librpc/ndr/libndr.h
@@ -23,15 +23,15 @@
*/
-/* offset lists are used to allow a push/pull function to find the
- start of an encapsulating structure */
-struct ndr_ofs_list {
- uint32_t offset;
- uint32_t base;
- struct ndr_ofs_list *next;
+/*
+ this is used by the token store/retrieve code
+*/
+struct ndr_token_list {
+ struct ndr_token_list *next, *prev;
+ const void *key;
+ uint32_t value;
};
-
/* this is the base structure passed to routines that
parse MSRPC formatted data
@@ -47,9 +47,11 @@ struct ndr_pull {
uint32_t offset;
TALLOC_CTX *mem_ctx;
- /* this points at a list of offsets to the structures being processed.
- The first element in the list is the current structure */
- struct ndr_ofs_list *ofs_list;
+ struct ndr_token_list *relative_list;
+
+ /* this is used to ensure we generate unique reference IDs
+ between request and reply */
+ uint32_t ptr_count;
};
struct ndr_pull_save {
@@ -66,15 +68,10 @@ struct ndr_push {
uint32_t offset;
TALLOC_CTX *mem_ctx;
+ struct ndr_token_list *relative_list;
+
/* this is used to ensure we generate unique reference IDs */
uint32_t ptr_count;
-
- /* this points at a list of offsets to the structures being processed.
- The first element in the list is the current structure */
- struct ndr_ofs_list *ofs_list;
-
- /* this list is used by the [relative] code to find the offsets */
- struct ndr_ofs_list *relative_list, *relative_list_end;
};
struct ndr_push_save {