Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!decwrl!sgi!wiltse@oceana.esd.sgi.com From: wiltse@oceana.esd.sgi.com (Wiltse Carpenter) Newsgroups: comp.sys.sgi Subject: Re: Obtaining a unique, "unchangeable" number associated with an SGI workstation Summary: use the sysid(3C) call Keywords: copy protection, hostids, unique identifiers Message-ID: <47918@sgi.sgi.com> Date: 10 Jan 90 05:25:06 GMT References: <12817@phoenix.Princeton.EDU> Sender: wiltse@oceana.esd.sgi.com Organization: Silicon Graphics, Inc., Mountain View, CA Lines: 30 In article <12817@phoenix.Princeton.EDU>, ams@fourier.Princeton.EDU (Andrew Simms) writes: > ...they would like to obtain a > read-only number (such as a motherboard serial number) that > could be used as a key to operate the software only on that > machine. > > p.s. Ethernet addresses won't quite do it, since it needs > to run on machines without ethernet boards. > ---------------------------------------------------------------------- The sysid(3C) call returns a machine identifier string that is unique for all SGI machines. The implementation is somewhat different on the various 4D models, but it is currently based on the E-net address in all of them. You are right that machines without Ethernet boards, or with boards that get swapped will not return unique values. On the 4D/2x models however, the E-net address is stored on the chassis so that a swap of the electronics module will not affect the address or the return from the sysid() call and all machines have one. Please also be aware that the gethostid(2) call is not the thing to use for this purpose on SGI machines since the super-user can set with sethostid(2) to any legal value. One more thing to be warned about: Do not use the mapping of the E-net address in the sysid call to obtain the E-net address itself! On future versions of our machines we may well come up with a better source for the serial number which may not have anything to do with the E-net address. -Wiltse