Path: utzoo!attcan!uunet!mcsun!ukc!mucs!cns!jf From: jf@ap.co.umist.ac.uk (John Forrest) Newsgroups: comp.sys.apollo Subject: Re: internet address Message-ID: <1991Mar2.001327.20942@cns.umist.ac.uk> Date: 2 Mar 91 00:13:27 GMT References: <9102261044.AA02546@apo.esiee.fr> Sender: news@cns.umist.ac.uk (Usenet news) Organization: comp Lines: 19 In article hanche@imf.unit.no (Harald Hanche-Olsen) writes: >In article <9102261044.AA02546@apo.esiee.fr> bonnetf@apo.esiee.fr (bonnet-franck) writes: > > Does somebody knows how to get the internet address of a machine > when I am working on it ( whithout looking in /etc/hosts ) ? > >% /etc/ifconfig eth0 >eth0: flags=63 > inet 129.241.15.4 netmask ffff0000 broadcast 129.241.255.255 macaddr 8:0:1e:1:ba:a4 > Surely this does not give the hostid of a machine, but of a port - not necessarily the same thing (esp if there is more than one port). I expect you need to use a program that invokes gethostid, but it is a pure guess, and I haven't tried looking further. John Forrest Dept of Computation UMIST