home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / std_unix / mod.std.unix.v9 / text0011.txt < prev    next >
Encoding:
Internet Message Format  |  1987-06-30  |  1.9 KB

  1. From: cbosgd!mark@seismo.css.gov (Mark Horton)
  2. Date: 4 Jan 87 21:19:54 GMT
  3. Organization: AT&T Bell Laboratories, Columbus, Oh
  4.  
  5. I was just going through POSIX and noticed that the only mechanism
  6. for determining the node name is uname (4.4.1.)  I think it's clear
  7. that, while uname is adequate for UUCP, the 8 character limit on
  8. the node name is inadequate for other networks, especially domain
  9. networks such as the ARPANET, CSNET, and the UUCP Zone.  It won't
  10. be adequate for OSI, either, although it isn't currently clear what
  11. would be, since host names may not even be character strings in OSI.
  12.  
  13. While P.1003 does not restrict implementations to SYS_NMLN=9 (including
  14. the null) it requires that all 5 fields support the full length.
  15. I don't know of any way to increase SYS_NMLN while maintaining binary
  16. compatibility with older programs, which is a typical requirement.
  17.  
  18. I am also unaware of any application that makes use of the other four
  19. fields.  (Of course, as soon as I say that, several people will point
  20. some out, but I don't know of a runtime use for those fields that is
  21. sufficiently motivating to be included in POSIX.)  A similar feature
  22. would be useful at compile time (predefined preprocessor variables to
  23. allow conditional compilation based on the version) but the typical
  24. program needs to make these decisions at compile time, not runtime.
  25.  
  26. Wouldn't it make more sense to standardize on a simple long character
  27. string for the node name?  Assuming that OSI names can somehow be
  28. encoded as character strings (a fairly safe assumption, I think)
  29. this ought to handle all the cases.  The 4.2BSD gethostname function,
  30. which passes the length of the buffer:
  31.     gethostname(buffer, bufferlen)
  32.     char *buffer;
  33.     int bufferlen;
  34. seems perfectly suited to this problem.
  35.  
  36. I believe that uname will have to be phased out in favor of a more
  37. general mechanism over the next few years.  Why is it in the standard?
  38.  
  39.     Mark
  40.  
  41. Volume-Number: Volume 9, Number 12
  42.  
  43.