xref: /illumos-gate/usr/src/lib/libnsl/nss/nss.h (revision 20a7641f9918de8574b8b3b47dbe35c4bfc78df1)
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 2006 Sun Microsystems, Inc.  All rights reserved.
23  * Use is subject to license terms.
24  */
25 
26 #ifndef	_NSS_H
27 #define	_NSS_H
28 
29 #include <sys/socket.h>
30 #include <netinet/in.h>
31 #include <nss_common.h>
32 #include <netdb.h>
33 
34 #ifdef	__cplusplus
35 extern "C" {
36 #endif
37 
38 extern struct hostent	*_switch_gethostbyname_r(const char *, struct hostent *,
39     char *, int, int *);
40 extern struct hostent	*_switch_gethostbyaddr_r(const char *, int, int,
41     struct hostent *, char *, int, int *);
42 extern struct hostent	*_switch_getipnodebyname_r(const char *,
43     struct hostent *, char *, int, int, int, int *);
44 extern struct hostent	*_switch_getipnodebyaddr_r(const char *, int, int,
45     struct hostent *, char *, int, int *);
46 extern struct hostent	*_door_gethostbyname_r(const char *, struct hostent *,
47     char *, int, int *);
48 extern struct hostent	*_door_gethostbyaddr_r(const char *, int, int,
49     struct hostent *, char *, int, int *);
50 extern struct hostent	*_door_getipnodebyname_r(const char *, struct hostent *,
51     char *, int, int, int, int *);
52 extern struct hostent	*_door_getipnodebyaddr_r(const char *, int, int,
53     struct hostent *, char *, int, int *);
54 extern struct hostent	*__mappedtov4(struct hostent *, int *);
55 extern int	str2hostent(const char *, int, void *, char *, int);
56 extern int	str2hostent6(const char *, int, void *, char *, int);
57 extern int	__str2hostent(int, const char *, int, void *, char *, int);
58 extern int	str2servent(const char *, int, void *, char *, int);
59 extern void	_nss_initf_hosts(nss_db_params_t *);
60 extern void	_nss_initf_ipnodes(nss_db_params_t *);
61 extern void	order_haddrlist_af(sa_family_t, char **);
62 extern int	nss_ioctl(int, int, void *);
63 
64 /* parse.c */
65 extern char *_strtok_escape(char *, char *, char **);
66 extern char *_strpbrk_escape(char *, char *);
67 extern char *_escape(char *, char *);
68 extern char *_unescape(char *, char *);
69 extern char *_strdup_null(char *);
70 extern int _readbufline(char *,	int, char *, int, int *);
71 
72 #ifdef	__cplusplus
73 }
74 #endif
75 
76 #endif	/* _NSS_H */
77