aboutsummaryrefslogtreecommitdiffstats
path: root/extcap/udpdump.c
diff options
context:
space:
mode:
authorJoão Valverde <joao.valverde@tecnico.ulisboa.pt>2017-11-08 14:02:08 +0000
committerJoão Valverde <j@v6e.pt>2017-11-09 16:08:25 +0000
commit39967011836c1e23dff188ffaadb747d9dcda062 (patch)
tree768e37aa23b5ad8775a47543ce26f1fdb3f3269d /extcap/udpdump.c
parent2ebc41050e43c508edbc8c0fa8cccb9797c463cf (diff)
Replace inet_addr() with our inet_pton() wrapper
Error checking omitted like in original code. Change-Id: If8b4181d30ddf5717951aaf7ec61db25c0bc5322 Reviewed-on: https://code.wireshark.org/review/24309 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot Reviewed-by: João Valverde <j@v6e.pt>
Diffstat (limited to 'extcap/udpdump.c')
-rw-r--r--extcap/udpdump.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/extcap/udpdump.c b/extcap/udpdump.c
index 88da1b8f7f..30c30f738c 100644
--- a/extcap/udpdump.c
+++ b/extcap/udpdump.c
@@ -81,7 +81,6 @@
#define EXP_PDU_TAG_DST_PORT 26
static gboolean run_loop = TRUE;
-static uint32_t localhost = 0;
enum {
EXTCAP_BASE_OPTIONS_ENUM,
@@ -284,7 +283,7 @@ static int dump_packet(const char* proto_name, const guint16 listenport, const c
add_proto_name(mbuf, &offset, proto_name);
add_ip_source_address(mbuf, &offset, clientaddr.sin_addr.s_addr);
- add_ip_dest_address(mbuf, &offset, localhost);
+ add_ip_dest_address(mbuf, &offset, WS_IN4_LOOPBACK);
add_udp_source_port(mbuf, &offset, clientaddr.sin_port);
add_udp_dst_port(mbuf, &offset, listenport);
add_end_options(mbuf, &offset);
@@ -329,7 +328,6 @@ static void run_listener(const char* fifo, const guint16 port, const char* proto
g_debug("Listener running on port %u", port);
buf = (char*)g_malloc(PKT_BUF_SIZE);
- localhost = inet_addr("127.0.0.1");
while(run_loop == TRUE) {
memset(buf, 0x0, PKT_BUF_SIZE);