[ILUG] Generate a GUID

Tim O'Donovan tim.odonovan at sun.com
Thu Sep 6 17:32:07 IST 2001


Fergal Moran wrote:
> 
> >> From: Fergal Moran [mailto:fergal.moran at wasptech.com]
> >> How do I get a globally unique identifier in C/C++?
> 
> > From: McGahon, Dermot [mailto:Dermot.McGahon at avocent.com]
> > <snip c++ code for LOCALLY unique identifier>
> > Is that what you mean or something else?
> > Regards,
> > Dermot.
> 
> Not really - I want a GLOBALLY unique identifier - ie. an ID that I know no other machine in the world will ever have - windows uses them extensively - producing them using the unique id of your NIC and the timestamp - I need a linux equivalent.

If your machine has an Ethernet card, why not just 
use the MAC Address?  That's globally unique.  I'm 
pretty sure you could find some C++ code on the web 
to get the MAC address.

Tim


-- 
Tim O'Donovan, Volume Systems Products Group 
Sun Microsystems Ireland, Boole House, 
East Point Business Park, Dublin 3, Ireland       
Tel : (+353) 1-819-9277   E-Mail:tim.odonovan at sun.com




More information about the ILUG mailing list