summaryrefslogtreecommitdiff
path: root/source4/librpc/ndr/ndr_basic.c
AgeCommit message (Collapse)AuthorFilesLines
2007-10-10r6574: send a value for embedded ref pointers,Stefan Metzmacher1-1/+1
(this fixes the doublepointer test against w2k3) but we accept zero pointers on the receive side, because it's used in DRSUAPI metze (This used to be commit 748ab5449bcc5b47f5ceaa83277bf8084c44ec56)
2007-10-10r6519: move string handling functions to a seperate fileStefan Metzmacher1-476/+0
metze (This used to be commit a29d52817ce943c15f6896b74273df739867c8f7)
2007-10-10r5977: Fix uninitialised memory bug in ndr_pull_ref_ptr(). This fixes theJelmer Vernooij1-2/+1
Test_DoublePointer test failure. (This used to be commit 4089d5f67d6e4121056a63ececb13187fd773636)
2007-10-10r5866: Add InitShutdown IDL and torture test.Jelmer Vernooij1-0/+14
Implement push side of NDR_LEN4|NDR_NOTERM strings (pull side was already present) (This used to be commit ea61ec1122841716ed5d90085ba79e7bf691bd6a)
2007-10-10r5796: add ndr_* function for int8 and int16Stefan Metzmacher1-24/+75
metze (This used to be commit 8ac0928a914c1cee3f0493b515f03c6422a8b71a)
2007-10-10r5765: remove unused varStefan Metzmacher1-1/+0
metze (This used to be commit a8f7c3e59f35127b51d4afc551b71f21886f4565)
2007-10-10r5764: add support for embedded ref pointersStefan Metzmacher1-1/+24
metze (This used to be commit 112043b1809a96b1a39ade71ea2885c0d792c79f)
2007-10-10r5427: NTSTATUS is treated by pidl as a 'real' scalar now.Jelmer Vernooij1-2/+2
(This used to be commit fa97059d000859b3d0192ed4a0135770888aba6f)
2007-10-10r5414: - added libcli/wins/, a basic client library for WINS replicationAndrew Tridgell1-1/+32
- added a new IDL type "udlongr", which is like udlong, but with the two uint32 halves reversed - modified the winsrepl.idl to cope with a wider range of packets (This used to be commit bc8d60c918f2e268d591aac464fc6a78c38a4cf9)
2007-10-10r5376: ORPC is NDR specific, so move it to ndr.pm.Jelmer Vernooij1-3/+0
Get rid of register_enum/register_bitmap, etc. (use list of types in ndr.pm instead) (This used to be commit efc2e41b8df3a0171cca57291929fb63760c1662)
2007-10-10r5363: - ndr_%_ptr -> ndr_%_unique_ptrJelmer Vernooij1-2/+2
- ndr_%_relative% -> ndr_%_relative_ptr% - Change pointer_default() default to "unique" (DCE uses "ptr" as default, MIDL doesn't follow the standard and uses "unique") (This used to be commit 53b4ecbcc7a8da67cde1377de6f24a3de6d229e3)
2007-10-10r5361: Rename some functions, add tests to validator.Jelmer Vernooij1-1/+1
(This used to be commit c9d7b88756039a3eb3024c886851e489c46ef67f)
2007-10-10r5286: Some first steps in making the pidl code somewhat more generic for theJelmer Vernooij1-79/+79
various data types: Add ndr_flags argument to all ndr push/pull scalar functions (This used to be commit ab490c0c882bb13de190546c50a0631ecb8255ad)
2007-10-10r5155: define ipv4address as a based IDL type, mapped to a "const char *" inAndrew Tridgell1-0/+34
the header, and defined on the wire as a 4 byte network byte order IP. This means the calling code doesn't have to worry about network byte order conversions. (This used to be commit 72048e37179dd5b9ada0c5280d2f0d8c23d1a17d)
2007-10-10r5139: fix typesStefan Metzmacher1-2/+2
metze (This used to be commit 8507a57b88c6acce84d9ccc580e17c7f96c6d7af)
2007-10-10r5118: added support for node status replies in nbtd. nmblookup -S now works ↵Andrew Tridgell1-1/+1
against Samba4. Also added support for the '*' wildcard name (This used to be commit 2dd7ccf72444db668fa970c3a95de1448baea224)
2007-10-10r5036: changed HYPER_T to the more standard "hyper"Andrew Tridgell1-17/+17
(This used to be commit 1d1a9c11ee681540ef8a1029409bb24fc26f976c)
2007-10-10r5034: - added a type mapping function in pidl, so the type names in our IDLAndrew Tridgell1-26/+26
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-11/+23
- 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-10r4676: NTTIME_1sec is a standard NTTIME for the calling codeStefan Metzmacher1-1/+4
as it's already converted in the pull/push code metze (This used to be commit 0d2286ba56fa8d25244a5554e75b5be24eba28b0)
2007-10-10r4673: Fix the IDL for the QuerySecret LSA call.Andrew Bartlett1-2/+25
This call uses a new IDL type, NTTIME_hyper. This is 8-byte aligned, as the name suggests. Expand the QuerySecret LSA calls in RPC-SAMLOGON and RPC-LSA, to validate the behaviour of times, and of the old secrets. Thanks to tridge for spotting the use of HYPER! Andrew Bartlett (This used to be commit 1fed79cb0f2ae7940639d08ef99576559d4cd06e)
2007-10-10r4557: support for [flags()] on typedef enum|bitmapStefan Metzmacher1-1/+5
NDR_PAHEX is handled by ndr_print_enum() now metze (This used to be commit c3b2d2cca37193fead0df1a8808c3ffcd5180a89)
2007-10-10r4535: add full support forStefan Metzmacher1-2/+11
typedef bitmap { FLAG1 = 0x01 } fooflags; typedef struct { fooflags flags; } metze (This used to be commit 052a7d4f9a3a178149c65a616fdfd87152dff7eb)
2007-10-10r4519: added the enum print function in ndr_basic.cAndrew Tridgell1-0/+6
(This used to be commit 29955004aa256d5ac27b941f48384ab97ff5e4b8)
2007-10-10r4102: more uint64 vs HYPER_T fixesStefan Metzmacher1-2/+2
NOTE: [u]int64 uses 4 Byte alignment and HYPER_T uses 8 Byte alignment metze (This used to be commit 717454eb2fd2bf90e67074acefdae5304cd7433f)
2007-10-10r3997: fix STR_CHARLEN pull caseStefan Metzmacher1-21/+25
metze (This used to be commit 623411f74ee766dee2170949b118216387779929)
2007-10-10r3972: use GUID_* naming context and move GUID_* functions to one placeStefan Metzmacher1-84/+0
metze (This used to be commit 523e6acf4fec5d4946fa7c0c89f40d7d712c9f3a)
2007-10-10r3869: in the NDR encoded replPropertyMetaData attribute in ADSStefan Metzmacher1-1/+29
I see a new 64 bit time field which are seconds since 1601, this will be mapped to NTTIME by th eparsing code +#define NTTIME_1sec NTTIME metze (This used to be commit db35f3b0f99943311ff8b797e8336616dab28220)
2007-10-10r3861: - Put ndr and rpc client code in seperate filesJelmer Vernooij1-1/+1
- Add some const (This used to be commit a00bda88e1b6abdc36e5aa8c2a35f64855f67c96)
2007-10-10r3787: a function to generate a random GUIDStefan Metzmacher1-0/+10
metze (This used to be commit 8bd2e3cb4e5123a3e26965b8535e16ee18005714)
2007-10-10r3785: this strings are not constStefan Metzmacher1-2/+2
metze (This used to be commit 436da375a2a815926aaa0565120a4750ead37cb0)
2007-10-10r3582: more gcc-4.0 signedness fixesStefan Metzmacher1-5/+5
metze (This used to be commit 07405f1c67e9df8a972e17f5bdaf312977960474)
2007-10-10r3549: added support for DOS extended attribute lists (name/value pairs)Andrew Tridgell1-1/+13
stored in posix xattrs (This used to be commit bad6a88371264cffce2bf5d6ce904b7b357081de)
2007-10-10r3512: - support DsCrackName GUID strings ↵Stefan Metzmacher1-2/+25
('{faedf4f9-0de8-4582-b8b6-c475efefbe5a}') - resolve the GUID's we got in DsGetDomainControllerInfo in the DsCrackNames test metze (This used to be commit f6310695821a7e750dd37936a6145232d81ab413)
2007-10-10r3484: - add support for conformant string arrays at the end of a structStefan Metzmacher1-5/+50
- add support for strings where the length excludes the NULLTERM metze (This used to be commit 8251d8b3e5af351972aa41aed63f7a7d2640910e)
2007-10-10r3432: Support WERROR's in arguments (not just as return type). Some ofJelmer Vernooij1-2/+52
the DCOM calls are wrappers around several local calls, so you get things like: WERROR foobar ( [in] int num_ifaces, [in,size_is(num_ifaces)] IID *ifaces, [out,size_is(num_ifaces)] WERROR *results); (This used to be commit 0873bf2cbe3589988e518cf68ad4d14343b9240b)
2007-10-10r3395: added support for "string32" type, to fix the fixed width stringAndrew Tridgell1-0/+28
problem that tim found. (This used to be commit 2cf35cb4d2513a7be46065e12c6fd1e2b90f4b8a)
2007-10-10r3073: Fix bug in the handling of null-terminated ASCII strings in RPC.Andrew Bartlett1-1/+1
Because we didn't count the null terminator, we would not move past it in the packet. Andrew Bartlett (This used to be commit 8b38bffc7098610c469ab61b7e0e6884f046f286)
2007-10-10r2990: Add support to pidl for autogenerating ndr_size_*() functions. AddingJelmer Vernooij1-0/+12
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-10r2989: fix the printing of unions with negative cases when :print is usedAndrew Tridgell1-2/+2
(This used to be commit d8152f896119418d95d7697cc2ca23f5319c32a9)
2007-10-10r2987: added support for signed 32 bit integers in pidlAndrew Tridgell1-0/+31
(This used to be commit 24122eb93e39de8db3675618b6c227c95eb58d9c)
2007-10-10r2910: I noticed that the samr torture test was doing its own DOS->UNIXAndrew Tridgell1-129/+138
string conversion. For RPC, all string conversions are supposed to be done by the NDR layer, using string flags set in the IDL. The reason this wasn't working is that I had been too lazy to do the STR_ASCII string types properly at the NDR layer when initially writing ndr_basic.c. This commit fixes the ndr_basic code properly to do all ASCII varients, by re-using the non-ascii code and a "byte_mul" local variable. I have also removed the manual string conversion in the SAMR torture test code. (This used to be commit aad0e7e9d890bb56447f1f933b8f2bb78a3ee269)
2007-10-10r2857: this commit gets rid of smb_ucs2_t, wpstring and fpstring, plus lots ↵Andrew Tridgell1-7/+3
of associated functions. The motivation for this change was to avoid having to convert to/from ucs2 strings for so many operations. Doing that was slow, used many static buffers, and was also incorrect as it didn't cope properly with unicode codepoints above 65536 (which could not be represented correctly as smb_ucs2_t chars) The two core functions that allowed this change are next_codepoint() and push_codepoint(). These functions allow you to correctly walk a arbitrary multi-byte string a character at a time without converting the whole string to ucs2. While doing this cleanup I also fixed several ucs2 string handling bugs. See the commit for details. The following code (which counts the number of occuraces of 'c' in a string) shows how to use the new interface: size_t count_chars(const char *s, char c) { size_t count = 0; while (*s) { size_t size; codepoint_t c2 = next_codepoint(s, &size); if (c2 == c) count++; s += size; } return count; } (This used to be commit 814881f0e50019196b3aa9fbe4aeadbb98172040)
2007-10-10r2552: Character set conversion and string handling updates.Andrew Bartlett1-4/+4
The intial motivation for this commit was to merge in some of the bugfixes present in Samba3's chrcnv and string handling code into Samba4. However, along the way I found a lot of unused functions, and decided to do a bit more... The strlen_m code now does not use a fixed buffer, but more work is needed to finish off other functions in str_util.c. These fixed length buffers hav caused very nasty, hard to chase down bugs at some sites. The strupper_m() function has a strupper_talloc() to replace it (we need to go around and fix more uses, but it's a start). Use of these new functions will avoid bugs where the upper or lowercase version of a string is a different length. I have removed the push_*_allocate functions, which are replaced by calls to push_*_talloc. Likewise, pstring and other 'fixed length' wrappers are removed, where possible. I have removed the first ('base pointer') argument, used by push_ucs2, as the Samba4 way of doing things ensures that this is always on an even boundary anyway. (It was used in only one place, in any case). (This used to be commit dfecb0150627b500cb026b8a4932fe87902ca392)
2007-10-10r2205: fixed an incorrect cast that broke relative strings in spoolssAndrew Tridgell1-1/+1
(This used to be commit d2d3433de1c1e1bc757381e9736147cc24fe8cf0)
2007-10-10r2180: added RPC flags "padcheck" which enables checking of all received padAndrew Tridgell1-0/+25
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-10r2159: converted samba4 over to UTF-16.Andrew Tridgell1-4/+4
I had previously thought this was unnecessary, as windows doesn't use standards compliant UTF-16, and for filesystem operations treats bytes as UCS-2, but Bjoern Jacke has pointed out to me that this means we don't correctly store extended UTF-16 characters as UTF-8 on disk. This can be seen with (for example) the gothic characters with codepoints above 64k. This commit also adds a LOCAL-ICONV torture test that tests the first 1 million codepoints against the system iconv library, and tests 5 million random UTF-16LE buffers for identical error handling to the system iconv library. the lib/iconv.c changes need backporting to samba3 (This used to be commit 756f28ac95feaa84b42402723d5f7286865c78db)
2007-10-10r1994: fix compiler warningStefan Metzmacher1-1/+1
metze (This used to be commit a3a4b9c9ea2692b3ca85d9a4a094e36609831f19)
2007-10-10r1985: take advantage of the new talloc in a few more placesAndrew Tridgell1-11/+11
(This used to be commit 6ffdfd779936ce8c5ca49c5f444e8da2bbeee0a8)
2007-10-10r1847: add STR_BYTESIZE flag, to handle cases whereStefan Metzmacher1-6/+52
the size is in bytes not in unicode chars metze (This used to be commit 6d094d60d377479de28790bad8ceb4c083c902cd)