xref: /titanic_50/usr/src/lib/libnsl/nss/nss.h (revision 0a47c91c895e274dd0990009919e30e984364a8b)
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 #pragma ident	"%Z%%M%	%I%	%E% SMI"
30 
31 #include <sys/socket.h>
32 #include <netinet/in.h>
33 #include <nss_common.h>
34 #include <netdb.h>
35 
36 #ifdef	__cplusplus
37 extern "C" {
38 #endif
39 
40 extern struct hostent	*_switch_gethostbyname_r(const char *, struct hostent *,
41     char *, int, int *);
42 extern struct hostent	*_switch_gethostbyaddr_r(const char *, int, int,
43     struct hostent *, char *, int, int *);
44 extern struct hostent	*_switch_getipnodebyname_r(const char *,
45     struct hostent *, char *, int, int, int, int *);
46 extern struct hostent	*_switch_getipnodebyaddr_r(const char *, int, int,
47     struct hostent *, char *, int, int *);
48 extern struct hostent	*_door_gethostbyname_r(const char *, struct hostent *,
49     char *, int, int *);
50 extern struct hostent	*_door_gethostbyaddr_r(const char *, int, int,
51     struct hostent *, char *, int, int *);
52 extern struct hostent	*_door_getipnodebyname_r(const char *, struct hostent *,
53     char *, int, int, int, int *);
54 extern struct hostent	*_door_getipnodebyaddr_r(const char *, int, int,
55     struct hostent *, char *, int, int *);
56 extern struct hostent	*__mappedtov4(struct hostent *, int *);
57 extern int	str2hostent(const char *, int, void *, char *, int);
58 extern int	str2hostent6(const char *, int, void *, char *, int);
59 extern int	__str2hostent(int, const char *, int, void *, char *, int);
60 extern int	str2servent(const char *, int, void *, char *, int);
61 extern void	_nss_initf_hosts(nss_db_params_t *);
62 extern void	_nss_initf_ipnodes(nss_db_params_t *);
63 extern void	order_haddrlist_af(sa_family_t, char **);
64 extern int	nss_ioctl(int, int, void *);
65 
66 /* parse.c */
67 extern char *_strtok_escape(char *, char *, char **);
68 extern char *_strpbrk_escape(char *, char *);
69 extern char *_escape(char *, char *);
70 extern char *_unescape(char *, char *);
71 extern char *_strdup_null(char *);
72 extern int _readbufline(char *,	int, char *, int, int *);
73 
74 #ifdef	__cplusplus
75 }
76 #endif
77 
78 #endif	/* _NSS_H */
79