summaryrefslogtreecommitdiff
path: root/source4/librpc/ndr/libndr.h
AgeCommit message (Collapse)AuthorFilesLines
2007-10-10r10869: add dummy functions and dummy parsing of XPRESS decompression,Stefan Metzmacher1-1/+2
this is the compression algorithm used by w2k3 for DsGetNCChanges(). This algorithm isn't known yet, but it seems to be some sort of Lempel-Ziv algorithm. metze (This used to be commit 694252b6e02e365ae5baffb76cdbc89eec5358e7)
2007-10-10r9373: - create a hierachical memory tree with recursiv ndr_pull_* functionsStefan Metzmacher1-12/+32
- with this it's also possible to talloc_free() the ndr_pull structure and talloc_steal(ndr->current_mem_ctx); to fetch the whole data of the hierachical tree - if the toplevel struct is a valid talloc pointer it's also possible to use NDR_PULL_SET_MEM_CTX(ndr, mem_ctx); to the the toplevel pointer with the struct pointer (NOTE: no callers are using this yet, but they shortly will) metze (This used to be commit 1a2b8369586642cc9bc15d015c1e4256c3a92732)
2007-10-10r8500: greatly reduce the number of build warnings on x86-64 (every NDR macroAndrew Tridgell1-5/+5
in the generated code from pidl generated a warning) (This used to be commit 22f7fd76343646a149937fcdc891a98a516bf820)
2007-10-10r8227: add STR_LARGE_SIZE flag, to support strings where the size is length+1,Stefan Metzmacher1-1/+2
metze (This used to be commit cdd03fe87d0120ab3e18566bfc20df5955f9fb3c)
2007-10-10r8212: fix pushing of nbt_string's:Stefan Metzmacher1-0/+1
- we now use an ndr_token_list, for the nbt string label pointer offsets this avoids to scan the whole buffer - we need to check for already send string on a per component basis not only for the fullname e.g. w2k3 response this in the CLDAP netlogon replies forest: w2k3.vmnet1.vm.base dns_name: sub1. pdc_dns_name: w2k3-104. and this will be interpreted like forest: w2k3.vmnet1.vm.base dns_name: sub1.w2k3.vmnet1.vm.base pdc_dns_name: w2k3-104.w2k3.vmnet1.vm.base metze (This used to be commit d18303a0e27643285ffaf100eeddea2f9555c9db)
2007-10-10r8148: - make the PAC generation code a bit more readable and add some outof ↵Stefan Metzmacher1-0/+2
memory checks - move to handmodified pull/push code for PAC_BUFFER to get the _ndr_size field and the subcontext size right - after looking closely to the sample w2k3 PAC in our torture test (and some more in my archive) I found out that the first uint32 before the netr_SamInfo3 was also a pointer, (and we passed a NULL pointer there before, so I think that was the reason why the windows clients doesn't want our PAC) w2k3 uses this for unique pointers: ptr = ndr->ptr_count * 4; ptr |= 0x00020000; ndr->ptr_count; - do one more pull/push round with the sample PAC metze (This used to be commit 0eee17941595e9842a264bf89ac73ca66cea7ed5)
2007-10-10r7865: changed pidl to take a "const void *" instead of a "void *" for theAndrew Tridgell1-4/+3
structure in ndr_push_*() and ndr_print_*(). The push and print functions really should not modify the structure. metze, to make this work I had to change your spoolss hand marshaller. Can you please check it is OK? I think that the IN and OUT sides of that function are not ever called on the same structure, so I think that attempt at remembering the value by assigning to r->in._offered was not doing anything anyway, but please correct me if I have misunderstood it. If you really do need to remember something on those structures I'd suggest the ndr_token_store() and ndr_token_retrieve() functions, which are used by pidl for just this sort of thing. (This used to be commit eee528be97fa43ca53bdc5652b4d29a0a2caf563)
2007-10-10r7186: add [relative_base] property, which is allowed on typedef'sStefan Metzmacher1-0/+6
(maybe we could add them to elements latter...) with this property all relative pointers from inside the struct or union are relative to the struct/union start metze (This used to be commit c0dd18326c058e3e218d43f48ecff418f4b0b51e)
2007-10-10r7182: remove current support for RELATIVE_CURRENT, this will be replaced ↵Stefan Metzmacher1-4/+0
with a better aproach later metze (This used to be commit 9a4e9f68fbddaae3fc86e30d39b69fc76261c0ea)
2007-10-10r6973: Merge new version of pidl into the main SAMBA_4_0 branch.Jelmer Vernooij1-1/+0
The main difference in this new version is the extra data structure generated between the IDL data structure and the NDR parser: IDL -> NDR -> { ndr_parser, ndr_header, eparser, etc } This makes the ndr_parser.pm internals much more sane. Other changes include: - Remove unnecessary calls with NDR_BUFFERS (for example, GUID doesn't have any buffers, just scalars) as well as some (unnecessary) nested setting of flags. - Parse array loops in the C code rather then calling ndr_pull_array(). This allows us to have, for example, arrays of pointers or arrays of pointers to arrays, etc.. - Use if() {} rather then if () goto foo; everywhere - NDR_IN no longer implies LIBNDR_FLAG_REF_ALLOC - By default, top level pointers are now "ref" (as is the default in most other IDL compilers). This can be overridden using the default_pointer_top() property. - initial work on new ethereal parser generators by Alan DeKok and me - pidl now writes errors in the standard format used by compilers, which is parsable by most editors - ability to warn about the fact that pidl extension(s) have been used, useful for making sure IDL files work with other IDL compilers. oh, and there's probably some other things I can't think of right now.. (This used to be commit 13cf227615f6b9e0e5fa62e59197024410254f01)
2007-10-10r6720: added support for the remaining 2 types of CLDAP netlogonAndrew Tridgell1-0/+1
response. To work around the fact that the type of the returned data is not encoded in the packet, this required adding ndr_pull_union_blob() which allows us to pull a blob into a union with a specified switch value, in this case the switch value comes from the calling NtVer field. (This used to be commit bd27e626c27be72913d1a1569ee6e2e2711df84e)
2007-10-10r6519: move string handling functions to a seperate fileStefan Metzmacher1-0/+1
metze (This used to be commit a29d52817ce943c15f6896b74273df739867c8f7)
2007-10-10r6180: Use token_lists for storing switch valuesJelmer Vernooij1-1/+1
(This used to be commit f66e11137eed69b44f0739f1064625cbd96243bd)
2007-10-10r6129: - add our own MSZIP decompression implementationStefan Metzmacher1-1/+1
(taken from cabextract.c from KDE) this code maybe need to be rewritten and the compression side needs to be done, but for now it seems to works - remove the dependency to zlib metze (This used to be commit 5e8558c5b4365a494aa054c3e08d4084b319e6e5)
2007-10-10r6061: add start of compression support in our rpc codeStefan Metzmacher1-0/+5
this is not complete cuurently... but I want other people to test it and help me on finishing it. (try to change the #if 0 in torture/rpc/drsuapi.c into #if 1) metze (This used to be commit 335adef37082a78e0426decb715629bd778e6582)
2007-10-10r5775: Remove some unused functions (unions are no longer as special as they ↵Jelmer Vernooij1-3/+0
used to be) Add oxid mapping table support in DCOM (This used to be commit e193555f0eec2dda8c8760e9668181200fef0a1e)
2007-10-10r5736: fix to avoid endless recursion in ndr_size_*() calculationStefan Metzmacher1-0/+3
metze (This used to be commit eaac0f214703f91f186eb54f97e15e56461762bd)
2007-10-10r5672: Use switch_type() and the token storage mechanism for unions:Jelmer Vernooij1-0/+2
- Makes union handling less special - Allows unions in arrays, etc - Compatible with midl - Pidl will warn about switch_type() and the type of the switch_is() variable being different (This used to be commit dc6b4ffc82a191631bc16a4b93a4916a39183ec6)
2007-10-10r5663: Revert some changes I didn't mean to commit...Jelmer Vernooij1-2/+0
(This used to be commit 54e0be6f1eccbd870eb0e60ae8cdb90d2dc7f657)
2007-10-10r5661: Be a little stricter on syntax regarding arrays. A pointer to anJelmer Vernooij1-0/+2
array can now only be : type *name[]; rather then : type *name; which was supported in the past. Warnings will be given when the first syntax is used. Reasons for this change in behaviour include improved readability and the fact that the second format makes dealing with multiple levels of pointers harder. (This used to be commit a416de5825c540fd3741731c4be05e9a659a6fdb)
2007-10-10r5360: Remove a couple of unused functions.Jelmer Vernooij1-3/+0
(This used to be commit d8a0a6972156c3211001b7f98e990c167be2468c)
2007-10-10r5286: Some first steps in making the pidl code somewhat more generic for theJelmer Vernooij1-1/+1
various data types: Add ndr_flags argument to all ndr push/pull scalar functions (This used to be commit ab490c0c882bb13de190546c50a0631ecb8255ad)
2007-10-10r5084: - handle arbitrary data in the NULL record reply type for nbt name ↵Andrew Tridgell1-1/+1
queries - fixed unaligned pulls at the end of the packet in the ndr lib (This used to be commit 61c43509f7a538541d87bd505ca241e08a50f605)
2007-10-10r5034: - added a type mapping function in pidl, so the type names in our IDLAndrew Tridgell1-21/+0
files don't need to match the type names in the generated headers - with this type mapping we no longer need definitions for the deprecated "int32", "uint8" etc form of types. We can now force everyone to use the standard types int32_t, uint8_t etc. - fixed all the code that used the deprecated types - converted the IDL types "int64" and "uint64" to "dlong" and "udlong". These are the 4 byte aligned 64 bit integers that Microsoft internally define as two 32 bit integers in a structure. After discussions with Ronnie Sahlberg we decided that calling these "int64" was confusing, as it implied a true 8 byte aligned type - fixed all the cases where we incorrectly used things like "NTTIME_hyper" in our C code. The generated API now uses a NTTIME for those. The fact that it is hyper-aligned on the wire is not relevant to the API, and should remain just a IDL property (This used to be commit f86521677d7ff16bdc4815f9524e5286026f10f3)
2007-10-10r4885: added a new NBT client library. Features include:Andrew Tridgell1-1/+2
- structures defined using IDL in nbt.idl - build around our events structure, and talloc - fully async - supports all NBT packet fields as per rfc1002 - easy interfaces for name query and status For the moment there are just a couple of test functions in namequery.c, test_name_query() and test_name_status(). These will be removed when we hook the new library into libcli/ fully The new library will also be a fairly good basis for a nbt server. Although it can't be a server as-is, I wrote it with the needs of a server in mind (for example, extremely scalable idtree based packet handling) (This used to be commit ae7e625bfa4b4a3ee32c64566064b6a4c84ee4b9)
2007-10-10r4591: - converted the other _p talloc functions to not need _pAndrew Tridgell1-1/+1
- added #if TALLOC_DEPRECATED around the _p functions - fixes the code that broke from the above while doing this I fixed quite a number of places that were incorrectly using the non type-safe talloc functions to use the type safe ones. Some were even doing multiplies for array allocation, which is potentially unsafe. (This used to be commit 6e7754abd0c225527fb38363996a6e241b87b37e)
2007-10-10r4550: talloc() is now typesafe. It is exactly equivalent to the old ↵Andrew Tridgell1-2/+2
talloc_p() macro. Use talloc_size() if you want the old behaviour. I have kept talloc_p() as an alias for now. Once we change all calls to be plain talloc() then we can remove it. (This used to be commit 2011bbeb841fd6bfccf3d44a49f79203f7f55baa)
2007-10-10r4110: fixed pidl to allow arrays to have size_is() and length_is() elementsAndrew Tridgell1-17/+10
that depend on variables that come after the array in the structure or function. This has been something that has been problematic for a while, but the winreg QueryValue problem finally prompted me to fix it properly. We should now go back and fix up all the ugly workarounds we have used to avoid this problem in other calls. Unfortunately the solution is fairly complex, and involves the use of the internal ndr token lists (similar to the solution for relative pointers). I wonder if anyone else will be able to follow the logic if I get run over by a bus :-) (This used to be commit e839b19ec5581f669f2a7705b1fb80845313251c)
2007-10-10r4102: more uint64 vs HYPER_T fixesStefan Metzmacher1-3/+9
NOTE: [u]int64 uses 4 Byte alignment and HYPER_T uses 8 Byte alignment metze (This used to be commit 717454eb2fd2bf90e67074acefdae5304cd7433f)
2007-10-10r4051: use talloc_array() instead of talloc() when allocating arrays in ↵Andrew Tridgell1-1/+1
auto-generated ndr code (This used to be commit 90cdfd921e1a6f8806fe94bba61f1bbaa79c79f1)
2007-10-10r3984: success full parse the repsFrom/repsTo LDAP fieldsStefan Metzmacher1-0/+3
metze (This used to be commit 56c66f4a090b1efca011fc2fc9880c4d93da164c)
2007-10-10r3956: start to decode the repsFrom and repsTo fileds but not readyStefan Metzmacher1-0/+6
metze (This used to be commit 44f168c44de908fdf38b39aae8bf10e80206410a)
2007-10-10r3611: DCOM client support works!!Jelmer Vernooij1-0/+2
The torture test DCOM-SIMPLE now successfully does an IStream_Read and a IStream_Write call. This test can now be run successfully against the "Simple DCOM" Visual Studio example. (You have to quote out line 337 in pidl. pidl complains if the variable that contains the array size follows the array. I still need to fix this properly) Next goals: - Clean up code - Server side support - Support custom marshalling - Support DCOM interfaces in files other then dcom.idl (This used to be commit 8693344772a9b700533179f4bacfe27ec27dfcfe)
2007-10-10r3549: added support for DOS extended attribute lists (name/value pairs)Andrew Tridgell1-1/+2
stored in posix xattrs (This used to be commit bad6a88371264cffce2bf5d6ce904b7b357081de)
2007-10-10r3484: - add support for conformant string arrays at the end of a structStefan Metzmacher1-20/+23
- add support for strings where the length excludes the NULLTERM metze (This used to be commit 8251d8b3e5af351972aa41aed63f7a7d2640910e)
2007-10-10r3424: don't run mkproto.pl on pidl generated code, instead rely on pidl ↵Andrew Tridgell1-4/+0
generating the prototypes itself (This used to be commit e694aeefe7c725d417abdd3c48d16ff1d932c223)
2007-10-10r3395: added support for "string32" type, to fix the fixed width stringAndrew Tridgell1-1/+2
problem that tim found. (This used to be commit 2cf35cb4d2513a7be46065e12c6fd1e2b90f4b8a)
2007-10-10r2990: Add support to pidl for autogenerating ndr_size_*() functions. AddingJelmer Vernooij1-0/+5
the [gensize] property to a struct or union will make pidl generate a ndr_size_*() function. (not all nasty bits of NDR are completely covered yet by the ndr_size*() functions, support for those will be added when necessary) I also have a local patch (not applied now) that simplifies the pidl output and eliminates the number of functions required. It would, however, make pidl more complex. (This used to be commit 7c823f886afd0c4c6ee838f17882ca0658417011)
2007-10-10r2948: added support for the [range(low,high)] attribute in pidl. This allowsAndrew Tridgell1-1/+2
range checking of any integer value, to help protect against denial of service attacks (which could otherwise cause large memory allocations) (This used to be commit dbe6430d78f1b9aa59969074077e4afa5adf7570)
2007-10-10r2204: added [flag(RELATIVE_CURRENT)] to change [relative] pointer behaviourAndrew Tridgell1-0/+4
for this struct and all sub-structures to be like spoolss relative pointers (where offset is relative to current position). volker will test this for me :) (This used to be commit bd45329a3fb55a5d9f006ad601ae26a80b9a563f)
2007-10-10r2180: added RPC flags "padcheck" which enables checking of all received padAndrew Tridgell1-2/+8
bytes to make sure they are zero. Non-zero values usually indicate one of two things: - the server is leaking data through sending uninitialised memory - we have mistaken a real field in the IDL for padding to differentiate between the two you really need to run with "print,padcheck" and look carefully at whether the non-zero pad bytes are random or appear to be deliberate. (This used to be commit 7fdb778f81f14aaab75ab204431e4342a462957a)
2007-10-10r1985: take advantage of the new talloc in a few more placesAndrew Tridgell1-6/+3
(This used to be commit 6ffdfd779936ce8c5ca49c5f444e8da2bbeee0a8)
2007-10-10r1884: remove empty header fileStefan Metzmacher1-1/+0
metze (This used to be commit 874d4506094123a1f42c32c3ad37f6374f5958e8)
2007-10-10r1848: fix LIBNDR_STRING_FLAGS to include LIBNDR_STRING_BYTESIZEStefan Metzmacher1-1/+1
metze (This used to be commit 7f1fceeb7f7e2e51fb67f48b1513a32564b7cdff)
2007-10-10r1847: add STR_BYTESIZE flag, to handle cases whereStefan Metzmacher1-0/+1
the size is in bytes not in unicode chars metze (This used to be commit 6d094d60d377479de28790bad8ceb4c083c902cd)
2007-10-10r1757: much simpler (and smaller, faster etc) way of doing relative pointersAndrew Tridgell1-17/+14
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)
2007-10-10r1269: Add a 'base' field to the ndr_ofs_list structure which is the base toTim Potter1-0/+1
which the offset applies to. In an array of structures containing relative members, the offset applies to the start of the array element being marshalled. Previously, there was no way to access the relevant structure start as by the time we have hit buffers, the head of the offset list will be the last structure being marshalled. Interestingly enough, this makes relstrs go away. I think we thought they were a special case in samba 3 but it turns out they are just regular relative elements in the idl. This makes spoolss a lot simpler than I thought it would be. I've run the samr and lsa tests and this doesn't seem to break anything. It looks like security descriptors are the only structures that contain relative members. Oh yeah, this will probably require a 'make clean && make' otherwise you will get bizzare errors. (This used to be commit d379dcdfd5f41e7cf7668354c3011b8ace190953)
2007-10-10r884: convert samba4 to use [u]int32_t instead of [u]int32Stefan Metzmacher1-17/+17
metze (This used to be commit 0e5517d937a2eb7cf707991d1c7498c1ab456095)
2003-12-31the endpoint mapper now works in bigendian modeAndrew Tridgell1-0/+3
(This used to be commit 1f89d89954a3501e08efa97d1276ba9bb2d2305f)
2003-12-02 * netr_ServerPasswordSet() now works - the test suite changes theAndrew Tridgell1-1/+3
machine account password. * neater handling on value() options in IDL. The auto-print code will now display the right value so you don't need to initialise it in your C code (This used to be commit 3dd978b12bb5571fba4e1839c0f7ee60cf729aa2)