summaryrefslogtreecommitdiffstats
path: root/librpc/ndr/libndr.h
Commit message (Collapse)AuthorAgeFilesLines
* libndr: moved the NDR_* flags to have less overlapAndrew Tridgell2011-09-081-8/+36
| | | | | | | | | | | | | | | | | | | | We have 3 different types of flags values in our NDR layer. We've recently found bugs where these types of flags have been mixed up, especially by people adding hand written ndr code for tricky structures. We previously got away with this because (for example) NDR_SCALARS and NDR_IN had the same value, so mixing up the two concepts sometimes worked. Unfortunately it also led to bugs where we didn't do what was expected, such as in our smbtorture ndr test suite, where passing a ndr_flags value of zero led to only checking that two empty structures were equal. This changes the values of the NDR_IN|NDR_OUT and NDR_SCALARS|NDR_BUFFERS values to be in different bit ranges, and adds macros for checking the validity of passed in flags. A followup patch modifies the ndr calls to use these macros, and pidl to generate them. This should catch misuse of the APIs. Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
* librpc/ndr remove _SAMBA_BUILD_ conditionalsAndrew Bartlett2011-07-061-2/+0
|
* librpc/ndr: add new LIBNDR_FLAG_STR_RAW8 for ndr_pull_stringSean Finney2011-06-011-0/+1
| | | | | | | | | | | | | | | | | | | | Introduce a new flag, LIBNDR_FLAG_STR_RAW8, which indicates that libndr should not attempt to convert the corresponding byte sequence, and place the responsibility on the caller to do so later. This is needed in cases where the string is known to be 8-bit and either NULL terminated or of known length, but in an unspecified character set. For example, when pulling PT_STRING8 properties from an exchange server via libmapi + libndr, the codepage is neither known nor in the control of the caller, and is determined by subsequent properties requested from the server. Therefore the client would like to fetch all properties in one large batch, and convert the resulting strings locally. This commit also includes some (basic) tests of each of the flags' respective behaviors with the ndr push/pull string functions, in a new source4 torture test suite ndr.ndr_string. Signed-off-by: Sean Finney <seanius@seanius.net>
* librpc/ndr Merge ndr_print_sockaddr_storage() into common codeAndrew Bartlett2011-05-181-0/+3
| | | | | | | There is no longer a reason to leave this source3 specific, and this brings it into a library (avoiding duplicate symbols). Andrew Bartlett
* librpc/ndr: add ndr_push_pipe_chunk_trailer() and ndr_check_pipe_chunk_trailer()Stefan Metzmacher2011-03-101-0/+2
| | | | metze
* librpc/ndr: add ndr_interface_call_pipeStefan Metzmacher2011-03-101-0/+16
| | | | metze
* pidl Add support for uid_t and gid_t typesAndrew Bartlett2011-03-011-0/+2
| | | | | | | | | These are mapped to uint64_t, which should be big enough. This is proposed to be used for internal Samba representations, where it would be more painful to convert all the callers to an uint64_t calling convention. Andrew Bartlett
* libndr: remove prototype for nonexisting function ndr_print_ipv4_addr().Günther Deschner2011-02-171-1/+0
| | | | Guenther
* libndr: apply some const and make is_valid_policy_hnd a callback to ↵Günther Deschner2011-02-081-1/+1
| | | | | | policy_handle_empty. Guenther
* libndr: share some uuid helpers.Günther Deschner2011-02-081-0/+3
| | | | | | | Guenther Autobuild-User: Günther Deschner <gd@samba.org> Autobuild-Date: Tue Feb 8 09:52:56 CET 2011 on sn-devel-104
* ndr: merge ndr_map_error2string and ndr_errstr.Günther Deschner2011-02-081-0/+1
| | | | Guenther
* ndr: move null_ndr_syntax_id to the common libndr location.Günther Deschner2011-02-081-0/+1
| | | | Guenther
* libndr: move ndr_print_bool to ndr_basic.cGünther Deschner2011-01-251-0/+2
| | | | Guenther
* librpc Make ndrdump use printf() rather than having to mess with DEBUG()Andrew Bartlett2010-10-271-0/+1
| | | | | | | | This means it no longer needs to force the debug level etc. (this builds on the fine work by Volker to create dump_data_cb()) Andrew Bartlett
* ndr dns: Add simple parserKai Blin2010-10-231-0/+1
|
* Revert "libndr: fix "excess elements in struct initializer" warning."Günther Deschner2010-10-051-1/+0
| | | | This reverts commit a416ff26d6ada4ee96bf3963866f67d5788162d1.
* libndr: fix "excess elements in struct initializer" warning.Günther Deschner2010-10-051-0/+1
| | | | Guenther
* ndr: Implement push function for IPv6 addressesKai Blin2010-10-041-0/+1
| | | | | Thanks to Julien Kerihuel for providing the patch that pushed me to finish my own IPv6 patches.
* ndr: Add support for pulling/printing an ipv6address typeKai Blin2010-10-041-0/+1
|
* librpc/ndr: remove 'async' from ndr_interface_callStefan Metzmacher2010-09-281-1/+0
| | | | metze
* pidl: prevent ndr_print_*() dying on NULL pointersAndrew Tridgell2010-09-161-0/+1
| | | | | when using ndrdump you can get uninitialised structures containing pointers. Don't segfault when trying to print them
* ndr: allow ndr_print to print DATA_BLOBAndrew Tridgell2010-08-141-0/+1
| | | | | | this prints DATA_BLOB structures using the ndr->print() calls Signed-off-by: Andrew Bartlett <abartlet@samba.org>
* libndr: add support for relative_rap_convert.Günther Deschner2010-05-271-0/+1
| | | | | | | | Will not harm anyone, is only used for rare short (2byte) relative pointers, and relative_rap_convert is always 0 so far (as all init functions using struct ndr_pull will zero the struct). Guenther
* Finish removal of iconv_convenience in public API's.Jelmer Vernooij2010-05-181-15/+10
|
* libndr: implement LIBNDR_RELATIVE_REVERSE handlingStefan Metzmacher2010-02-181-0/+1
| | | | | | This is based on Guenther's initial code. metze
* libndr: store a subcontext buffer size in ndr_push_subcontext_start.Günther Deschner2010-02-181-0/+1
| | | | Guenther
* libndr: add LIBNDR_FLAG_NO_RELATIVE_REVERSE so that relative reverse processingGünther Deschner2010-02-181-0/+3
| | | | | | can be disabled for single structure elements. Guenther
* libndr: add LIBNDR_FLAG_RELATIVE_REVERSE flag.Günther Deschner2010-02-181-0/+2
| | | | Guenther
* librpc/ndr: make ndr_push_relative_ptr2() staticStefan Metzmacher2010-02-181-1/+0
| | | | metze
* libndr: add ndr_push_relative_ptr2_start and ndr_push_relative_ptr2_end.Günther Deschner2010-02-181-0/+2
| | | | Guenther
* librpc/ndr: avoid comparison_fn_t to fix the openchange build on solarisBrian Lu2009-12-141-1/+1
| | | | Signed-off-by: Stefan Metzmacher <metze@samba.org>
* librpc/ndr: add missing prototypes for relative_short functionsStefan Metzmacher2009-12-141-0/+3
| | | | metze
* libndr: added a GUID_to_ndr_blob() helper functionAndrew Tridgell2009-12-101-0/+1
| | | | This can be used in many places that deal with GUIDs
* librpc: split out a separate GUID_from_ndr_blob() functionAndrew Tridgell2009-12-101-0/+1
| | | | | This will simplify many of the places that deal with NDR formatted GUIDs
* librpc/ndr: remember the highest offset we parsed with relative pointer buffersStefan Metzmacher2009-11-201-0/+1
| | | | | | ndr_*_pull_blob_all() will now work if relative pointers are used. metze
* pidl: get the alignment right for uint1632 enums (NDR64)Andrew Tridgell2009-10-071-0/+3
| | | | | The default enum in NDR63 is 32 bits, not 16 bits. We need a uint1632 type to get the alignment right.
* libndr: add int3264 ndr prototype.Günther Deschner2009-10-051-0/+1
| | | | Guenther
* ndr64: added support for trailing gap alignmentAndrew Tridgell2009-10-021-0/+2
| | | | | | | NDR64 has a 'trailing gap' alignment, which aligns the end of a structure on the overall structure alignment. This explains the discrepancy we had with the RPC-SAMR test and NDR64
* pidl: added union padding for NDR64Andrew Tridgell2009-09-291-0/+2
| | | | This fixes the problem with samr UserInfo16 when NDR64 is enabled
* ndr: split out ndr enum functionsAndrew Tridgell2009-09-171-0/+7
| | | | This allows for easier implementation of the NDR32/NDR64 split
* ndr: added support for NDR64 Andrew Tridgell2009-09-171-13/+14
| | | | This adds NDR64 support for the push functions in libndr
* ndr: added --ndr64 flag to ndrdumpAndrew Tridgell2009-09-161-0/+3
| | | | | This only does pull, but it is useful for w2k8-r2 <-> w2k8-r2 ndrdump usage, which is always 64bit.
* s4-ndr: fixed memory leaks in ndr_pull_*_blob()Andrew Tridgell2009-09-121-0/+10
| | | | We needed to free the ndr structures, both on error and normal return
* libndr: add missing protoypes for double type.Günther Deschner2009-08-241-0/+1
| | | | Guenther
* when we get an NDR error in the logs, it is useful to know where it happenedAndrew Tridgell2009-08-121-1/+1
|
* librpc: add ndr_size_string_array().Günther Deschner2009-02-031-0/+1
| | | | Guenther
* Add function for mapping NDR error codes to strings.Jelmer Vernooij2009-01-261-0/+1
|
* Add iconv_convenience argument to size functions.Jelmer Vernooij2009-01-011-2/+3
|
* librpc/ndr: add GUID_hexstring()Stefan Metzmacher2008-11-161-0/+1
| | | | metze
* Add a new function to parse a DATA_BLOB into a GUIDAndrew Bartlett2008-11-161-0/+1
| | | | | | | The reason for this new function is to ensure the length is not discarded when the input is a ldb_val (aka DATA_BLOB) in ldb. Andrew Bartlett