1nis_error(3NSL)      Networking Services Library Functions     nis_error(3NSL)
2
3
4

NAME

6       nis_error,  nis_sperrno, nis_perror, nis_lerror, nis_sperror, nis_sper‐
7       ror_r - display NIS+ error messages
8

SYNOPSIS

10       cc [ flag ... ] file ... -lnsl [ library ... ]
11       #include <rpcsvc/nis.h>
12
13
14
15       char *nis_sperrno(nis_error status);
16
17
18       void nis_perror(nis_error status, char *label);
19
20
21       void nis_lerror(nis_error status, char *label);
22
23
24       char *nis_sperror_r(nis_error status, char *label, char *buf, int length);
25
26
27       char *nis_sperror(nis_error status, char *label);
28
29

DESCRIPTION

31       These functions convert NIS+ status values into text strings.
32
33
34       nis_sperrno() simply returns a pointer to a string  constant  which  is
35       the error string.
36
37
38       nis_perror()  prints  the  error  message  corresponding  to  status as
39       ``label: error message'' on standard error.
40
41
42       nis_lerror() sends the error text to syslog(3C) at level  LOG_ERR.
43
44
45       The function nis_sperror_r(), returns a pointer to a string that can be
46       used or copied using the strdup() function (See string(3C)). The caller
47       must supply a string buffer, buf, large enough to hold the error string
48       (a  buffer  size  of 128 bytes is guaranteed to be sufficiently large).
49       status and  label  are  the  same  as  for  nis_perror().  The  pointer
50       returned  by   nis_sperror_r() is the same as buf, that is, the pointer
51       returned by the function is a pointer to buf. length specifies the num‐
52       ber of characters to copy from the error string to buf.
53
54
55       The  last function, nis_sperror(), is similar to nis_sperror_r() except
56       that the string is returned as a pointer to a buffer that is reused  on
57       each  call.  nis_sperror_r()  is  the  preferred interface, since it is
58       suitable for single-threaded and multi-threaded programs.
59
60
61       When compiling multithreaded applications, see  Intro(3), Notes On Mul‐
62       tithread  Applications, for information about the use of the _REENTRANT
63       flag.
64

ATTRIBUTES

66       See attributes(5) for descriptions of the following attributes:
67
68
69
70
71       ┌─────────────────────────────┬─────────────────────────────┐
72       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
73       ├─────────────────────────────┼─────────────────────────────┤
74       │MT-Level                     │Safe                         │
75       └─────────────────────────────┴─────────────────────────────┘
76

SEE ALSO

78       niserror(1), string(3C), syslog(3C), attributes(5)
79

NOTES

81       NIS+ might not be supported in future releases of the Solaris operating
82       system.  Tools  to aid the migration from NIS+ to LDAP are available in
83       the   current   Solaris   release.   For   more   information,    visit
84       http://www.sun.com/directory/nisplus/transition.html.
85
86
87
88SunOS 5.11                        10 Nov 2005                  nis_error(3NSL)
Impressum