Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!linac!att!ucbvax!ICAEN.UIOWA.EDU!dbfunk From: dbfunk@ICAEN.UIOWA.EDU (David B Funk) Newsgroups: comp.sys.apollo Subject: Re: Node id from C Message-ID: <9105230826.AA01161@icaen.uiowa.edu> Date: 23 May 91 08:06:18 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: Iowa Computer Aided Engineering Network, University of Iowa Lines: 25 in posting <1991May22.161837.23276@gdt.bath.ac.uk>, Martin Maclaren asks: > What system call returns the node id of current machine? > (or isn't it as simple as that!) If you want to be safe and stick with released Apollo system calls, then you can do a "proc2_$who_am_i" to get the Apollo UID of your process and then munge it around to extract the bottom 20 bits (which will be your node ID). However for a quick and simple whack, try: extern void msg_$get_my_node( int *node_id ); It's not released but it's simple and relatively safe. The asknode_$xxx calls are complex and powerful but also dangerous. It is possible to make a mess of your network by misusing them and they are subject to change from OS release to release. I'd reccomend staying away from them unless you like to look for trouble (of course some of us do ;=). Dave Funk