diff options
author | Jim McDonough <jmcd@samba.org> | 2003-10-30 16:38:39 +0000 |
---|---|---|
committer | Jim McDonough <jmcd@samba.org> | 2003-10-30 16:38:39 +0000 |
commit | 523444b7b69fd14798a70cbf98b4f5f0177bfd2a (patch) | |
tree | 66f9e9607d09c56516366e1c0c88a46f49247822 /source3/rpc_parse/parse_rpc.c | |
parent | 11e6f4b5185f6d3ee4e8c91cf598839a7f1d5002 (diff) | |
download | samba-523444b7b69fd14798a70cbf98b4f5f0177bfd2a.tar.gz samba-523444b7b69fd14798a70cbf98b4f5f0177bfd2a.tar.bz2 samba-523444b7b69fd14798a70cbf98b4f5f0177bfd2a.zip |
First round of merging various UUID structures.
This eliminates RPC_UUID. It creates the following struct:
struct uuid
{
uint32 time_low;
uint16 time_mid;
uint16 time_hi_and_version;
uint8 clock_seq[2];
uint8 node[6];
};
which replaces RPC_UUID and various random struct uuid definitions
and a flat version:
#define UUID_FLAT_SIZE 16
typedef struct uuid_flat
{
uint8 info[UUID_FLAT_SIZE];
} UUID_FLAT;
which pretty much looks like GUID (which I will start eliminating).
I want us to use the FLAT one only on the wire (perhaps in files, too?), and
I want it to be obvious to the coder that it is the FLAT version.
This leaves a couple of compiler warnings, where GUID isn't completely
replaced by FLAT_UUID yet...I'll get to those soon.
(This used to be commit 1532b5d2e3c61df232b16394acedf6eac387588b)
Diffstat (limited to 'source3/rpc_parse/parse_rpc.c')
-rw-r--r-- | source3/rpc_parse/parse_rpc.c | 82 |
1 files changed, 50 insertions, 32 deletions
diff --git a/source3/rpc_parse/parse_rpc.c b/source3/rpc_parse/parse_rpc.c index 18ac37778c..1718841cf7 100644 --- a/source3/rpc_parse/parse_rpc.c +++ b/source3/rpc_parse/parse_rpc.c @@ -34,8 +34,9 @@ interface/version dce/rpc pipe identification { \ { \ 0x8a885d04, 0x1ceb, 0x11c9, \ - { 0x9f, 0xe8, 0x08, 0x00, \ - 0x2b, 0x10, 0x48, 0x60 } \ + { 0x9f, 0xe8 }, \ + { 0x08, 0x00, \ + 0x2b, 0x10, 0x48, 0x60 } \ }, 0x02 \ } @@ -43,8 +44,9 @@ interface/version dce/rpc pipe identification { \ { \ 0x8a885d04, 0x1ceb, 0x11c9, \ - { 0x9f, 0xe8, 0x08, 0x00, \ - 0x2b, 0x10, 0x48, 0x60 } \ + { 0x9f, 0xe8 }, \ + { 0x08, 0x00, \ + 0x2b, 0x10, 0x48, 0x60 } \ }, 0x02 \ } @@ -52,8 +54,9 @@ interface/version dce/rpc pipe identification { \ { \ 0x6bffd098, 0xa112, 0x3610, \ - { 0x98, 0x33, 0x46, 0xc3, \ - 0xf8, 0x7e, 0x34, 0x5a } \ + { 0x98, 0x33 }, \ + { 0x46, 0xc3, \ + 0xf8, 0x7e, 0x34, 0x5a } \ }, 0x01 \ } @@ -61,8 +64,9 @@ interface/version dce/rpc pipe identification { \ { \ 0x4b324fc8, 0x1670, 0x01d3, \ - { 0x12, 0x78, 0x5a, 0x47, \ - 0xbf, 0x6e, 0xe1, 0x88 } \ + { 0x12, 0x78 }, \ + { 0x5a, 0x47, \ + 0xbf, 0x6e, 0xe1, 0x88 } \ }, 0x03 \ } @@ -70,8 +74,9 @@ interface/version dce/rpc pipe identification { \ { \ 0x12345778, 0x1234, 0xabcd, \ - { 0xef, 0x00, 0x01, 0x23, \ - 0x45, 0x67, 0x89, 0xab } \ + { 0xef, 0x00 }, \ + { 0x01, 0x23, \ + 0x45, 0x67, 0x89, 0xab } \ }, 0x00 \ } @@ -79,8 +84,9 @@ interface/version dce/rpc pipe identification { \ { \ 0x3919286a, 0xb10c, 0x11d0, \ - { 0x9b, 0xa8, 0x00, 0xc0, \ - 0x4f, 0xd9, 0x2e, 0xf5 } \ + { 0x9b, 0xa8 }, \ + { 0x00, 0xc0, \ + 0x4f, 0xd9, 0x2e, 0xf5 } \ }, 0x00 \ } @@ -88,8 +94,9 @@ interface/version dce/rpc pipe identification { \ { \ 0x12345778, 0x1234, 0xabcd, \ - { 0xef, 0x00, 0x01, 0x23, \ - 0x45, 0x67, 0x89, 0xac } \ + { 0xef, 0x00 }, \ + { 0x01, 0x23, \ + 0x45, 0x67, 0x89, 0xac } \ }, 0x01 \ } @@ -97,8 +104,9 @@ interface/version dce/rpc pipe identification { \ { \ 0x12345678, 0x1234, 0xabcd, \ - { 0xef, 0x00, 0x01, 0x23, \ - 0x45, 0x67, 0xcf, 0xfb } \ + { 0xef, 0x00 }, \ + { 0x01, 0x23, \ + 0x45, 0x67, 0xcf, 0xfb } \ }, 0x01 \ } @@ -106,8 +114,9 @@ interface/version dce/rpc pipe identification { \ { \ 0x338cd001, 0x2244, 0x31f1, \ - { 0xaa, 0xaa, 0x90, 0x00, \ - 0x38, 0x00, 0x10, 0x03 } \ + { 0xaa, 0xaa }, \ + { 0x90, 0x00, \ + 0x38, 0x00, 0x10, 0x03 } \ }, 0x01 \ } @@ -115,8 +124,9 @@ interface/version dce/rpc pipe identification { \ { \ 0x12345678, 0x1234, 0xabcd, \ - { 0xef, 0x00, 0x01, 0x23, \ - 0x45, 0x67, 0x89, 0xab } \ + { 0xef, 0x00 }, \ + { 0x01, 0x23, \ + 0x45, 0x67, 0x89, 0xab } \ }, 0x01 \ } @@ -124,8 +134,9 @@ interface/version dce/rpc pipe identification { \ { \ 0x0, 0x0, 0x0, \ - { 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00 } \ + { 0x00, 0x00 }, \ + { 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00 } \ }, 0x00 \ } @@ -133,7 +144,8 @@ interface/version dce/rpc pipe identification { \ { \ 0x4fc742e0, 0x4a10, 0x11cf, \ - { 0x82, 0x73, 0x00, 0xaa, \ + { 0x82, 0x73 }, \ + { 0x00, 0xaa, \ 0x00, 0x4a, 0xe6, 0x73 } \ }, 0x03 \ } @@ -142,7 +154,8 @@ interface/version dce/rpc pipe identification { \ { \ 0x60a15ec5, 0x4de8, 0x11d7, \ - { 0xa6, 0x37, 0x00, 0x50, \ + { 0xa6, 0x37 }, \ + { 0x00, 0x50, \ 0x56, 0xa2, 0x01, 0x82 } \ }, 0x01 \ } @@ -151,7 +164,8 @@ interface/version dce/rpc pipe identification { \ { \ 0x894de0c0, 0x0d55, 0x11d3, \ - { 0xa3, 0x22, 0x00, 0xc0, \ + { 0xa3, 0x22 }, \ + { 0x00, 0xc0, \ 0x4f, 0xa3, 0x21, 0xa1 } \ }, 0x01 \ } @@ -160,8 +174,9 @@ interface/version dce/rpc pipe identification { \ { \ 0xe1af8308, 0x5d1f, 0x11c9, \ - { 0x91, 0xa4, 0x08, 0x00, \ - 0x2b, 0x14, 0xa0, 0xfa } \ + { 0x91, 0xa4 }, \ + { 0x08, 0x00, \ + 0x2b, 0x14, 0xa0, 0xfa } \ }, 0x03 \ } @@ -263,15 +278,16 @@ BOOL smb_io_rpc_hdr(const char *desc, RPC_HDR *rpc, prs_struct *ps, int depth) } /******************************************************************* - Reads or writes an RPC_UUID structure. + Reads or writes a struct uuid ********************************************************************/ -BOOL smb_io_rpc_uuid(const char *desc, RPC_UUID *uuid, prs_struct *ps, int depth) +BOOL smb_io_uuid(const char *desc, struct uuid *uuid, + prs_struct *ps, int depth) { if (uuid == NULL) return False; - prs_debug(ps, depth, desc, "smb_io_rpc_uuid"); + prs_debug(ps, depth, desc, "smb_io_uuid"); depth++; if(!prs_uint32 ("data ", ps, depth, &uuid->time_low)) @@ -281,7 +297,9 @@ BOOL smb_io_rpc_uuid(const char *desc, RPC_UUID *uuid, prs_struct *ps, int depth if(!prs_uint16 ("data ", ps, depth, &uuid->time_hi_and_version)) return False; - if(!prs_uint8s (False, "data ", ps, depth, uuid->remaining, sizeof(uuid->remaining))) + if(!prs_uint8s (False, "data ", ps, depth, uuid->clock_seq, sizeof(uuid->clock_seq))) + return False; + if(!prs_uint8s (False, "data ", ps, depth, uuid->node, sizeof(uuid->node))) return False; return True; @@ -302,7 +320,7 @@ static BOOL smb_io_rpc_iface(const char *desc, RPC_IFACE *ifc, prs_struct *ps, i if (!prs_align(ps)) return False; - if (!smb_io_rpc_uuid( "uuid", &ifc->uuid, ps, depth)) + if (!smb_io_uuid( "uuid", &ifc->uuid, ps, depth)) return False; if(!prs_uint32 ("version", ps, depth, &ifc->version)) |