Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!samsung!umich!terminator!dabo.ifs.umich.edu!rees From: rees@dabo.ifs.umich.edu (Jim Rees) Newsgroups: comp.sys.apollo Subject: Re: question on hostid Message-ID: <1990Apr13.233536.2447@terminator.cc.umich.edu> Date: 13 Apr 90 23:35:36 GMT References: <9004122159.AA08635@richter.mit.edu> Sender: usenet@terminator.cc.umich.edu (usenet news) Reply-To: rees@citi.umich.edu (Jim Rees) Organization: University of Michigan IFS Project Lines: 15 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.