/*
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 1996,1999 by Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/*%
* This is the generic map class, which copies the front of all others.
*/
struct irs_map {
void * private;
void (*close) __P((void *));
};
/*%
* This is the accessor class. It contains pointers to all of the
* initializers for the map classes for a particular accessor.
*/
struct irs_acc {
void * private;
void (*close) __P((struct irs_acc *));
struct irs_gr * (*gr_map) __P((struct irs_acc *));
struct irs_pw * (*pw_map) __P((struct irs_acc *));
struct irs_sv * (*sv_map) __P((struct irs_acc *));
struct irs_pr * (*pr_map) __P((struct irs_acc *));
struct irs_ho * (*ho_map) __P((struct irs_acc *));
struct irs_nw * (*nw_map) __P((struct irs_acc *));
struct irs_ng * (*ng_map) __P((struct irs_acc *));
struct __res_state * (*res_get) __P((struct irs_acc *));
void (*res_set) __P((struct irs_acc *, res_state,
void (*)(void *)));
};
/*%
* This is because the official definition of "struct netent" has no
* concept of CIDR even though it allows variant address families (on
* output but not input). The compatibility stubs convert the structs
* below into "struct netent"'s.
*/
struct nwent {
char *n_name; /*%< official name of net */
char **n_aliases; /*%< alias list */
int n_addrtype; /*%< net address type */
void *n_addr; /*%< network address */
int n_length; /*%< address length, in bits */
};
/*%
* These forward declarations are for the semi-private functions in
* the get*.c files. Each of these funcs implements the real get*
* functionality and the standard versions are just wrappers that
* call these. Apart from the wrappers, only irpd is expected to
* call these directly, hence these decls are put here and not in
* the /usr/include replacements.
*/
struct net_data; /*%< forward */
/*
* net_data_create gets a singleton net_data object. net_data_init
* creates as many net_data objects as times it is called. Clients using
* the default interface will use net_data_create by default. Servers will
* probably want net_data_init (one call per client)
*/
struct net_data *net_data_create __P((const char *));
struct net_data *net_data_init __P((const char *));
void net_data_destroy __P((void *));
extern struct group *getgrent_p __P((struct net_data *));
extern struct group *getgrnam_p __P((const char *, struct net_data *));
extern struct group *getgrgid_p __P((gid_t, struct net_data *));
extern int setgroupent_p __P((int, struct net_data *));
extern void endgrent_p __P((struct net_data *));
extern int getgrouplist_p __P((const char *, gid_t, gid_t *, int *,
struct net_data *));