home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3c / sysctl.z / sysctl
Encoding:
Text File  |  1998-10-20  |  6.2 KB  |  133 lines

  1.  
  2.  
  3.  
  4. ssssyyyyssssccccttttllll                                                                  ssssyyyyssssccccttttllll
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      sysctl - get or set system information
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ####iiiinnnncccclllluuuuddddeeee <<<<ssssyyyyssss////ssssyyyyssssccccttttllll....hhhh>>>>
  13.      ####iiiinnnncccclllluuuuddddeeee <<<<ssssyyyyssss////ssssoooocccckkkkeeeetttt....hhhh>>>>
  14.  
  15.      ssssyyyyssssccccttttllll((((iiiinnnntttt ****nnnnaaaammmmeeee,,,, uuuu____iiiinnnntttt nnnnaaaammmmeeeelllleeeennnn,,,, vvvvooooiiiidddd ****oooollllddddpppp,,,, ssssiiiizzzzeeee____tttt ****oooollllddddlllleeeennnnpppp,,,,
  16.           vvvvooooiiiidddd ****nnnneeeewwwwpppp,,,, ssssiiiizzzzeeee____tttt nnnneeeewwwwlllleeeennnn))))
  17.  
  18. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  19.      The _s_y_s_c_t_l function retrieves system information.  The information
  20.      available from _s_y_s_c_t_l consists of integers, strings, and tables, and is a
  21.      small subset of that available from the function of the same name in
  22.      _4._4_B_S_D-_L_i_t_e.
  23.  
  24.      Unless explicitly noted below, _s_y_s_c_t_l returns a consistent snapshot of
  25.      the data requested.  Consistency is obtained by locking the destination
  26.      buffer into memory so that the data may be copied out without blocking.
  27.  
  28.      The state is described using a ``Management Information Base'' (MIB)
  29.      style name, listed in _n_a_m_e, which is a _n_a_m_e_l_e_n length array of integers.
  30.  
  31.      The information is copied into the buffer specified by _o_l_d_p.  The size of
  32.      the buffer is given by the location specified by _o_l_d_l_e_n_p before the call,
  33.      and that location gives the amount of data copied after a successful
  34.      call.  If the amount of data available is greater than the size of the
  35.      buffer supplied, the call supplies as much data as fits in the buffer
  36.      provided and returns with the error code ENOMEM.  If the old value is not
  37.      desired, _o_l_d_p and _o_l_d_l_e_n_p should be set to NULL.
  38.  
  39.      The size of the available data can be determined by calling _s_y_s_c_t_l with a
  40.      NULL parameter for _o_l_d_p.  The size of the available data will be returned
  41.      in the location pointed to by _o_l_d_l_e_n_p.  For some operations, the amount
  42.      of space may change often.  For these operations, the system attempts to
  43.      round up so that the returned size is large enough for a call to return
  44.      the data shortly thereafter.
  45.  
  46.      To set a new value, _n_e_w_p is set to point to a buffer of length _n_e_w_l_e_n
  47.      from which the requested value is to be taken.  If a new value is not to
  48.      be set, _n_e_w_p should be set to NULL and _n_e_w_l_e_n set to 0.
  49.  
  50.      The top level names are defined with a CTL_ prefix in <_s_y_s/_s_y_s_c_t_l._h>, and
  51.      are as follows.  The next and subsequent levels down are found in the
  52.      include files listed here, and described in separate sections below.
  53.  
  54.  
  55.           _N_a_m_e      _N_e_x_t _l_e_v_e_l _n_a_m_e_s    _D_e_s_c_r_i_p_t_i_o_n
  56.           CTL_NET   sys/socket.h        Networking
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. ssssyyyyssssccccttttllll                                                                  ssssyyyyssssccccttttllll
  71.  
  72.  
  73.  
  74.    CCCCTTTTLLLL____NNNNEEEETTTT
  75.      The string and integer information available for the CTL_NET level is
  76.      detailed below.  The changeable column shows whether a process with
  77.      appropriate privilege may change the value.
  78.  
  79.  
  80.           _S_e_c_o_n_d _l_e_v_e_l _n_a_m_e   _T_y_p_e
  81.           PF_ROUTE       routing messages
  82.           PF_INET        internet values
  83.  
  84.      _P_F__R_O_U_T_E
  85.           Return the entire routing table or a subset of it.  The data is
  86.           returned as a sequence of routing messages.  See _r_o_u_t_e(7p) for the
  87.           header file, format and meaning).  The length of each message is
  88.           contained in the message header.
  89.  
  90.           The third level name is a protocol number, which is currently always
  91.           0.  The fourth level name is an address family, which may be set to
  92.           0 to select all address families.  The fifth and sixth level names
  93.           are as follows:
  94.  
  95.  
  96.           _F_i_f_t_h _l_e_v_e_l _n_a_m_e    _S_i_x_t_h _l_e_v_e_l _i_s:     _T_a_b_l_e
  97.           NET_RT_FLAGS        rtflags        Routing
  98.           NET_RT_DUMP         None      Routing (by flags)
  99.           NET_RT_IFLIST       None      Interface list
  100.  
  101.      _P_F__I_N_E_T
  102.           Get or set various global information about the internet protocols.
  103.           The third level name is the protocol.  The fourth level name is the
  104.           variable name.  The currently defined protocols and names are:
  105.  
  106.  
  107.           _P_r_o_t_o_c_o_l _n_a_m_e  _V_a_r_i_a_b_l_e _n_a_m_e  _T_y_p_e
  108.           ip             forwarding     integer
  109.           ip             redirect  integer
  110.           udp            checksum  integer
  111.  
  112.      The variables are as follows:
  113.  
  114.      ip.forwarding
  115.           Returns 1 when IP forwarding is enabled for the host, meaning that
  116.           the host is acting as a router.
  117.  
  118.      ip.redirect
  119.           Returns 1 when ICMP redirects may be sent by the host.  This option
  120.           is ignored unless the host is routing IP packets, and should
  121.           normally be enabled on all systems.
  122.  
  123.      udp.checksum
  124.           Returns 1 when UDP checksums are being computed and checked.
  125.           Disabling UDP checksums is strongly discouraged.
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.