aboutsummaryrefslogtreecommitdiff
path: root/resolv/netdb.h
diff options
context:
space:
mode:
Diffstat (limited to 'resolv/netdb.h')
-rw-r--r--resolv/netdb.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/resolv/netdb.h b/resolv/netdb.h
index 1269443..954085f 100644
--- a/resolv/netdb.h
+++ b/resolv/netdb.h
@@ -52,6 +52,12 @@ extern int __h_errno;
/* Use a macro to access always the thread specific `h_errno' variable. */
#define h_errno (*__h_errno_location ())
+
+/* Retain some binary compatibility with old libraries by having both the
+ global variable and the per-thread variable set on error. */
+#define __set_h_errno(x) (h_errno = __h_errno = (x))
+#else
+#define __set_h_errno(x) (h_errno = (x))
#endif
/* Possible values left in `h_errno'. */
@@ -326,6 +332,31 @@ extern struct protoent *getprotobynumber_r __P ((int __proto,
#endif /* reentrant */
+/* Establish network group NETGROUP for enumeration. */
+extern int setnetgrent __P ((__const char *__netgroup));
+
+/* Free all space allocated by previous `setnetgrent' call. */
+extern void endnetgrent __P ((void));
+
+/* Get next member of netgroup established by last `setnetgrent' call
+ and return pointers to elements in HOSTP, USERP, and DOMAINP. */
+extern int getnetgrent __P ((char **__hostp, char **__userp,
+ char **__domainp));
+
+/* Test whether NETGROUP contains the triple (HOST,USER,DOMAIN). */
+extern int innetgr __P ((__const char *__netgroup, __const char *__host,
+ __const char *__user, __const char *domain));
+
+#ifdef __USE_REENTRANT
+/* Reentrant version of `getnetgrent' where result is placed in BUFFER. */
+extern int __getnetgrent_r __P ((char **__hostp, char **__userp,
+ char **__domainp,
+ char *__buffer, int __buflen));
+extern int getnetgrent_r __P ((char **__hostp, char **__userp,
+ char **__domainp,
+ char *__buffer, int __buflen));
+#endif
+
__END_DECLS
#endif /* netdb.h */