Switch to SpeakEasy.net DSL

The Modular Manual Browser

Home Page
Manual: (SunOS-4.1.3)
Apropos / Subsearch:
optional field

YPUPDATE(3N)                                                      YPUPDATE(3N)

       yp_update - changes NIS information

       #include <&lt;rpcsvc/ypclnt.h>&gt;

       yp_update(domain, map, ypop, key, keylen, data, datalen)
       char *domain;
       char *map;
       unsigned ypop
       char *key;
       int keylen;
       char *data;
       int datalen;

       yp_update()  is used to make changes to the Network Information Service
       (NIS) database.  The syntax is the same  as  that  of  yp_match()  (see
       ypclnt(3N))  except  for the extra parameter ypop which may take on one
       of four values.  If it is YPOP_CHANGE then the data associated with the
       key  will  be changed to the new value.  If the key is not found in the
       database, then yp_update() returns YPERR_KEY.  If ypop  has  the  value
       YPOP_INSERT then the key-value pair will be inserted into the database.
       The error YPERR_KEY is returned if the key already exists in the  data-
       base.   To  store an item into the database without concern for whether
       it exists already or not, pass ypop as YPOP_STORE and no error will  be
       returned if the key already or does not exist.  To delete an entry, the
       value of ypop should be YPOP_DELETE.

       This routine depends upon secure RPC, and will not work unless the net-
       work is running secure RPC.


       The  Network Information Service (NIS) was formerly known as Sun Yellow
       Pages (YP).  The functionality of the two remains the  same;  only  the
       name  has  changed.  The name Yellow Pages is a registered trademark in
       the United Kingdom of British Telecommunications plc, and  may  not  be
       used without permission.

                                6 October 1987                    YPUPDATE(3N)