[Tfug] Looking for a unique identifier
Tim Ottinger
tottinge at gmail.com
Fri Aug 3 09:41:05 MST 2007
What if there is no eth0?
On 8/2/07, Brian Murphy <murphy at coppershadow.com> wrote:
>
> 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