From: jtk@atria.com (John Kohl)
Subject: Re: locking software to a machine
Date: 1995/05/08 [thread overview]
Message-ID: <D89JLE.C5G@atria.com> (raw)
In-Reply-To: 3oi8b3$gds@harbinger.cc.monash.edu.au
>>>>> "Dirk" == Dirk Grunwald <grunwald@foobar.cs.colorado.edu> writes:
In article <GRUNWALD.95May7111938@foobar.cs.colorado.edu> grunwald@foobar.cs.colorado.edu (Dirk Grunwald) writes:
Dirk> Anyway, the getsysinfo program with the (undocumented) HWRPB function
Dirk> returns an 'rpbbuf'.
Dirk> err = getsysinfo(GSI_GET_HWRPB, &rpbbuf, sizeof(rpbbuf));
Dirk> that buffer, documented in /usr/include/machine/rpb.h contains the field...
Dirk> char rpb_ssn[16]; /* 040: system serial num: 10 ascii chars */
Dirk> I've never looked at this field to see if its' really the ID or not.
I tried this, and the rpb_ssn was all zeros on my DEC 3000/500.
#include <sys/types.h>
#include <sys/sysinfo.h>
#include <machine/hal_sysinfo.h>
#include <machine/rpb.h>
main()
{
int err;
struct rpb rpbbuf;
memset(&rpbbuf, 0, sizeof(rpbbuf));
err = getsysinfo(GSI_GET_HWRPB, &rpbbuf, sizeof(rpbbuf), 0, 0);
if (err == 1)
printf("rbp_ssn=%lx,%lx\n", *(long *)&rpbbuf.rpb_ssn[0],
*(long *)&rpbbuf.rpb_ssn[8]);
}
--
John Kohl <jtk@atria.com> or <jtkohl@mit.edu>
working for but not representing: Atria Software
sometimes hacking on: NetBSD/i386
next prev parent reply other threads:[~1995-05-08 4:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
1995-05-07 4:00 locking software to a machine Mr SH Cunningham
1995-05-07 4:00 ` Dirk Grunwald
1995-05-08 4:00 ` John Kohl [this message]
1995-05-08 4:00 ` Ed Wilts
1995-05-09 4:00 ` Mr SH Cunningham
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox