[Tfug] Looking for a unique identifier

jblais joe.blais at pti-instruments.com
Thu Aug 2 14:19:28 MST 2007


Thank you...

> -----Original Message-----
> From: tfug-bounces at tfug.org [mailto:tfug-bounces at tfug.org]On Behalf Of
> Brian Murphy
> Sent: Thursday, August 02, 2007 12:34 PM
> To: Tucson Free Unix Group
> Subject: Re: [Tfug] Looking for a unique identifier
> 
> 
> jblais wrote:
> > I've used the Winders GUID that uniquely identifies a winders 
> installation,
> > to know what machine is running an application.
>  >
> > Does Linux have anything like that?
> 
> No.
> 
> > I was thinking of using the MAC address.  I can get it through 
> system calls
> > like ifconfig, but is there an "easy" way of getting it with C code?
> > 
> > Is there a more unique, or easier to get string or number that 
> can identify
> > a particular machine that an app might be running on?
> 
> 
> MAC of eth0 is about the best you'll get.  In C, request the 
> SIOCGIFHWADDR ioctl of a socket to get the MAC.
> 
> Note that ifconfig can change the hw address of an interface.
> 
> Brian
> 
> _______________________________________________
> Tucson Free Unix Group - tfug at tfug.org
> Subscription Options:
> http://www.tfug.org/mailman/listinfo/tfug_tfug.org
> 
> 




More information about the tfug mailing list