Provide stub versions of "host_name_lookup_init()",

"host_name_lookup_process()", and "host_name_lookup_cleanup()" if we
don't have GNU ADNS, so that Ethereal compiles without GNU ADNS.

Declare the argument lists of "host_name_lookup_init()" and
"host_name_lookup_cleanup()" as empty, C89-style, rather than as
unknown.

svn path=/trunk/; revision=7641
This commit is contained in:
Guy Harris 2003-05-05 00:53:06 +00:00
parent 1d9b54fc07
commit 6d6a37b5d2
2 changed files with 23 additions and 6 deletions

View File

@ -1,7 +1,7 @@
/* resolv.c
* Routines for network object lookup
*
* $Id: resolv.c,v 1.31 2003/05/04 18:50:53 gerald Exp $
* $Id: resolv.c,v 1.32 2003/05/05 00:53:06 guy Exp $
*
* Laurent Deniel <laurent.deniel@free.fr>
*
@ -1424,7 +1424,7 @@ static guint ipxnet_addr_lookup(const guchar *name, gboolean *success)
#ifdef HAVE_GNU_ADNS
void
host_name_lookup_init() {
host_name_lookup_init(void) {
/* XXX - Any flags we should be using? */
/* XXX - We could provide config settings for DNS servers, and
pass them to ADNS with adns_init_strcfg */
@ -1482,11 +1482,12 @@ host_name_lookup_process(gpointer data _U_) {
}
}
/* Keep the timeout in place */
return 1;
}
void
host_name_lookup_cleanup() {
host_name_lookup_cleanup(void) {
void *qdata;
adns_queue_head = g_list_first(adns_queue_head);
@ -1499,6 +1500,22 @@ host_name_lookup_cleanup() {
adns_finish(ads);
}
#else
void
host_name_lookup_init(void) {
}
gint
host_name_lookup_process(gpointer data _U_) {
/* Kill the timeout, as there's nothing for it to do */
return 0;
}
void
host_name_lookup_cleanup(void) {
}
#endif /* HAVE_GNU_ADNS */
extern guchar *get_hostname(guint addr)

View File

@ -1,7 +1,7 @@
/* resolv.h
* Definitions for network object lookup
*
* $Id: resolv.h,v 1.11 2003/05/04 18:50:54 gerald Exp $
* $Id: resolv.h,v 1.12 2003/05/05 00:53:06 guy Exp $
*
* Laurent Deniel <laurent.deniel@free.fr>
*
@ -67,10 +67,10 @@ extern guchar *get_tcp_port(guint port);
extern guchar *get_sctp_port(guint port);
/* host_name_lookup_init fires up an ADNS socket if we're using ADNS */
extern void host_name_lookup_init();
extern void host_name_lookup_init(void);
/* host_name_lookup_cleanup cleans up an ADNS socket if we're using ADNS */
extern void host_name_lookup_cleanup();
extern void host_name_lookup_cleanup(void);
/* get_hostname returns the host name or "%d.%d.%d.%d" if not found */
extern guchar *get_hostname(guint addr);