return (STR_NE(eval_hostaddr(host), unknown) && HOSTNAME_KNOWN(name));
--- a/tcpd.h
+++ b/tcpd.h
-@@ -4,6 +4,25 @@
+@@ -4,6 +4,27 @@
* Author: Wietse Venema, Eindhoven University of Technology, The Netherlands.
*/
+#include <netinet/in.h>
+#include <stdio.h>
+
-+__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+
/* Structure to describe one communications endpoint. */
#define STRING_LENGTH 128 /* hosts, users, processes */
-@@ -25,10 +44,10 @@ struct request_info {
+@@ -25,10 +46,10 @@ struct request_info {
char pid[10]; /* access via eval_pid(request) */
struct host_info client[1]; /* client endpoint info */
struct host_info server[1]; /* server endpoint info */
struct netconfig *config; /* netdir handle */
};
-@@ -61,25 +80,30 @@ extern char paranoid[];
+@@ -61,25 +82,30 @@ extern char paranoid[];
/* Global functions. */
#if defined(TLI) || defined(PTX) || defined(TLI_SEQUENT)
extern char *hosts_allow_table; /* for verification mode redirection */
extern char *hosts_deny_table; /* for verification mode redirection */
extern int hosts_access_verbose; /* for verbose matching mode */
-@@ -92,9 +116,14 @@ extern int resident; /* > 0 if residen
+@@ -92,9 +118,14 @@ extern int resident; /* > 0 if resident process */
*/
#ifdef __STDC__
extern struct request_info *request_init(); /* initialize request */
extern struct request_info *request_set(); /* update request structure */
#endif
-@@ -117,27 +146,31 @@ extern struct request_info *request_set(
+@@ -117,27 +148,31 @@ extern struct request_info *request_set(); /* update request structure */
* host_info structures serve as caches for the lookup results.
*/
#endif
/*
-@@ -178,7 +211,7 @@ extern struct tcpd_context tcpd_context;
+@@ -178,7 +213,7 @@ extern struct tcpd_context tcpd_context;
* behavior.
*/
extern int dry_run; /* verification flag */
/* Bug workarounds. */
-@@ -217,3 +250,7 @@ extern char *fix_strtok();
+@@ -217,3 +252,9 @@ extern char *fix_strtok();
#define strtok my_strtok
extern char *my_strtok();
#endif
+
-+__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+
+#endif /* tcpd.h */
--- a/Makefile