diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2005-12-27 16:47:09 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:47:49 -0500 |
commit | e748b53e4343fbac00a19e8fc76b42624eb5af02 (patch) | |
tree | bd19a3baa052d404af9452f53ab90ba26244fad2 /source4/librpc/ndr | |
parent | d658de65d32e6746ac51aeb4da7aa74b3da40c2b (diff) | |
download | samba-e748b53e4343fbac00a19e8fc76b42624eb5af02.tar.gz samba-e748b53e4343fbac00a19e8fc76b42624eb5af02.tar.xz samba-e748b53e4343fbac00a19e8fc76b42624eb5af02.zip |
r12513: Similar change as my previous commit, but now for transfer syntaxes.
Avoids converting a static string to GUID every time we check whether
a transfer syntax is equal to that of NDR.
(This used to be commit 8dcfcaf75ab8cf4a54cf5e56f6be25acc68e3989)
Diffstat (limited to 'source4/librpc/ndr')
-rw-r--r-- | source4/librpc/ndr/libndr.h | 2 | ||||
-rw-r--r-- | source4/librpc/ndr/ndr.c | 11 |
2 files changed, 13 insertions, 0 deletions
diff --git a/source4/librpc/ndr/libndr.h b/source4/librpc/ndr/libndr.h index ca660786143..3d8bdf9f36d 100644 --- a/source4/librpc/ndr/libndr.h +++ b/source4/librpc/ndr/libndr.h @@ -278,3 +278,5 @@ typedef NTSTATUS (*ndr_pull_flags_fn_t)(struct ndr_pull *, int ndr_flags, void * typedef void (*ndr_print_fn_t)(struct ndr_print *, const char *, const void *); typedef void (*ndr_print_function_t)(struct ndr_print *, const char *, int, const void *); +extern const struct dcerpc_syntax_id ndr_transfer_syntax; +extern const struct dcerpc_syntax_id ndr64_transfer_syntax; diff --git a/source4/librpc/ndr/ndr.c b/source4/librpc/ndr/ndr.c index 2e6fd5b432b..260d4458708 100644 --- a/source4/librpc/ndr/ndr.c +++ b/source4/librpc/ndr/ndr.c @@ -32,6 +32,17 @@ #define NDR_BASE_MARSHALL_SIZE 1024 +/* this guid indicates NDR encoding in a protocol tower */ +const struct dcerpc_syntax_id ndr_transfer_syntax = { + { 0x8a885d04, 0x1ceb, 0x11c9, {0x9f, 0xe8}, {0x08,0x00,0x2b,0x10,0x48,0x60} }, + 2 +}; + +const struct dcerpc_syntax_id ndr64_transfer_syntax = { + { 0x71710533, 0xbeba, 0x4937, {0x83, 0x19}, {0xb5,0xdb,0xef,0x9c,0xcc,0x36} }, + 1 +}; + /* work out the number of bytes needed to align on a n byte boundary */ |