xref: /onnv-gate/usr/src/lib/libresolv2/include/irs.h (revision 11038:74b12212b8a2)
10Sstevel@tonic-gate /*
2*11038SRao.Shoaib@Sun.COM  * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
30Sstevel@tonic-gate  * Copyright (c) 1996,1999 by Internet Software Consortium.
40Sstevel@tonic-gate  *
50Sstevel@tonic-gate  * Permission to use, copy, modify, and distribute this software for any
60Sstevel@tonic-gate  * purpose with or without fee is hereby granted, provided that the above
70Sstevel@tonic-gate  * copyright notice and this permission notice appear in all copies.
80Sstevel@tonic-gate  *
9*11038SRao.Shoaib@Sun.COM  * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
10*11038SRao.Shoaib@Sun.COM  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11*11038SRao.Shoaib@Sun.COM  * MERCHANTABILITY AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR
12*11038SRao.Shoaib@Sun.COM  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13*11038SRao.Shoaib@Sun.COM  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14*11038SRao.Shoaib@Sun.COM  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
15*11038SRao.Shoaib@Sun.COM  * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
160Sstevel@tonic-gate  */
170Sstevel@tonic-gate 
180Sstevel@tonic-gate /*
19*11038SRao.Shoaib@Sun.COM  * $Id: irs.h,v 1.5 2005/04/27 04:56:15 sra Exp $
200Sstevel@tonic-gate  */
210Sstevel@tonic-gate 
220Sstevel@tonic-gate #ifndef _IRS_H_INCLUDED
230Sstevel@tonic-gate #define _IRS_H_INCLUDED
240Sstevel@tonic-gate 
25*11038SRao.Shoaib@Sun.COM /*! \file */
26*11038SRao.Shoaib@Sun.COM 
270Sstevel@tonic-gate #include <sys/types.h>
280Sstevel@tonic-gate 
290Sstevel@tonic-gate #include <arpa/nameser.h>
300Sstevel@tonic-gate 
310Sstevel@tonic-gate #include <grp.h>
320Sstevel@tonic-gate #include <netdb.h>
330Sstevel@tonic-gate #include <resolv.h>
340Sstevel@tonic-gate #include <pwd.h>
350Sstevel@tonic-gate 
36*11038SRao.Shoaib@Sun.COM /*%
370Sstevel@tonic-gate  * This is the group map class.
380Sstevel@tonic-gate  */
390Sstevel@tonic-gate struct irs_gr {
400Sstevel@tonic-gate 	void *		private;
410Sstevel@tonic-gate 	void		(*close) __P((struct irs_gr *));
420Sstevel@tonic-gate 	struct group *	(*next) __P((struct irs_gr *));
430Sstevel@tonic-gate 	struct group *	(*byname) __P((struct irs_gr *, const char *));
440Sstevel@tonic-gate 	struct group *	(*bygid) __P((struct irs_gr *, gid_t));
450Sstevel@tonic-gate 	int		(*list) __P((struct irs_gr *, const char *,
460Sstevel@tonic-gate 				     gid_t, gid_t *, int *));
470Sstevel@tonic-gate 	void		(*rewind) __P((struct irs_gr *));
480Sstevel@tonic-gate 	void		(*minimize) __P((struct irs_gr *));
490Sstevel@tonic-gate 	struct __res_state * (*res_get) __P((struct irs_gr *));
500Sstevel@tonic-gate 	void		(*res_set) __P((struct irs_gr *, res_state,
510Sstevel@tonic-gate 					void (*)(void *)));
520Sstevel@tonic-gate };
530Sstevel@tonic-gate 
54*11038SRao.Shoaib@Sun.COM /*%
550Sstevel@tonic-gate  * This is the password map class.
560Sstevel@tonic-gate  */
570Sstevel@tonic-gate struct irs_pw {
580Sstevel@tonic-gate 	void *		private;
590Sstevel@tonic-gate 	void		(*close) __P((struct irs_pw *));
600Sstevel@tonic-gate 	struct passwd *	(*next) __P((struct irs_pw *));
610Sstevel@tonic-gate 	struct passwd *	(*byname) __P((struct irs_pw *, const char *));
620Sstevel@tonic-gate 	struct passwd *	(*byuid) __P((struct irs_pw *, uid_t));
630Sstevel@tonic-gate 	void		(*rewind) __P((struct irs_pw *));
640Sstevel@tonic-gate 	void		(*minimize) __P((struct irs_pw *));
650Sstevel@tonic-gate 	struct __res_state * (*res_get) __P((struct irs_pw *));
660Sstevel@tonic-gate 	void		(*res_set) __P((struct irs_pw *, res_state,
670Sstevel@tonic-gate 					void (*)(void *)));
680Sstevel@tonic-gate };
690Sstevel@tonic-gate 
70*11038SRao.Shoaib@Sun.COM /*%
710Sstevel@tonic-gate  * This is the service map class.
720Sstevel@tonic-gate  */
730Sstevel@tonic-gate struct irs_sv {
740Sstevel@tonic-gate 	void *		private;
750Sstevel@tonic-gate 	void		(*close) __P((struct irs_sv *));
760Sstevel@tonic-gate 	struct servent *(*byname) __P((struct irs_sv *,
770Sstevel@tonic-gate 				       const char *, const char *));
780Sstevel@tonic-gate 	struct servent *(*byport) __P((struct irs_sv *, int, const char *));
790Sstevel@tonic-gate 	struct servent *(*next) __P((struct irs_sv *));
800Sstevel@tonic-gate 	void		(*rewind) __P((struct irs_sv *));
810Sstevel@tonic-gate 	void		(*minimize) __P((struct irs_sv *));
820Sstevel@tonic-gate 	struct __res_state * (*res_get) __P((struct irs_sv *));
830Sstevel@tonic-gate 	void		(*res_set) __P((struct irs_sv *, res_state,
840Sstevel@tonic-gate 					void (*)(void *)));
850Sstevel@tonic-gate };
860Sstevel@tonic-gate 
87*11038SRao.Shoaib@Sun.COM /*%
880Sstevel@tonic-gate  * This is the protocols map class.
890Sstevel@tonic-gate  */
900Sstevel@tonic-gate struct irs_pr {
910Sstevel@tonic-gate 	void *		private;
920Sstevel@tonic-gate 	void		(*close) __P((struct irs_pr *));
930Sstevel@tonic-gate 	struct protoent	*(*byname) __P((struct irs_pr *, const char *));
940Sstevel@tonic-gate 	struct protoent	*(*bynumber) __P((struct irs_pr *, int));
950Sstevel@tonic-gate 	struct protoent	*(*next) __P((struct irs_pr *));
960Sstevel@tonic-gate 	void		(*rewind) __P((struct irs_pr *));
970Sstevel@tonic-gate 	void		(*minimize) __P((struct irs_pr *));
980Sstevel@tonic-gate 	struct __res_state * (*res_get) __P((struct irs_pr *));
990Sstevel@tonic-gate 	void		(*res_set) __P((struct irs_pr *, res_state,
1000Sstevel@tonic-gate 					void (*)(void *)));
1010Sstevel@tonic-gate };
1020Sstevel@tonic-gate 
103*11038SRao.Shoaib@Sun.COM /*%
1040Sstevel@tonic-gate  * This is the hosts map class.
1050Sstevel@tonic-gate  */
1060Sstevel@tonic-gate struct irs_ho {
1070Sstevel@tonic-gate 	void *		private;
1080Sstevel@tonic-gate 	void		(*close) __P((struct irs_ho *));
1090Sstevel@tonic-gate 	struct hostent *(*byname) __P((struct irs_ho *, const char *));
1100Sstevel@tonic-gate 	struct hostent *(*byname2) __P((struct irs_ho *, const char *, int));
1110Sstevel@tonic-gate 	struct hostent *(*byaddr) __P((struct irs_ho *,
1120Sstevel@tonic-gate 				       const void *, int, int));
1130Sstevel@tonic-gate 	struct hostent *(*next) __P((struct irs_ho *));
1140Sstevel@tonic-gate 	void		(*rewind) __P((struct irs_ho *));
1150Sstevel@tonic-gate 	void		(*minimize) __P((struct irs_ho *));
1160Sstevel@tonic-gate 	struct __res_state * (*res_get) __P((struct irs_ho *));
1170Sstevel@tonic-gate 	void		(*res_set) __P((struct irs_ho *, res_state,
1180Sstevel@tonic-gate 					void (*)(void *)));
1190Sstevel@tonic-gate 	struct addrinfo *(*addrinfo) __P((struct irs_ho *, const char *,
1200Sstevel@tonic-gate 					  const struct addrinfo *));
1210Sstevel@tonic-gate };
1220Sstevel@tonic-gate 
123*11038SRao.Shoaib@Sun.COM /*%
1240Sstevel@tonic-gate  * This is the networks map class.
1250Sstevel@tonic-gate  */
1260Sstevel@tonic-gate struct irs_nw {
1270Sstevel@tonic-gate 	void *		private;
1280Sstevel@tonic-gate 	void		(*close) __P((struct irs_nw *));
1290Sstevel@tonic-gate 	struct nwent *	(*byname) __P((struct irs_nw *, const char *, int));
1300Sstevel@tonic-gate 	struct nwent *	(*byaddr) __P((struct irs_nw *, void *, int, int));
1310Sstevel@tonic-gate 	struct nwent *	(*next) __P((struct irs_nw *));
1320Sstevel@tonic-gate 	void		(*rewind) __P((struct irs_nw *));
1330Sstevel@tonic-gate 	void		(*minimize) __P((struct irs_nw *));
1340Sstevel@tonic-gate 	struct __res_state * (*res_get) __P((struct irs_nw *));
1350Sstevel@tonic-gate 	void		(*res_set) __P((struct irs_nw *, res_state,
1360Sstevel@tonic-gate 					void (*)(void *)));
1370Sstevel@tonic-gate };
1380Sstevel@tonic-gate 
139*11038SRao.Shoaib@Sun.COM /*%
1400Sstevel@tonic-gate  * This is the netgroups map class.
1410Sstevel@tonic-gate  */
1420Sstevel@tonic-gate struct irs_ng {
1430Sstevel@tonic-gate 	void *		private;
1440Sstevel@tonic-gate 	void		(*close) __P((struct irs_ng *));
1450Sstevel@tonic-gate 	int		(*next) __P((struct irs_ng *, const char **,
1460Sstevel@tonic-gate 				     const char **, const char **));
1470Sstevel@tonic-gate 	int		(*test) __P((struct irs_ng *, const char *,
1480Sstevel@tonic-gate 				     const char *, const char *,
1490Sstevel@tonic-gate 				     const char *));
1500Sstevel@tonic-gate 	void		(*rewind) __P((struct irs_ng *, const char *));
1510Sstevel@tonic-gate 	void		(*minimize) __P((struct irs_ng *));
1520Sstevel@tonic-gate };
1530Sstevel@tonic-gate 
154*11038SRao.Shoaib@Sun.COM /*%
1550Sstevel@tonic-gate  * This is the generic map class, which copies the front of all others.
1560Sstevel@tonic-gate  */
1570Sstevel@tonic-gate struct irs_map {
1580Sstevel@tonic-gate 	void *		private;
1590Sstevel@tonic-gate 	void		(*close) __P((void *));
1600Sstevel@tonic-gate };
1610Sstevel@tonic-gate 
162*11038SRao.Shoaib@Sun.COM /*%
1630Sstevel@tonic-gate  * This is the accessor class.  It contains pointers to all of the
1640Sstevel@tonic-gate  * initializers for the map classes for a particular accessor.
1650Sstevel@tonic-gate  */
1660Sstevel@tonic-gate struct irs_acc {
1670Sstevel@tonic-gate 	void *		private;
1680Sstevel@tonic-gate 	void		(*close) __P((struct irs_acc *));
1690Sstevel@tonic-gate 	struct irs_gr *	(*gr_map) __P((struct irs_acc *));
1700Sstevel@tonic-gate 	struct irs_pw *	(*pw_map) __P((struct irs_acc *));
1710Sstevel@tonic-gate 	struct irs_sv *	(*sv_map) __P((struct irs_acc *));
1720Sstevel@tonic-gate 	struct irs_pr *	(*pr_map) __P((struct irs_acc *));
1730Sstevel@tonic-gate 	struct irs_ho *	(*ho_map) __P((struct irs_acc *));
1740Sstevel@tonic-gate 	struct irs_nw *	(*nw_map) __P((struct irs_acc *));
1750Sstevel@tonic-gate 	struct irs_ng *	(*ng_map) __P((struct irs_acc *));
1760Sstevel@tonic-gate 	struct __res_state * (*res_get) __P((struct irs_acc *));
1770Sstevel@tonic-gate 	void		(*res_set) __P((struct irs_acc *, res_state,
1780Sstevel@tonic-gate 					void (*)(void *)));
1790Sstevel@tonic-gate };
1800Sstevel@tonic-gate 
181*11038SRao.Shoaib@Sun.COM /*%
1820Sstevel@tonic-gate  * This is because the official definition of "struct netent" has no
1830Sstevel@tonic-gate  * concept of CIDR even though it allows variant address families (on
1840Sstevel@tonic-gate  * output but not input).  The compatibility stubs convert the structs
1850Sstevel@tonic-gate  * below into "struct netent"'s.
1860Sstevel@tonic-gate  */
1870Sstevel@tonic-gate struct nwent {
188*11038SRao.Shoaib@Sun.COM 	char		*n_name;	/*%< official name of net */
189*11038SRao.Shoaib@Sun.COM 	char		**n_aliases;	/*%< alias list */
190*11038SRao.Shoaib@Sun.COM 	int		n_addrtype;	/*%< net address type */
191*11038SRao.Shoaib@Sun.COM 	void		*n_addr;	/*%< network address */
192*11038SRao.Shoaib@Sun.COM 	int		n_length;	/*%< address length, in bits */
1930Sstevel@tonic-gate };
1940Sstevel@tonic-gate 
195*11038SRao.Shoaib@Sun.COM /*%
1960Sstevel@tonic-gate  * Hide external function names from POSIX.
1970Sstevel@tonic-gate  */
1980Sstevel@tonic-gate #define	irs_gen_acc	__irs_gen_acc
1990Sstevel@tonic-gate #define	irs_lcl_acc	__irs_lcl_acc
2000Sstevel@tonic-gate #define	irs_dns_acc	__irs_dns_acc
2010Sstevel@tonic-gate #define	irs_nis_acc	__irs_nis_acc
2020Sstevel@tonic-gate #define	irs_irp_acc	__irs_irp_acc
2030Sstevel@tonic-gate #define	irs_destroy	__irs_destroy
2040Sstevel@tonic-gate #define	irs_dns_gr	__irs_dns_gr
2050Sstevel@tonic-gate #define	irs_dns_ho	__irs_dns_ho
2060Sstevel@tonic-gate #define	irs_dns_nw	__irs_dns_nw
2070Sstevel@tonic-gate #define	irs_dns_pr	__irs_dns_pr
2080Sstevel@tonic-gate #define	irs_dns_pw	__irs_dns_pw
2090Sstevel@tonic-gate #define	irs_dns_sv	__irs_dns_sv
2100Sstevel@tonic-gate #define	irs_gen_gr	__irs_gen_gr
2110Sstevel@tonic-gate #define	irs_gen_ho	__irs_gen_ho
2120Sstevel@tonic-gate #define	irs_gen_ng	__irs_gen_ng
2130Sstevel@tonic-gate #define	irs_gen_nw	__irs_gen_nw
2140Sstevel@tonic-gate #define	irs_gen_pr	__irs_gen_pr
2150Sstevel@tonic-gate #define	irs_gen_pw	__irs_gen_pw
2160Sstevel@tonic-gate #define	irs_gen_sv	__irs_gen_sv
2170Sstevel@tonic-gate #define	irs_irp_get_full_response	__irs_irp_get_full_response
2180Sstevel@tonic-gate #define	irs_irp_gr	__irs_irp_gr
2190Sstevel@tonic-gate #define	irs_irp_ho	__irs_irp_ho
2200Sstevel@tonic-gate #define	irs_irp_is_connected	__irs_irp_is_connected
2210Sstevel@tonic-gate #define	irs_irp_ng	__irs_irp_ng
2220Sstevel@tonic-gate #define	irs_irp_nw	__irs_irp_nw
2230Sstevel@tonic-gate #define	irs_irp_pr	__irs_irp_pr
2240Sstevel@tonic-gate #define	irs_irp_pw	__irs_irp_pw
2250Sstevel@tonic-gate #define	irs_irp_read_line	__irs_irp_read_line
2260Sstevel@tonic-gate #define	irs_irp_sv	__irs_irp_sv
2270Sstevel@tonic-gate #define	irs_lcl_gr	__irs_lcl_gr
2280Sstevel@tonic-gate #define	irs_lcl_ho	__irs_lcl_ho
2290Sstevel@tonic-gate #define	irs_lcl_ng	__irs_lcl_ng
2300Sstevel@tonic-gate #define	irs_lcl_nw	__irs_lcl_nw
2310Sstevel@tonic-gate #define	irs_lcl_pr	__irs_lcl_pr
2320Sstevel@tonic-gate #define	irs_lcl_pw	__irs_lcl_pw
2330Sstevel@tonic-gate #define	irs_lcl_sv	__irs_lcl_sv
2340Sstevel@tonic-gate #define	irs_nis_gr	__irs_nis_gr
2350Sstevel@tonic-gate #define	irs_nis_ho	__irs_nis_ho
2360Sstevel@tonic-gate #define	irs_nis_ng	__irs_nis_ng
2370Sstevel@tonic-gate #define	irs_nis_nw	__irs_nis_nw
2380Sstevel@tonic-gate #define	irs_nis_pr	__irs_nis_pr
2390Sstevel@tonic-gate #define	irs_nis_pw	__irs_nis_pw
2400Sstevel@tonic-gate #define	irs_nis_sv	__irs_nis_sv
2410Sstevel@tonic-gate #define	net_data_create	__net_data_create
2420Sstevel@tonic-gate #define	net_data_destroy	__net_data_destroy
2430Sstevel@tonic-gate #define	net_data_minimize	__net_data_minimize
2440Sstevel@tonic-gate 
245*11038SRao.Shoaib@Sun.COM /*%
2460Sstevel@tonic-gate  * Externs.
2470Sstevel@tonic-gate  */
248*11038SRao.Shoaib@Sun.COM extern struct irs_acc *	irs_gen_acc __P((const char *, const char *));
249*11038SRao.Shoaib@Sun.COM extern struct irs_acc *	irs_lcl_acc __P((const char *));
250*11038SRao.Shoaib@Sun.COM extern struct irs_acc *	irs_dns_acc __P((const char *));
251*11038SRao.Shoaib@Sun.COM extern struct irs_acc *	irs_nis_acc __P((const char *));
252*11038SRao.Shoaib@Sun.COM extern struct irs_acc *	irs_irp_acc __P((const char *));
2530Sstevel@tonic-gate 
254*11038SRao.Shoaib@Sun.COM extern void		irs_destroy __P((void));
2550Sstevel@tonic-gate 
256*11038SRao.Shoaib@Sun.COM /*%
2570Sstevel@tonic-gate  * These forward declarations are for the semi-private functions in
2580Sstevel@tonic-gate  * the get*.c files. Each of these funcs implements the real get*
2590Sstevel@tonic-gate  * functionality and the standard versions are just wrappers that
2600Sstevel@tonic-gate  * call these. Apart from the wrappers, only irpd is expected to
2610Sstevel@tonic-gate  * call these directly, hence these decls are put here and not in
2620Sstevel@tonic-gate  * the /usr/include replacements.
2630Sstevel@tonic-gate  */
2640Sstevel@tonic-gate 
265*11038SRao.Shoaib@Sun.COM struct net_data;			/*%< forward */
2660Sstevel@tonic-gate /*
2670Sstevel@tonic-gate  * net_data_create gets a singleton net_data object.  net_data_init
2680Sstevel@tonic-gate  * creates as many net_data objects as times it is called.  Clients using
2690Sstevel@tonic-gate  * the default interface will use net_data_create by default.  Servers will
2700Sstevel@tonic-gate  * probably want net_data_init (one call per client)
2710Sstevel@tonic-gate  */
272*11038SRao.Shoaib@Sun.COM struct net_data *net_data_create __P((const char *));
273*11038SRao.Shoaib@Sun.COM struct net_data *net_data_init __P((const char *));
274*11038SRao.Shoaib@Sun.COM void		net_data_destroy __P((void *));
2750Sstevel@tonic-gate 
276*11038SRao.Shoaib@Sun.COM extern struct group    *getgrent_p __P((struct net_data *));
277*11038SRao.Shoaib@Sun.COM extern struct group    *getgrnam_p __P((const char *, struct net_data *));
278*11038SRao.Shoaib@Sun.COM extern struct group    *getgrgid_p __P((gid_t, struct net_data *));
279*11038SRao.Shoaib@Sun.COM extern int 		setgroupent_p __P((int, struct net_data *));
280*11038SRao.Shoaib@Sun.COM extern void 		endgrent_p __P((struct net_data *));
281*11038SRao.Shoaib@Sun.COM extern int		getgrouplist_p __P((const char *, gid_t, gid_t *, int *,
282*11038SRao.Shoaib@Sun.COM 					    struct net_data *));
2830Sstevel@tonic-gate 
2840Sstevel@tonic-gate #ifdef SETGRENT_VOID
285*11038SRao.Shoaib@Sun.COM extern void 		setgrent_p __P((struct net_data *));
2860Sstevel@tonic-gate #else
287*11038SRao.Shoaib@Sun.COM extern int 		setgrent_p __P((struct net_data *));
2880Sstevel@tonic-gate #endif
2890Sstevel@tonic-gate 
290*11038SRao.Shoaib@Sun.COM extern struct hostent 	*gethostbyname_p __P((const char *,
291*11038SRao.Shoaib@Sun.COM 					      struct net_data *));
292*11038SRao.Shoaib@Sun.COM extern struct hostent 	*gethostbyname2_p __P((const char *, int,
293*11038SRao.Shoaib@Sun.COM 					       struct net_data *));
294*11038SRao.Shoaib@Sun.COM extern struct hostent 	*gethostbyaddr_p __P((const char *, int, int,
295*11038SRao.Shoaib@Sun.COM 					      struct net_data *));
296*11038SRao.Shoaib@Sun.COM extern struct hostent 	*gethostent_p __P((struct net_data *));
297*11038SRao.Shoaib@Sun.COM extern void 		sethostent_p __P((int, struct net_data *));
298*11038SRao.Shoaib@Sun.COM extern void 		endhostent_p __P((struct net_data *));
299*11038SRao.Shoaib@Sun.COM extern struct hostent 	*getipnodebyname_p __P((const char *, int, int, int *,
300*11038SRao.Shoaib@Sun.COM 					       struct net_data *));
301*11038SRao.Shoaib@Sun.COM extern struct hostent 	*getipnodebyaddr_p __P((const void *, size_t,
302*11038SRao.Shoaib@Sun.COM 					      int, int *, struct net_data *));
3030Sstevel@tonic-gate 
304*11038SRao.Shoaib@Sun.COM extern struct netent 	*getnetent_p __P((struct net_data *));
305*11038SRao.Shoaib@Sun.COM extern struct netent 	*getnetbyname_p __P((const char *, struct net_data *));
306*11038SRao.Shoaib@Sun.COM extern struct netent 	*getnetbyaddr_p __P((unsigned long, int,
307*11038SRao.Shoaib@Sun.COM 					     struct net_data *));
308*11038SRao.Shoaib@Sun.COM extern void		setnetent_p __P((int, struct net_data *));
309*11038SRao.Shoaib@Sun.COM extern void		endnetent_p __P((struct net_data *));
3100Sstevel@tonic-gate 
311*11038SRao.Shoaib@Sun.COM extern void		setnetgrent_p __P((const char *, struct net_data *));
312*11038SRao.Shoaib@Sun.COM extern void		endnetgrent_p __P((struct net_data *));
313*11038SRao.Shoaib@Sun.COM extern int		innetgr_p __P((const char *, const char *, const char *,
314*11038SRao.Shoaib@Sun.COM 				       const char *, struct net_data *));
315*11038SRao.Shoaib@Sun.COM extern int		getnetgrent_p __P((const char **, const char **,
316*11038SRao.Shoaib@Sun.COM 					   const char **, struct net_data *));
3170Sstevel@tonic-gate 
318*11038SRao.Shoaib@Sun.COM extern struct protoent  *getprotoent_p __P((struct net_data *));
319*11038SRao.Shoaib@Sun.COM extern struct protoent  *getprotobyname_p __P((const char *,
320*11038SRao.Shoaib@Sun.COM 					       struct net_data *));
321*11038SRao.Shoaib@Sun.COM extern struct protoent	*getprotobynumber_p __P((int, struct net_data *));
322*11038SRao.Shoaib@Sun.COM extern void		setprotoent_p __P((int, struct net_data *));
323*11038SRao.Shoaib@Sun.COM extern void		endprotoent_p __P((struct net_data *));
3240Sstevel@tonic-gate 
3250Sstevel@tonic-gate 
326*11038SRao.Shoaib@Sun.COM extern struct passwd 	*getpwent_p __P((struct net_data *));
327*11038SRao.Shoaib@Sun.COM extern struct passwd 	*getpwnam_p __P((const char *, struct net_data *));
328*11038SRao.Shoaib@Sun.COM extern struct passwd 	*getpwuid_p __P((uid_t, struct net_data *));
329*11038SRao.Shoaib@Sun.COM extern int		setpassent_p __P((int, struct net_data *));
330*11038SRao.Shoaib@Sun.COM extern void		endpwent_p __P((struct net_data *));
3310Sstevel@tonic-gate 
3320Sstevel@tonic-gate #ifdef SETPWENT_VOID
333*11038SRao.Shoaib@Sun.COM extern void		setpwent_p __P((struct net_data *));
3340Sstevel@tonic-gate #else
335*11038SRao.Shoaib@Sun.COM extern int		setpwent_p __P((struct net_data *));
3360Sstevel@tonic-gate #endif
3370Sstevel@tonic-gate 
338*11038SRao.Shoaib@Sun.COM extern struct servent 	*getservent_p __P((struct net_data *));
339*11038SRao.Shoaib@Sun.COM extern struct servent 	*getservbyname_p __P((const char *, const char *,
340*11038SRao.Shoaib@Sun.COM 					      struct net_data *));
341*11038SRao.Shoaib@Sun.COM extern struct servent 	*getservbyport_p __P((int, const char *,
342*11038SRao.Shoaib@Sun.COM 					      struct net_data *));
343*11038SRao.Shoaib@Sun.COM extern void		setservent_p __P((int, struct net_data *));
344*11038SRao.Shoaib@Sun.COM extern void		endservent_p __P((struct net_data *));
3450Sstevel@tonic-gate 
3460Sstevel@tonic-gate #endif /*_IRS_H_INCLUDED*/
347*11038SRao.Shoaib@Sun.COM 
348*11038SRao.Shoaib@Sun.COM /*! \file */
349