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

  1.  
  2.  
  3.  
  4. iiiinnnnttttrrrroooo((((3333NNNN))))                                                            iiiinnnnttttrrrroooo((((3333NNNN))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      _iiii_nnnn_tttt_rrrr_oooo - introduction to SVR4 networking functions and libraries
  10.  
  11. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  12.      This section describes functions found in the SVR4 networking library.
  13.      Function declarations can be obtained from the _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee files indicated
  14.      on each page.  Certain major collections are identified by a letter after
  15.      the section number:
  16.  
  17.      The SVR4 networking functions are contained in a single libraries known
  18.      as the Network Services library, _llll_iiii_bbbb_nnnn_ssss_llll.
  19.  
  20.      The following functions constitute the _llll_iiii_bbbb_nnnn_ssss_llll library:
  21.  
  22.           _nnnn_eeee_tttt_dddd_iiii_rrrr
  23.                Network Directory functions.  This contains look-up functions
  24.                and the access point to network directory libraries for various
  25.                network transports.
  26.  
  27.           _nnnn_eeee_tttt_ssss_eeee_llll_eeee_cccc_tttt
  28.                Network Selection routines.  These functions manipulate the
  29.                _////_eeee_tttt_cccc_////_nnnn_eeee_tttt_cccc_oooo_nnnn_ffff_iiii_gggg file and return entries.
  30.  
  31.           _nnnn_ssss_llll  Transport Level Interface (TLI).  These functions contain the
  32.                implementation of X/OPEN's Transport Level Interface.
  33.  
  34.           _rrrr_eeee_xxxx_eeee_cccc
  35.                REXEC library interface
  36.  
  37.           _rrrr_pppp_cccc  User-level Remote Procedure Call library
  38.  
  39.           _ssss_aaaa_ffff  Service Access Facility library
  40.  
  41.           _yyyy_pppp   Network Information Service functions.  [The NIS functions have
  42.                been moved to libc.]
  43.  
  44. DDDDEEEEFFFFIIIINNNNIIIITTTTIIIIOOOONNNNSSSS
  45.      In the Network Services library, _nnnn_eeee_tttt_bbbb_uuuu_ffff is a structure used in various
  46.      TLI functions to send and receive data and information.  _nnnn_eeee_tttt_bbbb_uuuu_ffff is
  47.      defined in _ssss_yyyy_ssss_////_tttt_iiii_uuuu_ssss_eeee_rrrr_...._hhhh, and includes the following members:
  48.  
  49.           _ssss_tttt_rrrr_uuuu_cccc_tttt _nnnn_eeee_tttt_bbbb_uuuu_ffff _{{{{
  50.                _uuuu_nnnn_ssss_iiii_gggg_nnnn_eeee_dddd _iiii_nnnn_tttt _mmmm_aaaa_xxxx_llll_eeee_nnnn_;;;;  _////_**** _TTTT_hhhh_eeee _pppp_hhhh_yyyy_ssss_iiii_cccc_aaaa_llll _ssss_iiii_zzzz_eeee _oooo_ffff _tttt_hhhh_eeee _bbbb_uuuu_ffff_ffff_eeee_rrrr _****_////
  51.                _uuuu_nnnn_ssss_iiii_gggg_nnnn_eeee_dddd _iiii_nnnn_tttt _llll_eeee_nnnn_;;;; _////_**** _TTTT_hhhh_eeee _nnnn_uuuu_mmmm_bbbb_eeee_rrrr _oooo_ffff _bbbb_yyyy_tttt_eeee_ssss _iiii_nnnn _tttt_hhhh_eeee _bbbb_uuuu_ffff_ffff_eeee_rrrr _****_////
  52.                _cccc_hhhh_aaaa_rrrr _****_bbbb_uuuu_ffff_;;;;  _////_**** _PPPP_oooo_iiii_nnnn_tttt_ssss _tttt_oooo _uuuu_ssss_eeee_rrrr _iiii_nnnn_pppp_uuuu_tttt _aaaa_nnnn_dddd_////_oooo_rrrr _oooo_uuuu_tttt_pppp_uuuu_tttt _bbbb_uuuu_ffff_ffff_eeee_rrrr _****_////
  53.           _}}}}_;;;;
  54.  
  55.  
  56.      If _nnnn_eeee_tttt_bbbb_uuuu_ffff is used for output, the function will set the user value of _l_e_n
  57.      on return.  _m_a_x_l_e_n generally has significance only when _b_u_f is used to
  58.      receive output from the TLI function.  In this case, it specifies the
  59.      maximum value of _l_e_n that can be set by the function.  If _m_a_x_l_e_n is not
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. iiiinnnnttttrrrroooo((((3333NNNN))))                                                            iiiinnnnttttrrrroooo((((3333NNNN))))
  71.  
  72.  
  73.  
  74.      large enough to hold the returned information, an TBUFOVFLW error will
  75.      generally result.  However, certain functions may return part of the data
  76.      and not generate an error.
  77.  
  78. FFFFIIIILLLLEEEESSSS
  79.      _I_N_C_D_I_R              usually _////_uuuu_ssss_rrrr_////_iiii_nnnn_cccc_llll_uuuu_dddd_eeee
  80.      _L_I_B_D_I_R                   usually _////_uuuu_ssss_rrrr_////_cccc_cccc_ssss_////_llll_iiii_bbbb
  81.      _L_I_B_D_I_R_////_llll_iiii_bbbb_ssss_oooo_cccc_kkkk_eeee_tttt_...._ssss_oooo (normally unused, see below)
  82.      _L_I_B_D_I_R_////_llll_iiii_bbbb_nnnn_ssss_llll_...._ssss_oooo
  83.  
  84. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  85.      _iiii_nnnn_tttt_rrrr_oooo(3)
  86.  
  87. NNNNOOOOTTTTEEEESSSS
  88.      None of the functions, external variables, or macros should be redefined
  89.      in the user's programs.  Any other name may be redefined without
  90.      affecting the behavior of other library functions, but such redefinition
  91.      may conflict with a declaration in an included header file.
  92.  
  93.      The header files in _I_N_C_D_I_R provide function prototypes (function
  94.      declarations including the types of arguments) for most of the functions
  95.      listed in this manual.  Function prototypes allow the compiler to check
  96.      for correct usage of these functions in the user's program.  The _llll_iiii_nnnn_tttt
  97.      program checker may also be used and will report discrepancies even if
  98.      the header files are not included with _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee statements.  Use of _llll_iiii_nnnn_tttt
  99.      is highly recommended.
  100.  
  101.      In detailed definitions of components, it is sometimes necessary to refer
  102.      to symbolic names that are implementation-specific, but which are not
  103.      necessarily expected to be accessible to an application program.  Many of
  104.      these symbolic names describe boundary conditions and system limits.
  105.  
  106.      In this section, for readability, these implementation-specific values
  107.      are given symbolic names.  These names always appear enclosed in curly
  108.      brackets to distinguish them from symbolic names of other
  109.      implementation-specific constants that are accessible to application
  110.      programs by header files.  These names are not necessarily accessible to
  111.      an application program through a header file, although they may be
  112.      defined in the documentation for a particular system.
  113.  
  114.      In general, a portable application program should not refer to these
  115.      symbolic names in its code.  For example, an application program would
  116.      not be expected to test the length of an argument list given to a routine
  117.      to determine if it was greater than {ARG_MAX}.
  118.  
  119.      There are 2 types of networking in IRIX.
  120.  
  121.           1)  BSD sockets implemented in the kernel, along with SUN RPC and
  122.           NIS (YP).  The functions that implement these calls are in libc [see
  123.           _i_n_t_r_o(_3)].
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. iiiinnnnttttrrrroooo((((3333NNNN))))                                                            iiiinnnnttttrrrroooo((((3333NNNN))))
  137.  
  138.  
  139.  
  140.           2)  SVR4-style STREAMS/TLI/DLPI networking (not sockets), along with
  141.           SVR4-style RPC.  SVR4-style RPC doesn't work with sockets, only with
  142.           the TLI.  Also, SVR4-style networking does not support NIS.  The
  143.           functions that implement these calls are in libnsl, and to use them,
  144.           the code must be compiled with :
  145.  
  146.                cc -D_SVR4_TIRPC prog.c -lnsl
  147.  
  148.           eeeeooooeeee....sssswwww....ssssvvvvrrrr4444nnnneeeetttt must be installed to use the TLI functionality.
  149.           eeeeooooeeee....sssswwww....ddddllllppppiiii must be installed to use the DLPI (Data-link Provider
  150.           Interface) functionality.
  151.  
  152.           In order to fully support the MIPS ABI, there is a library
  153.           (libsocket) that can be linked with explicitly.  There are no header
  154.           file or semantic differences when using libsocket.  The MIPS ABI-
  155.           compliant programs that use sockets must (in order to be ABI-
  156.           compliant) link with libsocket.  To compile such a program, use:
  157.  
  158.                cc prog.c -lsocket
  159.  
  160.           This library exists solely to satisfy the ABI; it uses the standard
  161.           IRIX socket services described above to implement the specified
  162.           functionality.
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.                                                                         PPPPaaaaggggeeee 3333
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.