[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home |
Legal |
Search ]
Technical Reference: Communications, Volume 1
yp_update Subroutine
Purpose
Makes changes to an Network Information Services (NIS)
map.
Library
C Library (libc.a)
Syntax
#include <rpcsvc/ypclnt.h>
#include <rpcsvc/yp_prot.h>
yp_update (indomain, inmap, ypop, inkey, inkeylen, indata, indatalen)
char * indomain;
char * inmap;
unsigned ypop;
char * inkey;
int inkeylen;
char * indata;
int indatalen;
Description
Note
This routine depends upon the secure Remote Procedure Call
(RPC) protocol, and will not work unless the network is running it.
The yp_update subroutine is
used to make changes to a NIS map. The syntax is the same as that
of the yp_match subroutine except for the additional ypop parameter, which may take on one of the following
four values:
Value |
Description |
ypop _INSERT |
Inserts the key-value pair into the map. If the key already exists
in the map, the yp_update subroutine returns a value
of YPERR_KEY. |
ypop_CHANGE |
Changes the data associated with the key to the new value. If the
key is not found in the map, the yp_update subroutine
returns a value of YPERR_KEY. |
ypop_STORE |
Stores an item in the map regardless of whether the item already
exists. No error is returned in either case. |
ypop_DELETE |
Deletes an entry from the map. |
Parameters
indomain |
Points to the name of the domain used as input to the subroutine. |
inmap |
Points to the name of the map used as input to the subroutine. |
ypop |
Specifies the update operation to be used as input to the subroutine. |
inkey |
Points to the input key to be used as input to the subroutine. |
inkeylen |
Specifies the length, in bytes, of the inkey
parameter. |
indata |
Points to the data used as input to the subroutine. |
indatalen |
Specifies the length, in bytes, of the data used as input to the
subroutine. |
Return Values
Upon successful completion, this routine returns a
value of 0. If unsuccessful, it returns one of the error codes described in
the rpcsvc/yp_prot.h file.
Files
Related Information
The yp_match subroutine.
Network Information Service
(NIS) Overview for System Management in AIX 5L Version 5.2 System Management Guide: Communications and Networks.
List of NIS Programming References and Remote Procedure Call (RPC) Overview for
Programming in AIX 5L Version 5.2 Communications Programming Concepts.
[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home |
Legal |
Search ]