[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: printing binary UUIDs



Whoops, that won't work, IIRC OpenLDAP stores UUIDs big-endian.

sub unpackGuid
{
        my $packedGuid = $_[0];
        sprintf "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x", unpack("NnnC8", $packedGuid);
}


-- Luke

>From: Luke Howard <lukeh@padl.com>
>Subject: Re: printing binary UUIDs
>To: richton@nbcs.rutgers.edu
>Cc: openldap-devel@OpenLDAP.org
>Date: Fri, 27 Jan 2006 09:44:39 +1100
>Organization: PADL Software Pty Ltd
>Versions: dmail (bsd44) 2.6d/makemail 2.10
>
>
>You could use the following Perl:
>
>sub unpackGuid
>{
>        my $packedGuid = $_[0];
>        sprintf "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x", unpack("VvvC8", $packedGuid);
>}
>
>$value = unpackGuid(decodeBase64($ARGV[0]));
>
>-- Luke
>
>>From: Aaron Richton <richton@nbcs.rutgers.edu>
>>Subject: printing binary UUIDs
>>To: openldap-devel@OpenLDAP.org
>>Date: Thu, 26 Jan 2006 17:07:01 -0500 (EST)
>>
>>Is there a function out there for turning a binary UUID into, say, the
>>form output by ldapsearch(1)? I'm still seeing missed entires (fairly
>>regularly) with syncrepl. -d -1 showed that the client requests are
>>identical (except for CSNs) on a run that worked and a run that didn't, so
>>I'm suspecting the provider. Of course, this never happens under debugger.
>>I'm thinking of just throwing a few Debug() statements in the slog
>>functions and running (maybe even production) with that. But I'd like to
>>be able to easily correlate the uuids in the log with slapcat'd output.
>
>--

--