4.3BSD-UWisc/man/cat8/ypserv.8

Compare this file to the similar file:
Show the results in this format:




YPSERV(8)           UNIX Programmer's Manual            YPSERV(8)



NAME
     ypserv - yellow pages server and binder processes

SYNOPSIS
     /usr/etc/ypserv
     /etc/ypbind

DESCRIPTION
     The yellow pages (YP) provides a simple network lookup ser-
     vice consisting of databases and processes.  The databases
     are _d_b_m(3) files in a directory tree rooted at /_e_t_c/_y_p.
     These files are described in ypfiles(5).  The processes are
     /_u_s_r/_e_t_c/_y_p_s_e_r_v, the YP database lookup server, and
     /_e_t_c/_y_p_b_i_n_d, the YP binder.  The programmatic interface to
     YP is described in ypclnt(3N).  Administrative tools are
     described in yppush(8), ypxfr(8), yppoll(8), ypwhich(8), and
     ypset(8).  Tools to see the contents of YP maps are
     described in ypcat(8), and ypmatch(1).  Database generation
     and maintenance tools are described in ypinit(8), ypmake(8),
     and makedbm(8).

     Both _y_p_s_e_r_v and _y_p_b_i_n_d are daemon processes typically
     activated at system startup time from /_e_t_c/_r_c._l_o_c_a_l.  _y_p_s_e_r_v
     runs only on YP server machines with a complete YP database.
     _y_p_b_i_n_d runs on all machines using YP services, both YP
     servers and clients.

     The _y_p_s_e_r_v daemon's primary function is to look up informa-
     tion in its local database of YP maps.  The operations per-
     formed by _y_p_s_e_r_v are defined for the implementor by the _Y_P
     _p_r_o_t_o_c_o_l _s_p_e_c_i_f_i_c_a_t_i_o_n, and for the programmer by the header
     file <rpcsvc/yp_prot.h>. Communication to and from _y_p_s_e_r_v is
     by means of RPC calls.  Lookup functions are described in
     ypclnt(3N), and are supplied as C-callable funtions in
     /_l_i_b/_l_i_b_c.  There are four lookup functions, all of which
     are performed on a specified map within some YP domain:
     _M_a_t_c_h, _G_e_t__f_i_r_s_t, _G_e_t__n_e_x_t, and _G_e_t__a_l_l.  The _M_a_t_c_h opera-
     tion takes a key, and returns the associated value.  The
     _G_e_t__f_i_r_s_t operation returns the first key-value pair from
     the map, and _G_e_t__n_e_x_t can be used to enumerate the
     remainder. _G_e_t__a_l_l ships the entire map to the requester as
     the response to a single RPC request.

     Two other functions supply information about the map, rather
     than map entries: _G_e_t__o_r_d_e_r__n_u_m_b_e_r, and _G_e_t__m_a_s_t_e_r__n_a_m_e.  In
     fact, both order number and master name exist in the map as
     key-value pairs, but the server will not return either
     through the normal lookup functions.  (If you examine the
     map with _m_a_k_e_d_b_m(8), however, they will be visible.)  Other
     functions are used within the YP subsystem itself, and are
     not of general interest to YP clients.  They include
     _D_o__y_o_u__s_e_r_v_e__t_h_i_s__d_o_m_a_i_n?, _T_r_a_n_s_f_e_r__m_a_p, and



Printed 12/27/86         6 December 1985                        1






YPSERV(8)           UNIX Programmer's Manual            YPSERV(8)



     _R_e_i_n_i_t_i_a_l_i_z_e__i_n_t_e_r_n_a_l__s_t_a_t_e.

     The function of _y_p_b_i_n_d is to remember information that lets
     client processes on a single node communicate with some
     _y_p_s_e_r_v process.  _y_p_b_i_n_d must run on every machine which has
     YP client processes; _y_p_s_e_r_v may or may not be running on the
     same node, but must be running somewhere on the network.

     The information _y_p_b_i_n_d remembers is called a _b_i_n_d_i_n_g - the
     association of a domain name with the internet address of
     the YP server, and the port on that host at which the _y_p_s_e_r_v
     process is listening for service requests.  The process of
     binding is driven by client requests.  As a request for an
     unbound domain comes in, the _y_p_b_i_n_d process broadcasts on
     the net trying to find a _y_p_s_e_r_v process that serves maps
     within that domain.  Since the binding is established by
     broadcasting, there must be at least one _y_p_s_e_r_v process on
     every net.  Once a domain is bound by a particular _y_p_b_i_n_d,
     that same binding is given to every client process on the
     node.  The _y_p_b_i_n_d process on the local node or a remote node
     may be queried for the binding of a particular domain by
     using the _y_p_w_h_i_c_h(1) command.

     Bindings are verified before they are given out to a client
     process.  If _y_p_b_i_n_d is unable to speak to the _y_p_s_e_r_v process
     it's bound to, it marks the domain as unbound, tells the
     client process that the domain is unbound, and tries to bind
     the domain once again.  Requests received for an unbound
     domain will fail immediately.  In general, a bound domain is
     marked as unbound when the node running _y_p_s_e_r_v crashes or
     gets overloaded.  In such a case, _y_p_b_i_n_d will to bind any YP
     server (typically one that is less-heavily loaded) available
     on the net.

     _y_p_b_i_n_d also accepts requests to set its binding for a par-
     ticular domain.  The request is usually generated by the YP
     subsystem itself.  _y_p_s_e_t(8) is a command to access the
     _S_e_t__d_o_m_a_i_n facility.  It is for unsnarling messes, not for
     casual use.

FILES
     If the file /_u_s_r/_e_t_c/_y_p/_y_p_s_e_r_v._l_o_g exists when _y_p_s_e_r_v starts
     up, log information will be written to this file when error
     conditions arise.

SEE ALSO
     ypclnt(3N), ypfiles(5), ypcat(8), ypmatch(8), yppush(8),
     ypwhich(8), ypxfr(8), ypset(8), YP protocol specification







Printed 12/27/86         6 December 1985                        2