home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / std_unix / volume.24 / text0070.txt < prev    next >
Encoding:
Text File  |  1991-09-03  |  1.5 KB  |  35 lines

  1. Submitted-by: henry@zoo.toronto.edu (Henry Spencer)
  2.  
  3. In article <1991Jul31.001825.16027@uunet.uu.net> fkittred@spca.bbn.com (Fletcher Kittredge) writes:
  4. >>The very concept of a host name -- a unique readable name for the host --
  5. >>is not (fully) portable.  No, there is no universal way to get it.
  6. >
  7. >POSIX 1003.1 contains the uname(2) system call which returns a structure
  8. >holding information about the host.  One of the fields of the structure
  9. >is nodename, the current name of the host on a communications network. 
  10.  
  11. However, note the fine print a few lines further down:
  12.  
  13. "The inclusion of the *nodename* member in this structure does not imply
  14. that it is sufficient information for interfacing to communications
  15. networks."
  16.  
  17. In other words, it's not guaranteed to be the "host name" in the sense
  18. of the original inquiry.  Indeed, on most current implementations that
  19. field is too small to hold an Internet domain name of even modest length,
  20. assuming that an Internet domain name is what you want.  On most SV-derived
  21. implementations, *nodename* has room for only an 8-character name.  That
  22. won't even hold "zoo.toronto.edu" or "spca.bbn.com", never mind some of
  23. the atrocities that show up.
  24.  
  25. I stand by my original comment.  Fletcher's confusion here is an example
  26. of the lack of any standard for what a "host name" should be and what it
  27. should be good for.
  28. -- 
  29. Arthritic bureaucracies don't tame new  | Henry Spencer @ U of Toronto Zoology
  30. frontiers. -Paul A. Gigot, WSJ, on NASA |  henry@zoo.toronto.edu  utzoo!henry
  31.  
  32.  
  33. Volume-Number: Volume 24, Number 71
  34.  
  35.