From 51eecc4aff951823741ec363b44c28a301be7c9c Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Mon, 18 Dec 2000 16:40:40 +0000 Subject: Update. 2000-12-18 Andreas Jaeger * test-skeleton.c: Use temp_name_list instead of temp_name_list to avoid collision with name_list from inet/netgroup.h. * nss/nss_files/files-network.c (NEED_H_ERRNO): Define. * include/grp.h (DECLARE_NSS_PROTOTYPES): New. * include/pwd.h (DECLARE_NSS_PROTOTYPES): New. * include/netdb.h (DECLARE_NSS_PROTOTYPES): New. * include/shadow.h (DECLARE_NSS_PROTOTYPES): New. * hesiod/nss_hesiod/hesiod-proto.c (_nss_hesiod_setprotoent): Fix declaration to match prototype. * hesiod/nss_hesiod/hesiod-pwd.c (_nss_hesiod_setpwent): Likewise. * hesiod/nss_hesiod/hesiod-grp.c (_nss_hesiod_setgrent): Likewise. * hesiod/nss_hesiod/hesiod-service.c (_nss_hesiod_setservent): Likewise. * nis/nss_nis/nis-grp.c (_nss_nis_setgrent): Likewise. * nis/nss_nis/nis-pwd.c (_nss_nis_setpwent): Likewise. * nis/nss_nis/nis-proto.c (_nss_nis_setprotoent): Likewise. * nis/nss_nis/nis-service.c (_nss_nis_setservent): Likewise. (_nss_nis_getservbyport_r): Likewise. * nis/nss_nis/nis-hosts.c (_nss_nis_sethostent): Likewise. * nis/nss_nis/nis-spwd.c (_nss_nis_setspent): Likewise. * nis/nss_nis/nis-network.c (_nss_nis_getnetent_r): Likewise. (_nss_nis_setnetent): Likewise * nis/nss_nis/nis-netgrp.c (_nss_nis_setnetgrent): Likewise. (_nss_nis_endnetgrent): Likewise. * nis/nss_nisplus/nisplus-netgrp.c (_nss_nisplus_endnetgrent): Likewise. (_nss_nisplus_setnetgrent): Likewise. * nis/nss_nisplus/nisplus-spwd.c (_nss_nisplus_setspent): Likewise. * nis/nss_nisplus/nisplus-pwd.c (_nss_nisplus_setpwent): Likewise. * nis/nss_nisplus/nisplus-grp.c (_nss_nisplus_setgrent): Likewise. * nis/nss_nisplus/nisplus-network.c (_nss_nisplus_setnetent): Likewise. * nis/nss_nisplus/nisplus-hosts.c (_nss_nisplus_sethostent): Likewise. * nis/nss_nisplus/nisplus-service.c (_nss_nisplus_setservent): Likewise. * nis/nss_nisplus/nisplus-proto.c (_nss_nisplus_setprotoent): Likewise. * nis/nss_compat/compat-spwd.c (_nss_compat_setspent): Likewise. * nis/nss_compat/compat-pwd.c (_nss_compat_setpwent): Likewise. * nis/nss_compat/compat-grp.c (_nss_compat_setgrent): Likewise. * resolv/nss_dns/dns-host.c (_nss_dns_gethostbyaddr_r): Likewise. * resolv/nss_dns/dns-network.c (_nss_dns_getnetbyname_r): Likewise. (_nss_dns_getnetbyaddr_r): Likewise. --- include/netdb.h | 79 ++++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 75 insertions(+), 4 deletions(-) (limited to 'include/netdb.h') diff --git a/include/netdb.h b/include/netdb.h index 6a60d4e..8c861d4 100644 --- a/include/netdb.h +++ b/include/netdb.h @@ -143,10 +143,81 @@ extern int ruserpass (const char *host, const char **aname, /* The following declarations and definitions have been removed from the public header since we don't want people to use them. */ -#define AI_V4MAPPED 0x0008 /* IPv4-mapped addresses are acceptable. */ -#define AI_ALL 0x0010 /* Return both IPv4 and IPv6 addresses. */ -#define AI_ADDRCONFIG 0x0020 /* Use configuration of this host to choose - returned address type. */ +#define AI_V4MAPPED 0x0008 /* IPv4-mapped addresses are acceptable. */ +#define AI_ALL 0x0010 /* Return both IPv4 and IPv6 addresses. */ +#define AI_ADDRCONFIG 0x0020 /* Use configuration of this host to choose + returned address type. */ #define AI_DEFAULT (AI_V4MAPPED | AI_ADDRCONFIG) +#include + +#define DECLARE_NSS_PROTOTYPES(service) \ +extern enum nss_status _nss_ ## service ## _setprotoent (int); \ +extern enum nss_status _nss_ ## service ## _endprotoent (void); \ +extern enum nss_status _nss_ ## service ## _getprotoent_r \ + (struct protoent *proto, char *buffer, size_t buflen, \ + int *errnop); \ +extern enum nss_status _nss_ ## service ## _getprotobyname_r \ + (const char *name, struct protoent *proto, \ + char *buffer, size_t buflen, int *errnop); \ +extern enum nss_status _nss_ ## service ## _getprotobynumber_r \ + (int number, struct protoent *proto, \ + char *buffer, size_t buflen, int *errnop); \ +extern enum nss_status _nss_ ## service ## _sethostent (int); \ +extern enum nss_status _nss_ ## service ## _endhostent (void); \ +extern enum nss_status _nss_ ## service ## _gethostent_r \ + (struct hostent *host, char *buffer, size_t buflen, \ + int *errnop, int *h_errnop); \ +extern enum nss_status _nss_ ## service ## _gethostbyname2_r \ + (const char *name, int af, struct hostent *host, \ + char *buffer, size_t buflen, int *errnop, \ + int *h_errnop); \ +extern enum nss_status _nss_ ## service ## _gethostbyname_r \ + (const char *name, struct hostent *host, char *buffer, \ + size_t buflen, int *errnop, int *h_errnop); \ +extern enum nss_status _nss_ ## service ## _gethostbyaddr_r \ + (const void *addr, socklen_t addrlen, int af, \ + struct hostent *host, char *buffer, size_t buflen, \ + int *errnop, int *h_errnop); \ +extern enum nss_status _nss_ ## service ## _setservent (int); \ +extern enum nss_status _nss_ ## service ## _endservent (void); \ +extern enum nss_status _nss_ ## service ## _getservent_r \ + (struct servent *serv, char *buffer, size_t buflen, \ + int *errnop); \ +extern enum nss_status _nss_ ## service ## _getservbyname_r \ + (const char *name, const char *protocol, \ + struct servent *serv, char *buffer, size_t buflen, \ + int *errnop); \ +extern enum nss_status _nss_ ## service ## _getservbyport_r \ + (int port, const char *protocol, struct servent *serv, \ + char *buffer, size_t buflen, int *errnop); \ +extern enum nss_status _nss_ ## service ## _setnetgrent \ + (const char *group, struct __netgrent *result); \ +extern enum nss_status _nss_ ## service ## _endnetgrent \ + (struct __netgrent *result); \ +extern enum nss_status _nss_ ## service ##_getnetgrent_r \ + (struct __netgrent *result, char *buffer, \ + size_t buflen, int *errnop); \ +extern enum nss_status _nss_## service ##_setnetent (int stayopen); \ +extern enum nss_status _nss_ ## service ## _endnetent (void); \ +extern enum nss_status _nss_## service ##_getnetent_r \ + (struct netent *net, char *buffer, size_t buflen, \ + int *errnop, int *herrnop); \ +extern enum nss_status _nss_## service ##_getnetbyname_r \ + (const char *name, struct netent *net, char *buffer, \ + size_t buflen, int *errnop, int *herrnop); \ +extern enum nss_status _nss_## service ##_getnetbyaddr_r \ + (uint32_t addr, int type, struct netent *net, \ + char *buffer, size_t buflen, int *errnop, \ + int *herrnop); + +DECLARE_NSS_PROTOTYPES (compat) +DECLARE_NSS_PROTOTYPES (dns) +DECLARE_NSS_PROTOTYPES (files) +DECLARE_NSS_PROTOTYPES (hesiod) +DECLARE_NSS_PROTOTYPES (nis) +DECLARE_NSS_PROTOTYPES (nisplus) + +#undef DECLARE_NSS_PROTOTYPES + #endif /* !_NETDB_H */ -- cgit v1.1