aboutsummaryrefslogtreecommitdiffstats
path: root/epan/addr_resolv.h
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2009-12-24 00:58:31 +0000
committerGerald Combs <gerald@wireshark.org>2009-12-24 00:58:31 +0000
commitb7702fd6d729ccbc50b4d8c46a05a66b4778adf4 (patch)
treef48281b95bb7b533dd7fe1a3f0e180e85e3e68ef /epan/addr_resolv.h
parent49d7118bd22bce6e9d0af545d7eb503e75209a29 (diff)
If we're using c-ares, have get_host_ipaddr and get_host_ipaddr6 time
out after 250ms. This should fix the annoying freeze in bug 658. svn path=/trunk/; revision=31360
Diffstat (limited to 'epan/addr_resolv.h')
-rw-r--r--epan/addr_resolv.h24
1 files changed, 17 insertions, 7 deletions
diff --git a/epan/addr_resolv.h b/epan/addr_resolv.h
index 2ff69b5a44..ff37d5fb89 100644
--- a/epan/addr_resolv.h
+++ b/epan/addr_resolv.h
@@ -179,15 +179,25 @@ extern void add_ipv6_name(struct e_in6_addr *addr, const gchar *name);
/* add ethernet address / name corresponding to IP address */
extern void add_ether_byip(guint ip, const guint8 *eth);
-/* Translates a string representing the hostname or dotted-decimal IP address
- * into a numeric IP address value, returning TRUE if it succeeds and
- * FALSE if it fails. */
+/** Translates a string representing a hostname or dotted-decimal IPv4 address
+ * into a numeric IPv4 address value in network byte order. If compiled with
+ * c-ares, the request will wait a maximum of 250ms for the request to finish.
+ * Otherwise the wait time will be system-dependent, ususally much longer.
+ *
+ * @param[in] host The hostname.
+ * @param[out] addrp The numeric IPv4 address in network byte order.
+ * @return TRUE on success, FALSE on failure or timeout.
+ */
gboolean get_host_ipaddr(const char *host, guint32 *addrp);
-/*
- * Translate IPv6 numeric address or FQDN hostname, into binary IPv6 address.
- * Return TRUE if we succeed and set "*addrp" to that numeric IP address;
- * return FALSE if we fail.
+/** Translates a string representing a hostname or colon-hex IPv6 address
+ * into a numeric IPv6 address value in network byte order. If compiled with
+ * c-ares, the request will wait a maximum of 250ms for the request to finish.
+ * Otherwise the wait time will be system-dependent, usually much longer.
+ *
+ * @param[in] host The hostname.
+ * @param[out] addrp The numeric IPv6 address in network byte order.
+ * @return TRUE on success, FALSE on failure or timeout.
*/
gboolean get_host_ipaddr6(const char *host, struct e_in6_addr *addrp);