summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorJim McDonough <jmcd@samba.org>2003-10-30 16:38:39 +0000
committerJim McDonough <jmcd@samba.org>2003-10-30 16:38:39 +0000
commit523444b7b69fd14798a70cbf98b4f5f0177bfd2a (patch)
tree66f9e9607d09c56516366e1c0c88a46f49247822 /source3/include
parent11e6f4b5185f6d3ee4e8c91cf598839a7f1d5002 (diff)
downloadsamba-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/include')
-rw-r--r--source3/include/ntdomain.h16
-rw-r--r--source3/include/rpc_dce.h18
-rw-r--r--source3/include/rpc_ds.h4
-rw-r--r--source3/include/rpc_epmapper.h2
4 files changed, 21 insertions, 19 deletions
diff --git a/source3/include/ntdomain.h b/source3/include/ntdomain.h
index 5da6d86410..d9fff4d2a9 100644
--- a/source3/include/ntdomain.h
+++ b/source3/include/ntdomain.h
@@ -23,6 +23,22 @@
#ifndef _NT_DOMAIN_H /* _NT_DOMAIN_H */
#define _NT_DOMAIN_H
+struct uuid
+{
+ uint32 time_low;
+ uint16 time_mid;
+ uint16 time_hi_and_version;
+ uint8 clock_seq[2];
+ uint8 node[6];
+};
+#define UUID_SIZE 16
+
+#define UUID_FLAT_SIZE 16
+typedef struct uuid_flat
+{
+ uint8 info[UUID_FLAT_SIZE];
+} UUID_FLAT;
+
/* dce/rpc support */
#include "rpc_dce.h"
diff --git a/source3/include/rpc_dce.h b/source3/include/rpc_dce.h
index 52fe08d875..8266fc861f 100644
--- a/source3/include/rpc_dce.h
+++ b/source3/include/rpc_dce.h
@@ -87,29 +87,15 @@ enum netsec_direction
/* #define MAX_PDU_FRAG_LEN 0x1630 this is what wnt sets */
#define MAX_PDU_FRAG_LEN 0x10b8 /* this is what w2k sets */
-/*
- * Actual structure of a DCE UUID
- */
-
-typedef struct rpc_uuid
-{
- uint32 time_low;
- uint16 time_mid;
- uint16 time_hi_and_version;
- uint8 remaining[8];
-} RPC_UUID;
-
-#define RPC_UUID_LEN 16
-
/* RPC_IFACE */
typedef struct rpc_iface_info
{
- RPC_UUID uuid; /* 16 bytes of rpc interface identification */
+ struct uuid uuid; /* 16 bytes of rpc interface identification */
uint32 version; /* the interface version number */
} RPC_IFACE;
-#define RPC_IFACE_LEN (RPC_UUID_LEN + 4)
+#define RPC_IFACE_LEN (UUID_SIZE + 4)
struct pipe_id_info
{
diff --git a/source3/include/rpc_ds.h b/source3/include/rpc_ds.h
index e2622be532..4d3f5416ac 100644
--- a/source3/include/rpc_ds.h
+++ b/source3/include/rpc_ds.h
@@ -64,7 +64,7 @@ typedef struct
uint32 dnsname_ptr;
uint32 forestname_ptr;
- GUID domain_guid;
+ struct uuid domain_guid;
UNISTR2 netbios_domain;
@@ -110,7 +110,7 @@ typedef struct {
uint32 trust_type;
uint32 trust_attributes;
uint32 sid_ptr;
- GUID guid;
+ struct uuid guid;
UNISTR2 netbios_domain;
UNISTR2 dns_domain;
diff --git a/source3/include/rpc_epmapper.h b/source3/include/rpc_epmapper.h
index de3a2cb08d..bbca6ac1f2 100644
--- a/source3/include/rpc_epmapper.h
+++ b/source3/include/rpc_epmapper.h
@@ -51,7 +51,7 @@ typedef struct
uint16 length;
uint8 protocol;
struct {
- RPC_UUID uuid;
+ struct uuid uuid;
uint16 version;
} uuid;
} lhs;