xref: /titanic_50/usr/src/head/rpcsvc/nislib.h (revision 694c35faa87b858ecdadfe4fc592615f4eefbb07)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License (the "License").
6  * You may not use this file except in compliance with the License.
7  *
8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9  * or http://www.opensolaris.org/os/licensing.
10  * See the License for the specific language governing permissions
11  * and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL HEADER in each
14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15  * If applicable, add the following below this CDDL HEADER, with the
16  * fields enclosed by brackets "[]" replaced with your own identifying
17  * information: Portions Copyright [yyyy] [name of copyright owner]
18  *
19  * CDDL HEADER END
20  */
21 /*
22  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23  * Use is subject to license terms.
24  */
25 
26 /*
27  * nislib.h
28  *
29  * This file contains the interfaces that are visible in the SunOS 5.x
30  * implementation of NIS Plus. When using C++ the defined __cplusplus and
31  * __STDC__ should both be true.
32  */
33 
34 #ifndef	_RPCSVC_NISLIB_H
35 #define	_RPCSVC_NISLIB_H
36 
37 
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
41 
42 #ifdef __STDC__
43 extern name_pos nis_dir_cmp(nis_name, nis_name);
44 
45 extern nis_name nis_domain_of(nis_name);
46 extern nis_name nis_leaf_of(nis_name);
47 extern nis_name nis_leaf_of_r(const nis_name, char *, size_t);
48 extern nis_name nis_name_of(nis_name);
49 extern nis_name nis_local_group(void);
50 extern nis_name nis_local_directory(void);
51 extern nis_name nis_local_host(void);
52 
53 extern void nis_destroy_object(nis_object *);
54 extern nis_object *nis_clone_object(nis_object *, nis_object *);
55 extern nis_object *nis_read_obj(char *);
56 extern int nis_write_obj(char *, nis_object *);
57 
58 extern void *nis_get_static_storage(struct nis_sdata *, uint_t, uint_t);
59 extern nis_name __nis_rpc_domain(void);
60 
61 CLIENT *__nis_clnt_create(int, struct netconfig *, char *, struct netbuf *,
62 			int, int, int, int, int);
63 
64 #else
65 
66 /* Non-prototype definitions (old fashioned C) */
67 
68 extern name_pos nis_dir_cmp();
69 
70 extern nis_name nis_domain_of();
71 extern nis_name nis_leaf_of();
72 extern nis_name nis_leaf_of_r();
73 extern nis_name nis_name_of();
74 extern nis_name nis_local_group();
75 extern nis_name nis_local_directory();
76 extern nis_name nis_local_host();
77 
78 extern void nis_destroy_object();
79 extern nis_object *nis_clone_object();
80 
81 extern nis_object *nis_read_obj();
82 extern int nis_write_obj();
83 extern void *nis_get_static_storage();
84 extern nis_name __nis_rpc_domain();
85 
86 CLIENT *__nis_clnt_create();
87 
88 #endif
89 
90 #ifdef	__cplusplus
91 }
92 #endif
93 
94 #endif	/* _RPCSVC_NISLIB_H */
95