diff options
author | Guy Harris <guy@alum.mit.edu> | 2006-02-12 21:52:18 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2006-02-12 21:52:18 +0000 |
commit | 4d8d477018ac51a9536103e34368dc11a37e2ed4 (patch) | |
tree | c56e6d197864b79c58abd971ebc5bb2d43af6b10 /dumpcap.c | |
parent | 4d94f994b56be336d459ebd4585a46a8b6d8c4c1 (diff) |
Move create_tempfile() to tempfile.c out of util.c. This means dumpcap
no longer needs util.c, so it no longer includes routines that use
host_ip_af(), so it no longer needs to define its own host_ip_af().
That also means dumpcap.c no longer needs to include <sys/socket.h>.
svn path=/trunk/; revision=17278
Diffstat (limited to 'dumpcap.c')
-rw-r--r-- | dumpcap.c | 26 |
1 files changed, 0 insertions, 26 deletions
@@ -42,10 +42,6 @@ #include <netdb.h> #endif -#ifdef HAVE_SYS_SOCKET_H -#include <sys/socket.h> -#endif - #include "ringbuffer.h" #include "clopts_common.h" #include "cmdarg_err.h" @@ -665,25 +661,3 @@ const char *netsnmp_get_version(void) { return ""; } gboolean dfilter_compile(const gchar *text, dfilter_t **dfp) { (void)text; (void)dfp; return FALSE; } void dfilter_free(dfilter_t *df) { (void)df; } - - -/* - * Find out whether a hostname resolves to an ip or ipv6 address - * Return "ip6" if it is IPv6, "ip" otherwise (including the case - * that we don't know) - */ -const char* host_ip_af(const char *host -#ifndef HAVE_GETHOSTBYNAME2 -_U_ -#endif -) -{ -#ifdef HAVE_GETHOSTBYNAME2 - struct hostent *h; - return (h = gethostbyname2(host, AF_INET6)) && h->h_addrtype == AF_INET6 ? "ip6" : "ip"; -#else - return "ip"; -#endif -} - - |