ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
April 17th, 2024 | 14:30-16:00 SGT (UTC+8) | Online

Wireshark-dev: [Wireshark-dev] Problem in 'packet-f5ethtrailer.c'

From: Gisle Vanem <gisle.vanem@xxxxxxxxx>
Date: Thu, 19 Mar 2020 15:40:58 +0100
I'm surprised no one has come across this compile
error yet:
  epan/dissectors/packet-f5ethtrailer.c(482): error C2143: syntax error: missing ';' before '.'
  epan/dissectors/packet-f5ethtrailer.c(485): error C2224: left of '.S_addr' must have struct/union type
  epan/dissectors/packet-f5ethtrailer.c(487): error C2224: left of '.S_addr' must have struct/union type

(using MSVC-2019).

Reason seems simple; <winsock2.h> has snuck in somehow and
added the wellknown "#define s_addr S_un.S_addr"

A simple fix is:

--- a/epan/dissectors/packet-f5ethtrailer.c 2020-03-19 13:31:36
+++ b/epan/dissectors/packet-f5ethtrailer.c 2020-03-19 14:26:51
@@ -204,6 +204,7 @@
 #include <epan/stats_tree.h>
 #define F5FILEINFOTAP_SRC
 #include "packet-f5ethtrailer.h"
+#undef s_addr
 #undef F5FILEINFOTAP_SRC

--------

BTW.
note the time-stamp on the 'a' file. How come it
gets updated as soon as I do a 'git pull'?
From a 'git log packet-f5ethtrailer.c', the last
change was 19 days ago.

--
--gv