WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH]: xl: use libuuid to generate random UUID's

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-devel] [PATCH]: xl: use libuuid to generate random UUID's
From: Christoph Egger <Christoph.Egger@xxxxxxx>
Date: Thu, 5 Aug 2010 12:13:49 +0200
Cc: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>, Ian Pratt <Ian.Pratt@xxxxxxxxxxxxx>, Vincent Hanquez <vincent.hanquez@xxxxxxxxxxxxx>, "Gianni Tedesco \(3P\)" <gianni.tedesco@xxxxxxxxxx>, Stefano Stabellini <Stefano.Stabellini@xxxxxxxxxxxxx>
Delivery-date: Thu, 05 Aug 2010 03:14:51 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4C5A8216.6030607@xxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1280944162.18490.219.camel@xxxxxxxxxxxxxxxxxxxxxx> <4FA716B1526C7C4DB0375C6DADBC4EA37AD0596B2F@xxxxxxxxxxxxxxxxxxxxxxxxx> <4C5A8216.6030607@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.9.10
On Thursday 05 August 2010 11:19:18 Vincent Hanquez wrote:
> On 05/08/10 03:19, Ian Pratt wrote:
> >> Link to libuuid in xl et al and bring in the header file. Use libuuid to
> >> generate UUID's which are actually UU and not merely pseudo-random :)
> >>
> >> As a side-effect I have also used libuuid to generate more random MAC
> >> addresses rather than keeping the old code and simply xoring getpid() in
> >> to the PRNG seed.
> >

I want to mention that Linux and NetBSD's uuid are different.
While on Linux you link against -luuid on NetBSD uuid is part of libc.
NetBSD implements DCE 1.1 
(http://www.opengroup.org/dce/info/draft-leach-uuids-guids-01.txt,
http://www.opengroup.org/onlinepubs/009629399/apdxa.htm).
Linux implements a different standard (I don't know which one) where
the API is different.

Please have a look at tools/blktap2/include/blk_uuid.h
and tools/blktap2/drivers/Makefile
how to deal with both variants in a portable way.

Christoph

-- 
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Einsteinring 24, 85609 Dornach b. Muenchen
Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>