summaryrefslogtreecommitdiff
path: root/source4/librpc/idl
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2003-12-16 09:02:58 +0000
committerAndrew Tridgell <tridge@samba.org>2003-12-16 09:02:58 +0000
commit24c22aef90d8534ee2d016b37b2b302f1367d106 (patch)
treececb9192f1a83f7232041cda58e83e1d94ac57b5 /source4/librpc/idl
parent1413faae582949e7d12174df7102723eea914464 (diff)
downloadsamba-24c22aef90d8534ee2d016b37b2b302f1367d106.tar.gz
samba-24c22aef90d8534ee2d016b37b2b302f1367d106.tar.bz2
samba-24c22aef90d8534ee2d016b37b2b302f1367d106.zip
a fairly large commit!
This adds support for bigendian rpc in the client. I have installed SUN pcnetlink locally and am using it to test the samba4 rpc code. This allows us to easily find places where we have stuffed up the types (such as 2 uint16 versus a uint32), as testing both big-endian and little-endian easily shows which is correct. I have now used this to fix several bugs like that in the samba4 IDL. In order to make this work I also had to redefine a GUID as a true structure, not a blob. From the pcnetlink wire it is clear that it is indeed defined as a structure (the byte order changes). This required changing lots of Samba code to use a GUID as a structure. I also had to fix the if_version code in dcerpc syntax IDs, as it turns out they are a single uint32 not two uint16s. The big-endian support is a bit ugly at the moment, and breaks the layering in some places. More work is needed, especially on the server side. (This used to be commit bb1af644a5a7b188290ce36232f255da0e5d66d2)
Diffstat (limited to 'source4/librpc/idl')
-rw-r--r--source4/librpc/idl/dcerpc.idl6
-rw-r--r--source4/librpc/idl/misc.idl8
2 files changed, 11 insertions, 3 deletions
diff --git a/source4/librpc/idl/dcerpc.idl b/source4/librpc/idl/dcerpc.idl
index cf195b6aea..ad82679576 100644
--- a/source4/librpc/idl/dcerpc.idl
+++ b/source4/librpc/idl/dcerpc.idl
@@ -13,8 +13,7 @@ interface dcerpc
{
typedef [public] struct {
GUID uuid;
- uint16 major_version;
- uint16 minor_version;
+ uint32 if_version;
} dcerpc_syntax_id;
typedef struct {
@@ -28,7 +27,7 @@ interface dcerpc
uint16 max_xmit_frag;
uint16 max_recv_frag;
uint32 assoc_group_id;
- uint8 num_contexts;
+ uint8 num_contexts;
dcerpc_ctx_list ctx_list[num_contexts];
[flag(NDR_ALIGN8)] DATA_BLOB _pad;
[flag(NDR_REMAINING)] DATA_BLOB auth_info;
@@ -167,6 +166,7 @@ interface dcerpc
const uint8 DCERPC_PFC_FLAG_NOCALL = 0x20;
/* these offsets are needed by the signing code */
+ const uint8 DCERPC_DREP_OFFSET = 4;
const uint8 DCERPC_FRAG_LEN_OFFSET = 8;
const uint8 DCERPC_AUTH_LEN_OFFSET = 10;
diff --git a/source4/librpc/idl/misc.idl b/source4/librpc/idl/misc.idl
index eb2288bc35..a1f8549eaa 100644
--- a/source4/librpc/idl/misc.idl
+++ b/source4/librpc/idl/misc.idl
@@ -8,6 +8,14 @@
interface misc
{
+ typedef [public,noprint] struct {
+ uint32 time_low;
+ uint16 time_mid;
+ uint16 time_hi_and_version;
+ uint8 clock_seq[2];
+ uint8 node[6];
+ } GUID;
+
/* a domain SID. Note that unlike Samba3 this contains a pointer,
so you can't copy them using assignment */
typedef [public,noprint] struct {