bshaw@vlsic2.ti.com (Bob Shaw) (04/12/90)
Is there a way , withing a C program , to read the Apollo rom that has the hostid ? I was thinking in terms of gethostid() etc. Thanks in advance Bob Shaw Texas Instruments Dallas bshaw@vlsic2.csc.ti.com
krowitz%richter@UMIX.CC.UMICH.EDU (David Krowitz) (04/13/90)
If you are looking for the Apollo node ID (as opposed to the IP host number), you can use the pm_$get_sid_txt call. It returns a string of the form: person.group.project.node_id for the owner of the process which executes the call. -- David Krowitz krowitz@richter.mit.edu (18.83.0.109) krowitz%richter.mit.edu@eddie.mit.edu krowitz%richter.mit.edu@mitvma.bitnet (in order of decreasing preference)
rees@dabo.ifs.umich.edu (Jim Rees) (04/14/90)
In article <9004122159.AA08635@richter.mit.edu>, krowitz%richter@UMIX.CC.UMICH.EDU (David Krowitz) writes: > If you are looking for the Apollo node ID (as opposed to the IP host > number), you can use the pm_$get_sid_txt call. It returns a string > of the form: person.group.project.node_id for the owner of the process > which executes the call. It's even easier than that: nodeid = atoi(getenv("NODEID")); This is subject to spoofing of course, so I wouldn't use it to try to node lock a particular piece of software. It's actually more complicated than this, since the node id is hex and atoi wants decimal, and good programming practice would require a bit more sanity checking. But you get the idea.