On Thursday, 03/28/2002 at 08:17 CST, Rick Troth <[EMAIL PROTECTED]> wrote:
> When I said it should be "retooled"
> what I meant was that for some HW platforms (like zSeries)
> there is a hardware concept of a processor serial number.
> On such platforms,  'hostid'  should report that value
> or should report something derived from it
> and not something derived from IP address or file content.
>
> Perhaps I've misunderstood the purpose of the 'hostid' command.

There's really no value to hostid or gethostid() because the result is not
well-defined across platforms.  gethostid() was useful in olden days to
find out your own IP address (forget multihomed hosts) so you could answer
the question "Did the connection originate on this host or somewhere
else?".

The fact that we're having this discussion illustrates the problem.  If we
don't agree on the semantics of the data, it has limited value.  Enter
IPv6, stage right.  For those systems on which gethostid() returns an IP
address, what should they do if they have only IPv6 IP addresses?  The
hostid is a 32-bit number.  Rats.

And I agree with Alan Cox that things like
get-me-a-world-unique-64-bit-number() should be obtained by something
other than the gethostid().  Make such a call part of the POSIX standard
or something.  It's not a networking thing.  gethostid(), for better or
worse, is.

Regards,
Alan Altmark
Sr. Software Engineer
IBM z/VM Development

Reply via email to