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

Technical Reference: Communications, Volume 1


nis_sperror (NIS+ API)

Purpose

Returns a pointer to a string that can be used or copied using the strdup function.

Syntax

cc
 [ 
flag
 ... ] 
file
 ... 
-lnsl
 [ 
library
 ... ]
#include <rpcsvc/nis.h>

char * nis_sperror(nis_error status, char * label);

Description

One of a group of NIS+ APIs that convert NIS+ status values into strings, nis_sperror returns a pointer to a string that can be used or copied using the strdup function. The caller must supply a string buffer, buf, large enough to hold the error string (a buffer size of 128 bytes is guaranteed to be sufficiently large). status and label are the same as for nis_perror. The pointer returned by the function is a pointer to buf. length specifies the number of characters to copy from the error string to buf. The string is returned as a pointer to a buffer that is reused on each call.

Note: When compiling multithreaded applications, see Writing Reentrant and Thread-Safe Code for information about the use of the _REENTRANT flag.

Related Information

nis_add_entry, nis_first_entry, nis_list, nis_local_directory, nis_lookup, nis_modify_entry, nis_next_entry, nis_perror, and nis_remove_entry.

Network Information Services+ and NIS+ Namespace and Structure in AIX 5L Version 5.1 Network Information Services (NIS and NIS+) Guide.

TCP/IP Protocols in AIX 5L Version 5.1 System Management Guide: Communications and Networks.

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


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