home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / gnu / ixemul-39.47-env-bin.lha / man / cat2 / gethostname.0 < prev    next >
Text File  |  1993-12-07  |  2KB  |  67 lines

  1.  
  2. GETHOSTNAME(2)             UNIX Programmer's Manual             GETHOSTNAME(2)
  3.  
  4. NNAAMMEE
  5.      ggeetthhoossttnnaammee, sseetthhoossttnnaammee - get/set name of current host
  6.  
  7. SSYYNNOOPPSSIISS
  8.      ##iinncclluuddee <<uunniissttdd..hh>>
  9.  
  10.      _i_n_t
  11.      ggeetthhoossttnnaammee(_c_h_a_r _*_n_a_m_e, _i_n_t _n_a_m_e_l_e_n)
  12.  
  13.      _i_n_t
  14.      sseetthhoossttnnaammee(_c_o_n_s_t _c_h_a_r _*_n_a_m_e, _i_n_t _n_a_m_e_l_e_n)
  15.  
  16. DDEESSCCRRIIPPTTIIOONN
  17.      GGeetthhoossttnnaammee() returns the standard host name for the current processor,
  18.      as previously set by sseetthhoossttnnaammee().  The parameter _n_a_m_e_l_e_n specifies the
  19.      size of the _n_a_m_e array.  The returned name is null­terminated unless in­
  20.      sufficient space is provided.
  21.  
  22.      SSeetthhoossttnnaammee() sets the name of the host machine to be _n_a_m_e, which has
  23.      length _n_a_m_e_l_e_n. This call is restricted to the super­user and is normally
  24.      used only when the system is bootstrapped.
  25.  
  26. RREETTUURRNN VVAALLUUEESS
  27.      If the call succeeds a value of 0 is returned.  If the call fails, a val­
  28.      ue of ­1 is returned and an error code is placed in the global location
  29.      _e_r_r_n_o.
  30.  
  31. EERRRROORRSS
  32.      The following errors may be returned by these calls:
  33.  
  34.      [EFAULT]      The _n_a_m_e or _n_a_m_e_l_e_n parameter gave an invalid address.
  35.  
  36.      [EPERM]       The caller tried to set the hostname and was not the super­
  37.                    user.
  38.  
  39. SSEEEE AALLSSOO
  40.      gethostid(2)
  41.  
  42. BBUUGGSS
  43.      Host names are limited to MAXHOSTNAMELEN (from <_s_y_s_/_p_a_r_a_m_._h>) characters,
  44.      currently 64.
  45.  
  46. HHIISSTTOORRYY
  47.      The ggeetthhoossttnnaammee function call appeared in 4.2BSD.
  48.  
  49. 4.2 Berkeley Distribution       March 10, 1991                               1
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.