17c478bd9Sstevel@tonic-gate /* 2*9525b14bSRao Shoaib * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") 37c478bd9Sstevel@tonic-gate * Copyright (c) 1996,1999 by Internet Software Consortium. 47c478bd9Sstevel@tonic-gate * 57c478bd9Sstevel@tonic-gate * Permission to use, copy, modify, and distribute this software for any 67c478bd9Sstevel@tonic-gate * purpose with or without fee is hereby granted, provided that the above 77c478bd9Sstevel@tonic-gate * copyright notice and this permission notice appear in all copies. 87c478bd9Sstevel@tonic-gate * 9*9525b14bSRao Shoaib * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES 10*9525b14bSRao Shoaib * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11*9525b14bSRao Shoaib * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR 12*9525b14bSRao Shoaib * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13*9525b14bSRao Shoaib * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14*9525b14bSRao Shoaib * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT 15*9525b14bSRao Shoaib * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 167c478bd9Sstevel@tonic-gate */ 177c478bd9Sstevel@tonic-gate 187c478bd9Sstevel@tonic-gate /* 19*9525b14bSRao Shoaib * $Id: irs.h,v 1.5 2005/04/27 04:56:15 sra Exp $ 207c478bd9Sstevel@tonic-gate */ 217c478bd9Sstevel@tonic-gate 227c478bd9Sstevel@tonic-gate #ifndef _IRS_H_INCLUDED 237c478bd9Sstevel@tonic-gate #define _IRS_H_INCLUDED 247c478bd9Sstevel@tonic-gate 25*9525b14bSRao Shoaib /*! \file */ 26*9525b14bSRao Shoaib 277c478bd9Sstevel@tonic-gate #include <sys/types.h> 287c478bd9Sstevel@tonic-gate 297c478bd9Sstevel@tonic-gate #include <arpa/nameser.h> 307c478bd9Sstevel@tonic-gate 317c478bd9Sstevel@tonic-gate #include <grp.h> 327c478bd9Sstevel@tonic-gate #include <netdb.h> 337c478bd9Sstevel@tonic-gate #include <resolv.h> 347c478bd9Sstevel@tonic-gate #include <pwd.h> 357c478bd9Sstevel@tonic-gate 36*9525b14bSRao Shoaib /*% 377c478bd9Sstevel@tonic-gate * This is the group map class. 387c478bd9Sstevel@tonic-gate */ 397c478bd9Sstevel@tonic-gate struct irs_gr { 407c478bd9Sstevel@tonic-gate void * private; 417c478bd9Sstevel@tonic-gate void (*close) __P((struct irs_gr *)); 427c478bd9Sstevel@tonic-gate struct group * (*next) __P((struct irs_gr *)); 437c478bd9Sstevel@tonic-gate struct group * (*byname) __P((struct irs_gr *, const char *)); 447c478bd9Sstevel@tonic-gate struct group * (*bygid) __P((struct irs_gr *, gid_t)); 457c478bd9Sstevel@tonic-gate int (*list) __P((struct irs_gr *, const char *, 467c478bd9Sstevel@tonic-gate gid_t, gid_t *, int *)); 477c478bd9Sstevel@tonic-gate void (*rewind) __P((struct irs_gr *)); 487c478bd9Sstevel@tonic-gate void (*minimize) __P((struct irs_gr *)); 497c478bd9Sstevel@tonic-gate struct __res_state * (*res_get) __P((struct irs_gr *)); 507c478bd9Sstevel@tonic-gate void (*res_set) __P((struct irs_gr *, res_state, 517c478bd9Sstevel@tonic-gate void (*)(void *))); 527c478bd9Sstevel@tonic-gate }; 537c478bd9Sstevel@tonic-gate 54*9525b14bSRao Shoaib /*% 557c478bd9Sstevel@tonic-gate * This is the password map class. 567c478bd9Sstevel@tonic-gate */ 577c478bd9Sstevel@tonic-gate struct irs_pw { 587c478bd9Sstevel@tonic-gate void * private; 597c478bd9Sstevel@tonic-gate void (*close) __P((struct irs_pw *)); 607c478bd9Sstevel@tonic-gate struct passwd * (*next) __P((struct irs_pw *)); 617c478bd9Sstevel@tonic-gate struct passwd * (*byname) __P((struct irs_pw *, const char *)); 627c478bd9Sstevel@tonic-gate struct passwd * (*byuid) __P((struct irs_pw *, uid_t)); 637c478bd9Sstevel@tonic-gate void (*rewind) __P((struct irs_pw *)); 647c478bd9Sstevel@tonic-gate void (*minimize) __P((struct irs_pw *)); 657c478bd9Sstevel@tonic-gate struct __res_state * (*res_get) __P((struct irs_pw *)); 667c478bd9Sstevel@tonic-gate void (*res_set) __P((struct irs_pw *, res_state, 677c478bd9Sstevel@tonic-gate void (*)(void *))); 687c478bd9Sstevel@tonic-gate }; 697c478bd9Sstevel@tonic-gate 70*9525b14bSRao Shoaib /*% 717c478bd9Sstevel@tonic-gate * This is the service map class. 727c478bd9Sstevel@tonic-gate */ 737c478bd9Sstevel@tonic-gate struct irs_sv { 747c478bd9Sstevel@tonic-gate void * private; 757c478bd9Sstevel@tonic-gate void (*close) __P((struct irs_sv *)); 767c478bd9Sstevel@tonic-gate struct servent *(*byname) __P((struct irs_sv *, 777c478bd9Sstevel@tonic-gate const char *, const char *)); 787c478bd9Sstevel@tonic-gate struct servent *(*byport) __P((struct irs_sv *, int, const char *)); 797c478bd9Sstevel@tonic-gate struct servent *(*next) __P((struct irs_sv *)); 807c478bd9Sstevel@tonic-gate void (*rewind) __P((struct irs_sv *)); 817c478bd9Sstevel@tonic-gate void (*minimize) __P((struct irs_sv *)); 827c478bd9Sstevel@tonic-gate struct __res_state * (*res_get) __P((struct irs_sv *)); 837c478bd9Sstevel@tonic-gate void (*res_set) __P((struct irs_sv *, res_state, 847c478bd9Sstevel@tonic-gate void (*)(void *))); 857c478bd9Sstevel@tonic-gate }; 867c478bd9Sstevel@tonic-gate 87*9525b14bSRao Shoaib /*% 887c478bd9Sstevel@tonic-gate * This is the protocols map class. 897c478bd9Sstevel@tonic-gate */ 907c478bd9Sstevel@tonic-gate struct irs_pr { 917c478bd9Sstevel@tonic-gate void * private; 927c478bd9Sstevel@tonic-gate void (*close) __P((struct irs_pr *)); 937c478bd9Sstevel@tonic-gate struct protoent *(*byname) __P((struct irs_pr *, const char *)); 947c478bd9Sstevel@tonic-gate struct protoent *(*bynumber) __P((struct irs_pr *, int)); 957c478bd9Sstevel@tonic-gate struct protoent *(*next) __P((struct irs_pr *)); 967c478bd9Sstevel@tonic-gate void (*rewind) __P((struct irs_pr *)); 977c478bd9Sstevel@tonic-gate void (*minimize) __P((struct irs_pr *)); 987c478bd9Sstevel@tonic-gate struct __res_state * (*res_get) __P((struct irs_pr *)); 997c478bd9Sstevel@tonic-gate void (*res_set) __P((struct irs_pr *, res_state, 1007c478bd9Sstevel@tonic-gate void (*)(void *))); 1017c478bd9Sstevel@tonic-gate }; 1027c478bd9Sstevel@tonic-gate 103*9525b14bSRao Shoaib /*% 1047c478bd9Sstevel@tonic-gate * This is the hosts map class. 1057c478bd9Sstevel@tonic-gate */ 1067c478bd9Sstevel@tonic-gate struct irs_ho { 1077c478bd9Sstevel@tonic-gate void * private; 1087c478bd9Sstevel@tonic-gate void (*close) __P((struct irs_ho *)); 1097c478bd9Sstevel@tonic-gate struct hostent *(*byname) __P((struct irs_ho *, const char *)); 1107c478bd9Sstevel@tonic-gate struct hostent *(*byname2) __P((struct irs_ho *, const char *, int)); 1117c478bd9Sstevel@tonic-gate struct hostent *(*byaddr) __P((struct irs_ho *, 1127c478bd9Sstevel@tonic-gate const void *, int, int)); 1137c478bd9Sstevel@tonic-gate struct hostent *(*next) __P((struct irs_ho *)); 1147c478bd9Sstevel@tonic-gate void (*rewind) __P((struct irs_ho *)); 1157c478bd9Sstevel@tonic-gate void (*minimize) __P((struct irs_ho *)); 1167c478bd9Sstevel@tonic-gate struct __res_state * (*res_get) __P((struct irs_ho *)); 1177c478bd9Sstevel@tonic-gate void (*res_set) __P((struct irs_ho *, res_state, 1187c478bd9Sstevel@tonic-gate void (*)(void *))); 1197c478bd9Sstevel@tonic-gate struct addrinfo *(*addrinfo) __P((struct irs_ho *, const char *, 1207c478bd9Sstevel@tonic-gate const struct addrinfo *)); 1217c478bd9Sstevel@tonic-gate }; 1227c478bd9Sstevel@tonic-gate 123*9525b14bSRao Shoaib /*% 1247c478bd9Sstevel@tonic-gate * This is the networks map class. 1257c478bd9Sstevel@tonic-gate */ 1267c478bd9Sstevel@tonic-gate struct irs_nw { 1277c478bd9Sstevel@tonic-gate void * private; 1287c478bd9Sstevel@tonic-gate void (*close) __P((struct irs_nw *)); 1297c478bd9Sstevel@tonic-gate struct nwent * (*byname) __P((struct irs_nw *, const char *, int)); 1307c478bd9Sstevel@tonic-gate struct nwent * (*byaddr) __P((struct irs_nw *, void *, int, int)); 1317c478bd9Sstevel@tonic-gate struct nwent * (*next) __P((struct irs_nw *)); 1327c478bd9Sstevel@tonic-gate void (*rewind) __P((struct irs_nw *)); 1337c478bd9Sstevel@tonic-gate void (*minimize) __P((struct irs_nw *)); 1347c478bd9Sstevel@tonic-gate struct __res_state * (*res_get) __P((struct irs_nw *)); 1357c478bd9Sstevel@tonic-gate void (*res_set) __P((struct irs_nw *, res_state, 1367c478bd9Sstevel@tonic-gate void (*)(void *))); 1377c478bd9Sstevel@tonic-gate }; 1387c478bd9Sstevel@tonic-gate 139*9525b14bSRao Shoaib /*% 1407c478bd9Sstevel@tonic-gate * This is the netgroups map class. 1417c478bd9Sstevel@tonic-gate */ 1427c478bd9Sstevel@tonic-gate struct irs_ng { 1437c478bd9Sstevel@tonic-gate void * private; 1447c478bd9Sstevel@tonic-gate void (*close) __P((struct irs_ng *)); 1457c478bd9Sstevel@tonic-gate int (*next) __P((struct irs_ng *, const char **, 1467c478bd9Sstevel@tonic-gate const char **, const char **)); 1477c478bd9Sstevel@tonic-gate int (*test) __P((struct irs_ng *, const char *, 1487c478bd9Sstevel@tonic-gate const char *, const char *, 1497c478bd9Sstevel@tonic-gate const char *)); 1507c478bd9Sstevel@tonic-gate void (*rewind) __P((struct irs_ng *, const char *)); 1517c478bd9Sstevel@tonic-gate void (*minimize) __P((struct irs_ng *)); 1527c478bd9Sstevel@tonic-gate }; 1537c478bd9Sstevel@tonic-gate 154*9525b14bSRao Shoaib /*% 1557c478bd9Sstevel@tonic-gate * This is the generic map class, which copies the front of all others. 1567c478bd9Sstevel@tonic-gate */ 1577c478bd9Sstevel@tonic-gate struct irs_map { 1587c478bd9Sstevel@tonic-gate void * private; 1597c478bd9Sstevel@tonic-gate void (*close) __P((void *)); 1607c478bd9Sstevel@tonic-gate }; 1617c478bd9Sstevel@tonic-gate 162*9525b14bSRao Shoaib /*% 1637c478bd9Sstevel@tonic-gate * This is the accessor class. It contains pointers to all of the 1647c478bd9Sstevel@tonic-gate * initializers for the map classes for a particular accessor. 1657c478bd9Sstevel@tonic-gate */ 1667c478bd9Sstevel@tonic-gate struct irs_acc { 1677c478bd9Sstevel@tonic-gate void * private; 1687c478bd9Sstevel@tonic-gate void (*close) __P((struct irs_acc *)); 1697c478bd9Sstevel@tonic-gate struct irs_gr * (*gr_map) __P((struct irs_acc *)); 1707c478bd9Sstevel@tonic-gate struct irs_pw * (*pw_map) __P((struct irs_acc *)); 1717c478bd9Sstevel@tonic-gate struct irs_sv * (*sv_map) __P((struct irs_acc *)); 1727c478bd9Sstevel@tonic-gate struct irs_pr * (*pr_map) __P((struct irs_acc *)); 1737c478bd9Sstevel@tonic-gate struct irs_ho * (*ho_map) __P((struct irs_acc *)); 1747c478bd9Sstevel@tonic-gate struct irs_nw * (*nw_map) __P((struct irs_acc *)); 1757c478bd9Sstevel@tonic-gate struct irs_ng * (*ng_map) __P((struct irs_acc *)); 1767c478bd9Sstevel@tonic-gate struct __res_state * (*res_get) __P((struct irs_acc *)); 1777c478bd9Sstevel@tonic-gate void (*res_set) __P((struct irs_acc *, res_state, 1787c478bd9Sstevel@tonic-gate void (*)(void *))); 1797c478bd9Sstevel@tonic-gate }; 1807c478bd9Sstevel@tonic-gate 181*9525b14bSRao Shoaib /*% 1827c478bd9Sstevel@tonic-gate * This is because the official definition of "struct netent" has no 1837c478bd9Sstevel@tonic-gate * concept of CIDR even though it allows variant address families (on 1847c478bd9Sstevel@tonic-gate * output but not input). The compatibility stubs convert the structs 1857c478bd9Sstevel@tonic-gate * below into "struct netent"'s. 1867c478bd9Sstevel@tonic-gate */ 1877c478bd9Sstevel@tonic-gate struct nwent { 188*9525b14bSRao Shoaib char *n_name; /*%< official name of net */ 189*9525b14bSRao Shoaib char **n_aliases; /*%< alias list */ 190*9525b14bSRao Shoaib int n_addrtype; /*%< net address type */ 191*9525b14bSRao Shoaib void *n_addr; /*%< network address */ 192*9525b14bSRao Shoaib int n_length; /*%< address length, in bits */ 1937c478bd9Sstevel@tonic-gate }; 1947c478bd9Sstevel@tonic-gate 195*9525b14bSRao Shoaib /*% 1967c478bd9Sstevel@tonic-gate * Hide external function names from POSIX. 1977c478bd9Sstevel@tonic-gate */ 1987c478bd9Sstevel@tonic-gate #define irs_gen_acc __irs_gen_acc 1997c478bd9Sstevel@tonic-gate #define irs_lcl_acc __irs_lcl_acc 2007c478bd9Sstevel@tonic-gate #define irs_dns_acc __irs_dns_acc 2017c478bd9Sstevel@tonic-gate #define irs_nis_acc __irs_nis_acc 2027c478bd9Sstevel@tonic-gate #define irs_irp_acc __irs_irp_acc 2037c478bd9Sstevel@tonic-gate #define irs_destroy __irs_destroy 2047c478bd9Sstevel@tonic-gate #define irs_dns_gr __irs_dns_gr 2057c478bd9Sstevel@tonic-gate #define irs_dns_ho __irs_dns_ho 2067c478bd9Sstevel@tonic-gate #define irs_dns_nw __irs_dns_nw 2077c478bd9Sstevel@tonic-gate #define irs_dns_pr __irs_dns_pr 2087c478bd9Sstevel@tonic-gate #define irs_dns_pw __irs_dns_pw 2097c478bd9Sstevel@tonic-gate #define irs_dns_sv __irs_dns_sv 2107c478bd9Sstevel@tonic-gate #define irs_gen_gr __irs_gen_gr 2117c478bd9Sstevel@tonic-gate #define irs_gen_ho __irs_gen_ho 2127c478bd9Sstevel@tonic-gate #define irs_gen_ng __irs_gen_ng 2137c478bd9Sstevel@tonic-gate #define irs_gen_nw __irs_gen_nw 2147c478bd9Sstevel@tonic-gate #define irs_gen_pr __irs_gen_pr 2157c478bd9Sstevel@tonic-gate #define irs_gen_pw __irs_gen_pw 2167c478bd9Sstevel@tonic-gate #define irs_gen_sv __irs_gen_sv 2177c478bd9Sstevel@tonic-gate #define irs_irp_get_full_response __irs_irp_get_full_response 2187c478bd9Sstevel@tonic-gate #define irs_irp_gr __irs_irp_gr 2197c478bd9Sstevel@tonic-gate #define irs_irp_ho __irs_irp_ho 2207c478bd9Sstevel@tonic-gate #define irs_irp_is_connected __irs_irp_is_connected 2217c478bd9Sstevel@tonic-gate #define irs_irp_ng __irs_irp_ng 2227c478bd9Sstevel@tonic-gate #define irs_irp_nw __irs_irp_nw 2237c478bd9Sstevel@tonic-gate #define irs_irp_pr __irs_irp_pr 2247c478bd9Sstevel@tonic-gate #define irs_irp_pw __irs_irp_pw 2257c478bd9Sstevel@tonic-gate #define irs_irp_read_line __irs_irp_read_line 2267c478bd9Sstevel@tonic-gate #define irs_irp_sv __irs_irp_sv 2277c478bd9Sstevel@tonic-gate #define irs_lcl_gr __irs_lcl_gr 2287c478bd9Sstevel@tonic-gate #define irs_lcl_ho __irs_lcl_ho 2297c478bd9Sstevel@tonic-gate #define irs_lcl_ng __irs_lcl_ng 2307c478bd9Sstevel@tonic-gate #define irs_lcl_nw __irs_lcl_nw 2317c478bd9Sstevel@tonic-gate #define irs_lcl_pr __irs_lcl_pr 2327c478bd9Sstevel@tonic-gate #define irs_lcl_pw __irs_lcl_pw 2337c478bd9Sstevel@tonic-gate #define irs_lcl_sv __irs_lcl_sv 2347c478bd9Sstevel@tonic-gate #define irs_nis_gr __irs_nis_gr 2357c478bd9Sstevel@tonic-gate #define irs_nis_ho __irs_nis_ho 2367c478bd9Sstevel@tonic-gate #define irs_nis_ng __irs_nis_ng 2377c478bd9Sstevel@tonic-gate #define irs_nis_nw __irs_nis_nw 2387c478bd9Sstevel@tonic-gate #define irs_nis_pr __irs_nis_pr 2397c478bd9Sstevel@tonic-gate #define irs_nis_pw __irs_nis_pw 2407c478bd9Sstevel@tonic-gate #define irs_nis_sv __irs_nis_sv 2417c478bd9Sstevel@tonic-gate #define net_data_create __net_data_create 2427c478bd9Sstevel@tonic-gate #define net_data_destroy __net_data_destroy 2437c478bd9Sstevel@tonic-gate #define net_data_minimize __net_data_minimize 2447c478bd9Sstevel@tonic-gate 245*9525b14bSRao Shoaib /*% 2467c478bd9Sstevel@tonic-gate * Externs. 2477c478bd9Sstevel@tonic-gate */ 248*9525b14bSRao Shoaib extern struct irs_acc * irs_gen_acc __P((const char *, const char *)); 249*9525b14bSRao Shoaib extern struct irs_acc * irs_lcl_acc __P((const char *)); 250*9525b14bSRao Shoaib extern struct irs_acc * irs_dns_acc __P((const char *)); 251*9525b14bSRao Shoaib extern struct irs_acc * irs_nis_acc __P((const char *)); 252*9525b14bSRao Shoaib extern struct irs_acc * irs_irp_acc __P((const char *)); 2537c478bd9Sstevel@tonic-gate 254*9525b14bSRao Shoaib extern void irs_destroy __P((void)); 2557c478bd9Sstevel@tonic-gate 256*9525b14bSRao Shoaib /*% 2577c478bd9Sstevel@tonic-gate * These forward declarations are for the semi-private functions in 2587c478bd9Sstevel@tonic-gate * the get*.c files. Each of these funcs implements the real get* 2597c478bd9Sstevel@tonic-gate * functionality and the standard versions are just wrappers that 2607c478bd9Sstevel@tonic-gate * call these. Apart from the wrappers, only irpd is expected to 2617c478bd9Sstevel@tonic-gate * call these directly, hence these decls are put here and not in 2627c478bd9Sstevel@tonic-gate * the /usr/include replacements. 2637c478bd9Sstevel@tonic-gate */ 2647c478bd9Sstevel@tonic-gate 265*9525b14bSRao Shoaib struct net_data; /*%< forward */ 2667c478bd9Sstevel@tonic-gate /* 2677c478bd9Sstevel@tonic-gate * net_data_create gets a singleton net_data object. net_data_init 2687c478bd9Sstevel@tonic-gate * creates as many net_data objects as times it is called. Clients using 2697c478bd9Sstevel@tonic-gate * the default interface will use net_data_create by default. Servers will 2707c478bd9Sstevel@tonic-gate * probably want net_data_init (one call per client) 2717c478bd9Sstevel@tonic-gate */ 272*9525b14bSRao Shoaib struct net_data *net_data_create __P((const char *)); 273*9525b14bSRao Shoaib struct net_data *net_data_init __P((const char *)); 274*9525b14bSRao Shoaib void net_data_destroy __P((void *)); 2757c478bd9Sstevel@tonic-gate 276*9525b14bSRao Shoaib extern struct group *getgrent_p __P((struct net_data *)); 277*9525b14bSRao Shoaib extern struct group *getgrnam_p __P((const char *, struct net_data *)); 278*9525b14bSRao Shoaib extern struct group *getgrgid_p __P((gid_t, struct net_data *)); 279*9525b14bSRao Shoaib extern int setgroupent_p __P((int, struct net_data *)); 280*9525b14bSRao Shoaib extern void endgrent_p __P((struct net_data *)); 281*9525b14bSRao Shoaib extern int getgrouplist_p __P((const char *, gid_t, gid_t *, int *, 282*9525b14bSRao Shoaib struct net_data *)); 2837c478bd9Sstevel@tonic-gate 2847c478bd9Sstevel@tonic-gate #ifdef SETGRENT_VOID 285*9525b14bSRao Shoaib extern void setgrent_p __P((struct net_data *)); 2867c478bd9Sstevel@tonic-gate #else 287*9525b14bSRao Shoaib extern int setgrent_p __P((struct net_data *)); 2887c478bd9Sstevel@tonic-gate #endif 2897c478bd9Sstevel@tonic-gate 290*9525b14bSRao Shoaib extern struct hostent *gethostbyname_p __P((const char *, 291*9525b14bSRao Shoaib struct net_data *)); 292*9525b14bSRao Shoaib extern struct hostent *gethostbyname2_p __P((const char *, int, 293*9525b14bSRao Shoaib struct net_data *)); 294*9525b14bSRao Shoaib extern struct hostent *gethostbyaddr_p __P((const char *, int, int, 295*9525b14bSRao Shoaib struct net_data *)); 296*9525b14bSRao Shoaib extern struct hostent *gethostent_p __P((struct net_data *)); 297*9525b14bSRao Shoaib extern void sethostent_p __P((int, struct net_data *)); 298*9525b14bSRao Shoaib extern void endhostent_p __P((struct net_data *)); 299*9525b14bSRao Shoaib extern struct hostent *getipnodebyname_p __P((const char *, int, int, int *, 300*9525b14bSRao Shoaib struct net_data *)); 301*9525b14bSRao Shoaib extern struct hostent *getipnodebyaddr_p __P((const void *, size_t, 302*9525b14bSRao Shoaib int, int *, struct net_data *)); 3037c478bd9Sstevel@tonic-gate 304*9525b14bSRao Shoaib extern struct netent *getnetent_p __P((struct net_data *)); 305*9525b14bSRao Shoaib extern struct netent *getnetbyname_p __P((const char *, struct net_data *)); 306*9525b14bSRao Shoaib extern struct netent *getnetbyaddr_p __P((unsigned long, int, 307*9525b14bSRao Shoaib struct net_data *)); 308*9525b14bSRao Shoaib extern void setnetent_p __P((int, struct net_data *)); 309*9525b14bSRao Shoaib extern void endnetent_p __P((struct net_data *)); 3107c478bd9Sstevel@tonic-gate 311*9525b14bSRao Shoaib extern void setnetgrent_p __P((const char *, struct net_data *)); 312*9525b14bSRao Shoaib extern void endnetgrent_p __P((struct net_data *)); 313*9525b14bSRao Shoaib extern int innetgr_p __P((const char *, const char *, const char *, 314*9525b14bSRao Shoaib const char *, struct net_data *)); 315*9525b14bSRao Shoaib extern int getnetgrent_p __P((const char **, const char **, 316*9525b14bSRao Shoaib const char **, struct net_data *)); 3177c478bd9Sstevel@tonic-gate 318*9525b14bSRao Shoaib extern struct protoent *getprotoent_p __P((struct net_data *)); 319*9525b14bSRao Shoaib extern struct protoent *getprotobyname_p __P((const char *, 320*9525b14bSRao Shoaib struct net_data *)); 321*9525b14bSRao Shoaib extern struct protoent *getprotobynumber_p __P((int, struct net_data *)); 322*9525b14bSRao Shoaib extern void setprotoent_p __P((int, struct net_data *)); 323*9525b14bSRao Shoaib extern void endprotoent_p __P((struct net_data *)); 3247c478bd9Sstevel@tonic-gate 3257c478bd9Sstevel@tonic-gate 326*9525b14bSRao Shoaib extern struct passwd *getpwent_p __P((struct net_data *)); 327*9525b14bSRao Shoaib extern struct passwd *getpwnam_p __P((const char *, struct net_data *)); 328*9525b14bSRao Shoaib extern struct passwd *getpwuid_p __P((uid_t, struct net_data *)); 329*9525b14bSRao Shoaib extern int setpassent_p __P((int, struct net_data *)); 330*9525b14bSRao Shoaib extern void endpwent_p __P((struct net_data *)); 3317c478bd9Sstevel@tonic-gate 3327c478bd9Sstevel@tonic-gate #ifdef SETPWENT_VOID 333*9525b14bSRao Shoaib extern void setpwent_p __P((struct net_data *)); 3347c478bd9Sstevel@tonic-gate #else 335*9525b14bSRao Shoaib extern int setpwent_p __P((struct net_data *)); 3367c478bd9Sstevel@tonic-gate #endif 3377c478bd9Sstevel@tonic-gate 338*9525b14bSRao Shoaib extern struct servent *getservent_p __P((struct net_data *)); 339*9525b14bSRao Shoaib extern struct servent *getservbyname_p __P((const char *, const char *, 340*9525b14bSRao Shoaib struct net_data *)); 341*9525b14bSRao Shoaib extern struct servent *getservbyport_p __P((int, const char *, 342*9525b14bSRao Shoaib struct net_data *)); 343*9525b14bSRao Shoaib extern void setservent_p __P((int, struct net_data *)); 344*9525b14bSRao Shoaib extern void endservent_p __P((struct net_data *)); 3457c478bd9Sstevel@tonic-gate 3467c478bd9Sstevel@tonic-gate #endif /*_IRS_H_INCLUDED*/ 347*9525b14bSRao Shoaib 348*9525b14bSRao Shoaib /*! \file */ 349