uname and machine identity

Bernard Dautrevaux DAUTREVAUX@microprocess.com
Sun Jan 31 23:52:00 GMT 1999


> -----Message d'origine-----
> De:	Ian Collins [SMTP:ianc@kiwiplan.co.nz]
> Date:	Wednesday, January 06, 1999 04:08
> À:	Gnu-Win32 (E-mail)
> Objet:	uname and machine identity
> 
> I need to get a unique system identity from an application running on
> b20.1.
> On other Unixes, I use,
> 
> typedef struct utsname UTS
> 
> UTS uts;
> 
> uname(uts)
> 
> and the unique machine identity is found in uts.machine (on AIX), or
> uts.idnumber (on HPUX), etc.
> 
> Does anyone know how to get such information on B20.1,  as the output
> of
> uname is very limited.
> 
> Regards,
> Ian Collins.
> 
I had the same problem (although under mingw32), but on Losedows there's
no such unique machine identifier (blame IBM for their carazy, minimal,
PC hardware design...). I resort to using the ethernet address (not the
IP one that may change too often but the 48-bit hardware address) then
hash-it to reduce it to 32 bits. I don't remember how to read it but you
should find this in VC++ doc. If you can't find it I can send a small
code snipped (but I'll have to search in my code and I'm quite busy...)

I use the ethernet address based on the assumption that (for the users
of my real-time object-oriented development tools and kernel) tehere
will always be one on the system (quite a safe bet as I need NT-4).

Hope this helps,

	Bernard

------------------------------------------------------------------------
------
Bernard Dautrevaux
Microprocess Ingéniérie
97 bis, rue de Colombes
92400 COURBEVOIE
FRANCE
Tel:	+33 (0) 1 47 68 80 80
Fax:	+33 (0) 1 47 88 97 85
e-mail:	dautrevaux@microprocess.com
	b.dautrevaux@usa.net
------------------------------------------------------------------------
------


-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".



More information about the Cygwin mailing list