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/utils/net_ads_cldap.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/utils/net_ads_cldap.c')
-rw-r--r-- | source3/utils/net_ads_cldap.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source3/utils/net_ads_cldap.c b/source3/utils/net_ads_cldap.c index 44de9cb891..1903172cf7 100644 --- a/source3/utils/net_ads_cldap.c +++ b/source3/utils/net_ads_cldap.c @@ -29,7 +29,7 @@ struct cldap_netlogon_reply { uint32 type; uint32 flags; - GUID guid; + UUID_FLAT guid; char forest[MAX_DNS_LABEL]; char domain[MAX_DNS_LABEL]; @@ -241,8 +241,8 @@ static int recv_cldap_netlogon(int sock, struct cldap_netlogon_reply *reply) reply->type = IVAL(p, 0); p += 4; reply->flags = IVAL(p, 0); p += 4; - memcpy(&reply->guid.info, p, GUID_SIZE); - p += GUID_SIZE; + memcpy(&reply->guid.info, p, UUID_FLAT_SIZE); + p += UUID_FLAT_SIZE; p += pull_netlogon_string(reply->forest, p, (const char *)os3.data); p += pull_netlogon_string(reply->domain, p, (const char *)os3.data); @@ -316,8 +316,8 @@ int ads_cldap_netlogon(ADS_STRUCT *ads) d_printf("0x%x\n", reply.type); break; } - d_printf("GUID: "); - print_guid(&reply.guid); + d_printf("GUID: %s\n", + smb_uuid_string_static(smb_uuid_unpack_static(reply.guid))); d_printf("Flags:\n" "\tIs a PDC: %s\n" "\tIs a GC of the forest: %s\n" |