diff options
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | epan/addr_resolv.c | 5 | ||||
-rw-r--r-- | epan/dissectors/packet-aeron.c | 11 | ||||
-rw-r--r-- | epan/dissectors/packet-dcom.c | 18 | ||||
-rw-r--r-- | epan/dissectors/packet-lbm.h | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-lbmr.c | 11 | ||||
-rw-r--r-- | epan/dissectors/packet-lbtrm.c | 11 | ||||
-rw-r--r-- | text2pcap.c | 4 | ||||
-rw-r--r-- | tools/pre-commit-check.conf | 1 | ||||
-rw-r--r-- | wsutil/inet_aton.c | 14 | ||||
-rw-r--r-- | wsutil/inet_aton.h | 18 |
11 files changed, 35 insertions, 62 deletions
diff --git a/configure.ac b/configure.ac index 4bb99da914..65d05fc7d6 100644 --- a/configure.ac +++ b/configure.ac @@ -2916,7 +2916,7 @@ AC_CHECK_FUNCS(mkstemp mkdtemp) AC_SEARCH_LIBS(inet_aton, [socket nsl], [ INET_ATON_LO="" - AC_DEFINE(HAVE_INET_ATON, 0, [Define to 1 if you have the inet_aton function.]) + AC_DEFINE(HAVE_INET_ATON, 1, [Define to 1 if you have the inet_aton function.]) ], INET_ATON_LO="inet_aton.lo") AC_SUBST(INET_ATON_LO) diff --git a/epan/addr_resolv.c b/epan/addr_resolv.c index 0d85637f33..b8b0fe18c2 100644 --- a/epan/addr_resolv.c +++ b/epan/addr_resolv.c @@ -85,10 +85,6 @@ #include <winsock2.h> /* needed to define AF_ values on Windows */ #endif -#ifndef HAVE_INET_ATON -# include "wsutil/inet_aton.h" -#endif - #ifdef NEED_INET_V6DEFS_H # include "wsutil/inet_v6defs.h" #endif @@ -125,6 +121,7 @@ #include <wsutil/report_err.h> #include <wsutil/file_util.h> #include <wsutil/pint.h> +#include "wsutil/inet_aton.h" #include <epan/strutil.h> #include <epan/to_str-int.h> diff --git a/epan/dissectors/packet-aeron.c b/epan/dissectors/packet-aeron.c index 143a93d018..86fa70bc63 100644 --- a/epan/dissectors/packet-aeron.c +++ b/epan/dissectors/packet-aeron.c @@ -20,12 +20,7 @@ */ #include "config.h" -#ifdef HAVE_ARPA_INET_H - #include <arpa/inet.h> -#endif -#if HAVE_WINSOCK2_H - #include <winsock2.h> -#endif + #include <epan/packet.h> #include <epan/prefs.h> #include <epan/expert.h> @@ -34,9 +29,7 @@ #include <epan/conversation.h> #include <epan/exceptions.h> #include <epan/to_str.h> -#ifndef HAVE_INET_ATON - #include <wsutil/inet_aton.h> -#endif +#include <wsutil/inet_aton.h> #include <wsutil/pint.h> /* The Aeron protocol is defined at https://github.com/real-logic/Aeron/wiki/Protocol-Specification */ diff --git a/epan/dissectors/packet-dcom.c b/epan/dissectors/packet-dcom.c index e41a12e0af..3225a7465e 100644 --- a/epan/dissectors/packet-dcom.c +++ b/epan/dissectors/packet-dcom.c @@ -65,22 +65,12 @@ #include "config.h" -#ifdef HAVE_ARPA_INET_H -#include <arpa/inet.h> -#endif - -#ifdef HAVE_WINSOCK2_H -#include <winsock2.h> -#endif - #include <string.h> #include <epan/packet.h> #include <epan/exceptions.h> #include <epan/addr_resolv.h> -#ifndef HAVE_INET_ATON #include <wsutil/inet_aton.h> -#endif #include <epan/expert.h> #include <epan/prefs.h> #include "packet-dcerpc.h" @@ -265,17 +255,17 @@ void dcom_interface_dump(void) { for(machines = dcom_machines; machines != NULL; machines = g_list_next(machines)) { machine = (dcom_machine_t *)machines->data; - g_warning("Machine(#%4u): IP:%s", machine->first_packet, address_to_str(wmem_packet_scope(), &machine->ip)); + /*g_warning("Machine(#%4u): IP:%s", machine->first_packet, address_to_str(wmem_packet_scope(), &machine->ip));*/ for(objects = machine->objects; objects != NULL; objects = g_list_next(objects)) { object = (dcom_object_t *)objects->data; - g_warning(" Object(#%4u): OID:0x%" G_GINT64_MODIFIER "x private:%p", object->first_packet, object->oid, object->private_data); + /*g_warning(" Object(#%4u): OID:0x%" G_GINT64_MODIFIER "x private:%p", object->first_packet, object->oid, object->private_data);*/ for(interfaces = object->interfaces; interfaces != NULL; interfaces = g_list_next(interfaces)) { interf = (dcom_interface_t *)interfaces->data; - g_warning(" Interface(#%4u): iid:%s", + /*g_warning(" Interface(#%4u): iid:%s", interf->first_packet, guids_resolve_guid_to_str(&interf->iid)); - g_warning(" ipid:%s", guids_resolve_guid_to_str(&interf->ipid)); + g_warning(" ipid:%s", guids_resolve_guid_to_str(&interf->ipid));*/ } } } diff --git a/epan/dissectors/packet-lbm.h b/epan/dissectors/packet-lbm.h index 376595929a..ec0bef2c68 100644 --- a/epan/dissectors/packet-lbm.h +++ b/epan/dissectors/packet-lbm.h @@ -94,6 +94,8 @@ #endif #include <stddef.h> +#include <wsutil/inet_aton.h> + typedef guint8 lbm_uint8_t; typedef guint16 lbm_uint16_t; typedef guint32 lbm_uint32_t; diff --git a/epan/dissectors/packet-lbmr.c b/epan/dissectors/packet-lbmr.c index b8820fcc88..e42d0bb43e 100644 --- a/epan/dissectors/packet-lbmr.c +++ b/epan/dissectors/packet-lbmr.c @@ -23,12 +23,7 @@ */ #include "config.h" -#ifdef HAVE_ARPA_INET_H - #include <arpa/inet.h> -#endif -#if HAVE_WINSOCK2_H - #include <winsock2.h> -#endif + #include <epan/packet.h> #include <epan/address.h> #include <epan/strutil.h> @@ -38,9 +33,7 @@ #include <epan/expert.h> #include <epan/uat.h> #include <epan/to_str.h> -#ifndef HAVE_INET_ATON - #include <wsutil/inet_aton.h> -#endif +#include <wsutil/inet_aton.h> #include <wsutil/pint.h> #include "packet-lbm.h" #include "packet-lbtru.h" diff --git a/epan/dissectors/packet-lbtrm.c b/epan/dissectors/packet-lbtrm.c index 9d4bf35fe3..805ad93b68 100644 --- a/epan/dissectors/packet-lbtrm.c +++ b/epan/dissectors/packet-lbtrm.c @@ -23,12 +23,7 @@ */ #include "config.h" -#ifdef HAVE_ARPA_INET_H - #include <arpa/inet.h> -#endif -#if HAVE_WINSOCK2_H - #include <winsock2.h> -#endif + #include <epan/packet.h> #include <epan/prefs.h> #include <epan/expert.h> @@ -36,9 +31,7 @@ #include <epan/tap.h> #include <epan/conversation.h> #include <epan/to_str.h> -#ifndef HAVE_INET_ATON - #include <wsutil/inet_aton.h> -#endif +#include <wsutil/inet_aton.h> #include <wsutil/pint.h> #include "packet-lbm.h" #include "packet-lbtrm.h" diff --git a/text2pcap.c b/text2pcap.c index bd72a5e975..64e1423bd7 100644 --- a/text2pcap.c +++ b/text2pcap.c @@ -152,10 +152,6 @@ #include <winsock2.h> /* needed to define AF_ values on Windows */ #endif -#ifndef HAVE_INET_ATON -# include "wsutil/inet_aton.h" -#endif - #ifdef HAVE_SYS_SOCKET_H #include <sys/socket.h> #endif diff --git a/tools/pre-commit-check.conf b/tools/pre-commit-check.conf index 314cf267d5..0129272196 100644 --- a/tools/pre-commit-check.conf +++ b/tools/pre-commit-check.conf @@ -12,3 +12,4 @@ asn1/*/packet-*-template.c extcap/* tools/lemon/* +wsutil/inet_aton.c diff --git a/wsutil/inet_aton.c b/wsutil/inet_aton.c index ecf64afbca..296b225109 100644 --- a/wsutil/inet_aton.c +++ b/wsutil/inet_aton.c @@ -29,6 +29,8 @@ #include "config.h" +#include "inet_aton.h" + #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)inet_addr.c 8.1 (Berkeley) 6/17/93"; #endif /* LIBC_SCCS and not lint */ @@ -37,19 +39,7 @@ static char sccsid[] = "@(#)inet_addr.c 8.1 (Berkeley) 6/17/93"; #include <sys/param.h> #endif -#ifdef HAVE_NETINET_IN_H -#include <netinet/in.h> -#endif - -#ifdef HAVE_WINSOCK2_H -#include <winsock2.h> -#endif - -#ifdef HAVE_ARPA_INET_H -#include <arpa/inet.h> -#endif -#include "inet_aton.h" /* * Check whether "cp" is a valid ascii representation diff --git a/wsutil/inet_aton.h b/wsutil/inet_aton.h index bfccb2224f..3d89dc23c2 100644 --- a/wsutil/inet_aton.h +++ b/wsutil/inet_aton.h @@ -28,7 +28,25 @@ #include "ws_symbol_export.h" +#ifdef HAVE_SYS_SOCKET_H +#include <sys/socket.h> /* needed to define AF_ values on UNIX */ +#endif + +#ifdef HAVE_NETINET_IN_H +# include <netinet/in.h> +#endif + +#ifdef HAVE_ARPA_INET_H +#include <arpa/inet.h> +#endif + +#ifdef HAVE_WINSOCK2_H +#include <winsock2.h> +#endif + +#ifndef HAVE_INET_ATON struct in_addr; WS_DLL_PUBLIC int inet_aton(const char* cp_arg, struct in_addr *addr); +#endif #endif |