Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* gethostid() never works onAlpha
@ 1995-10-30  5:00 Mr SH Cunningham
       [not found] ` <danpop.815090660@rscernix>
  0 siblings, 1 reply; 2+ messages in thread
From: Mr SH Cunningham @ 1995-10-30  5:00 UTC (permalink / raw)


Whenever I use gethostid(), it always returns 0, no matter which DEC alpha
machine I run the program using it on.  How can I get the DARPA Internet
address for a DEC alpha machine running Digital Unix?

I recall reading a while ago that you need to use some socket() call
or ioctl() or both, but I can't recall the arguments required to return
the DARPA Internet address (the number shown when the machine boots eg.
ln0: DEC LANCE Ethernet Interface, hardware address: 03-CF-2D-3C-A0-DC).




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: gethostid() never works onAlpha
       [not found] ` <danpop.815090660@rscernix>
@ 1995-11-06  5:00   ` Eric Werme
  0 siblings, 0 replies; 2+ messages in thread
From: Eric Werme @ 1995-11-06  5:00 UTC (permalink / raw)


Dan.Pop@mail.cern.ch (Dan Pop) writes:

>Since gethostid is broken (as you have already noticed), use gethostname
>to get the name of the host, then gethostbyname to get its IP address.

Err, at the risk of opening the can of worms in Pandora's box, let's just
say we don't use it.  After all, IP addresses are assigned to network
interfaces, not systems.

# hostid
0
# hostid 1234
# hostid
0x4d2
# hostid 0x1234
# hostid
0x1234
-- 
Eric (Ric) Werme         |  werme@zk3.dec.com
Digital Equipment Corp.  |  This space intentionally left blank.



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1995-11-06  5:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1995-10-30  5:00 gethostid() never works onAlpha Mr SH Cunningham
     [not found] ` <danpop.815090660@rscernix>
1995-11-06  5:00   ` Eric Werme

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox