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

NAME

6       nis_server,  nis_mkdir,  nis_rmdir,  nis_servstate, nis_stats, nis_get‐
7       servlist, nis_freeservlist, nis_freetags - miscellaneous NIS+ functions
8

SYNOPSIS

10       cc [ flag... ] file... -lnsl [ library... ]
11       #include <rpcsvc/nis.h>
12
13       nis_error nis_mkdir(nis_name dirname, nis_server *machine);
14
15
16       nis_error nis_rmdir(nis_name dirname, nis_server *machine);
17
18
19       nis_error nis_servstate(nis_server *machine, nis_tag *tags, int numtags,
20            nis_tag **result);
21
22
23       nis_error nis_stats(nis_server *machine, nis_tag *tags, int numtags,
24            nis_tag **result);
25
26
27       void nis_freetags(nis_tag *tags, int numtags);
28
29
30       nis_server **nis_getservlist(nis_name dirname);
31
32
33       void nis_freeservlist(nis_server **machines);
34
35

DESCRIPTION

37       These functions provide a variety of services for NIS+ applications.
38
39
40       The nis_mkdir() function is used to create the necessary  databases  to
41       support NIS+ service for a directory, dirname, on a server, machine. If
42       this operation is  successful,  it  means  that  the  directory  object
43       describing  dirname  has been updated to reflect that server machine is
44       serving the named directory. For a description of the nis_server struc‐
45       ture, refer to nis_objects(3NSL).
46
47
48       Per-server  and  per-directory  access  restrictions  can  apply to the
49       nis_mkdir() function. See nisopaccess(1).
50
51
52       The nis_rmdir() function is used to delete the directory, dirname, from
53       the specified server machine. The machine parameter cannot be NULL. The
54       nis_rmdir() function does not remove the  directory  dirname  from  the
55       namespace  or  remove  a  server  from the server list in the directory
56       object. To  remove  a  directory  from  the  namespace  you  must  call
57       nis_remove()  to  remove  the  directory dirname from the namespace and
58       call thenis_rmdir() for each server in the server list  to  remove  the
59       directory  from  the  server. To remove a replica from the server list,
60       you need to first call nis_modify()  to  remove  the  server  from  the
61       directory object and then call nis_rmdir() to remove the replica.
62
63
64       Per-server   and   per-directory   access  restrictions  can  apply  to
65       nis_rmdir(). See nisopaccess(1).
66
67
68       For   a   description   of   the   nis_server   structure,   refer   to
69       nis_objects(3NSL).
70
71
72       The  nis_servstate() function is used to set and read the various state
73       variables of the NIS+ servers. In  particular  the  internal  debugging
74       state of the servers can be set and queried.
75
76
77       The  nis_stats()  function is used to retrieve statistics about how the
78       server is operating. Tracking these statistics can help  administrators
79       determine  when  they  need to add additional replicas or to break up a
80       domain into two or more subdomains. For  more  information  on  reading
81       statistics, see nisstat(1M)
82
83
84       The nis_servstate() and nis_stats() functions use the tag list. The tag
85       list is a variable length array of nis_tag structures whose  length  is
86       passed  to the function in the numtags parameter. The set of legal tags
87       are defined in  the  file  <rpcsvc/nis_tags.h>  which  is  included  in
88       <rpcsvc/nis.h>.  Because these tags can and do vary between implementa‐
89       tions of the NIS+ service, it is best to consult this file for the sup‐
90       ported list. Passing unrecognized tags to a server will result in their
91       tag_value member being set to the string unknown. Both of  these  func‐
92       tions return their results in malloced tag structure, *result. If there
93       is an error, *result is set to NULL. The tag_value pointers  points  to
94       allocated  string memory which contains the results. Use nis_freetags()
95       to free the tag structure.
96
97
98       Per-server and per-directory  access  restrictions  can  apply  to  the
99       NIS_SERVSTATE  or  NIS_STATUS  (nis_stats())  operations and their sub-
100       operations (tags). See nisopaccess(1).
101
102
103       The nis_getservlist()  function  returns  a  null  terminated  list  of
104       nis_server structures that represent the list of servers that serve the
105       domain named dirname. Servers from this list can be used  when  calling
106       functions  that require the name of a NIS+ server. For a description of
107       the nis_server refer to nis_objects(3NSL). nis_freeservlist() frees the
108       list  of  servers  list  of servers returned by nis_getservlist(). Note
109       that this is the only legal way to free that list.
110

ATTRIBUTES

112       See attributes(5) for descriptions of the following attributes:
113
114
115
116
117       ┌─────────────────────────────┬─────────────────────────────┐
118       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
119       ├─────────────────────────────┼─────────────────────────────┤
120       │MT-Level                     │MT-Safe                      │
121       └─────────────────────────────┴─────────────────────────────┘
122

SEE ALSO

124       nisopaccess(1),   nisstat(1M),   nis_names(3NSL),    nis_objects(3NSL),
125       nis_subr(3NSL), attributes(5)
126

NOTES

128       NIS+ might not be supported in future releases of the Solaris operating
129       system. Tools to aid the migration from NIS+ to LDAP are  available  in
130       the    current   Solaris   release.   For   more   information,   visit
131       http://www.sun.com/directory/nisplus/transition.html.
132
133
134
135SunOS 5.11                        10 Nov 2005                 nis_server(3NSL)
Impressum