[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]

Technical Reference: Communications, Volume 1


yp_first Subroutine

Purpose

Returns the first key-value pair from the named Network Information Services (NIS) map in the named domain.

Library

C Library (libc.a)

Syntax

#include <rpcsvc/ypclnt.h>
#include <rpcsvc/yp_prot.h>


yp_first (indomain, inmap, outkey, outkeylen, outval, outvallen)
char * indomain;
char * inmap;
char ** outkey;
int * outkeylen;
char ** outval;
int * outvallen;

Description

The yp_first routine returns the first key-value pair from the named NIS map in the named domain.

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.
outkey Specifies the address of the uninitialized string pointer where the first key is returned. Memory is allocated by the NIS client using the malloc subroutine, and may be freed by the application.
outkeylen Returns the length, in bytes, of the outkey parameter.
outval Specifies the address of the uninitialized string pointer where the value associated with the key is returned. Memory is allocated by the NIS client using the malloc subroutine, and may be freed by the application.
outvallen Returns the length, in bytes, of the outval parameter.

Return Values

Upon successful completion, this subroutine returns a value of 0. If unsuccessful, it returns an error as described in the rpcsvc/yp_prot.h file.

Implementation Specifics

This subroutine is part of Base Operating System (BOS) Runtime.

Related Information

The malloc subroutine.

Network Information Service (NIS) Overview for System Management in AIX 5L Version 5.1 System Management Guide: Communications and Networks.

Remote Procedure Call (RPC) Overview for Programming and List of NIS Programming References in AIX 5L Version 5.1 Communications Programming Concepts.


[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]