summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2015-11-04 00:45:54 -0800
committerGuy Harris <guy@alum.mit.edu>2015-11-04 08:46:30 +0000
commitff9f9fc43162f3271e8335aae9b03175a0f2e7ee (patch)
tree2a6db2a90c4a6229e1c902be890bdb52bf58f219
parent321934f2ff9665f62a8ad4b2b554b457c79fd610 (diff)
downloadwireshark-ff9f9fc43162f3271e8335aae9b03175a0f2e7ee.tar.gz
Don't include "file.h" if you don't need it.
It ends up dragging in libwireshark headers, which programs not linking with libwireshark shouldn't do. In particular, including <epan/address.h> causes some functions that refer to libwireshark functions to be defined if the compiler doesn't handle "static inline" the way GCC does, and you end up requiring libwireshark even though you shouldn't require it. Move plurality() to wsutil/str_util.h, so that non-libwireshark code can get it without include epan/packet.h. Fix includes as necessary. Change-Id: Ie4819719da4c2b349f61445112aa419e99b977d3 Reviewed-on: https://code.wireshark.org/review/11545 Reviewed-by: Guy Harris <guy@alum.mit.edu>
-rw-r--r--asn1/idmp/packet-idmp-template.c2
-rw-r--r--asn1/kerberos/packet-kerberos-template.c1
-rw-r--r--asn1/ldap/packet-ldap-template.c1
-rw-r--r--asn1/lte-rrc/packet-lte-rrc-template.c2
-rw-r--r--asn1/rtse/packet-rtse-template.c2
-rw-r--r--capture_opts.c2
-rw-r--r--dumpcap.c1
-rw-r--r--editcap.c1
-rw-r--r--epan/dissectors/file-file.c1
-rw-r--r--epan/dissectors/file-gif.c3
-rw-r--r--epan/dissectors/packet-ansi_a.c3
-rw-r--r--epan/dissectors/packet-asap.c2
-rw-r--r--epan/dissectors/packet-auto_rp.c2
-rw-r--r--epan/dissectors/packet-bgp.c2
-rw-r--r--epan/dissectors/packet-bootp.c1
-rw-r--r--epan/dissectors/packet-bssap.c1
-rw-r--r--epan/dissectors/packet-collectd.c2
-rw-r--r--epan/dissectors/packet-cops.c4
-rw-r--r--epan/dissectors/packet-daap.c1
-rw-r--r--epan/dissectors/packet-data.c1
-rw-r--r--epan/dissectors/packet-dccp.c1
-rw-r--r--epan/dissectors/packet-dcerpc.c1
-rw-r--r--epan/dissectors/packet-dhcpv6.c1
-rw-r--r--epan/dissectors/packet-dmp.c2
-rw-r--r--epan/dissectors/packet-dnp.c1
-rw-r--r--epan/dissectors/packet-dtls.c1
-rw-r--r--epan/dissectors/packet-dua.c1
-rw-r--r--epan/dissectors/packet-ecp-oui.c4
-rw-r--r--epan/dissectors/packet-enrp.c2
-rw-r--r--epan/dissectors/packet-evrc.c1
-rw-r--r--epan/dissectors/packet-frame.c1
-rw-r--r--epan/dissectors/packet-gsm_a_bssmap.c2
-rw-r--r--epan/dissectors/packet-gsm_a_common.c1
-rw-r--r--epan/dissectors/packet-iax2.c2
-rw-r--r--epan/dissectors/packet-idmp.c12
-rw-r--r--epan/dissectors/packet-ieee80211.c1
-rw-r--r--epan/dissectors/packet-igmp.c1
-rw-r--r--epan/dissectors/packet-ip.c1
-rw-r--r--epan/dissectors/packet-ipars.c1
-rw-r--r--epan/dissectors/packet-ipv6.c1
-rw-r--r--epan/dissectors/packet-isakmp.c1
-rw-r--r--epan/dissectors/packet-iua.c1
-rw-r--r--epan/dissectors/packet-kerberos.c14
-rw-r--r--epan/dissectors/packet-ldap.c13
-rw-r--r--epan/dissectors/packet-lte-rrc.c16
-rw-r--r--epan/dissectors/packet-m2tp.c2
-rw-r--r--epan/dissectors/packet-m2ua.c2
-rw-r--r--epan/dissectors/packet-m3ua.c1
-rw-r--r--epan/dissectors/packet-media.c2
-rw-r--r--epan/dissectors/packet-mip6.c2
-rw-r--r--epan/dissectors/packet-mtp3mg.c2
-rw-r--r--epan/dissectors/packet-ndmp.c1
-rw-r--r--epan/dissectors/packet-netflow.c1
-rw-r--r--epan/dissectors/packet-nfs.c1
-rw-r--r--epan/dissectors/packet-ntlmssp.c1
-rw-r--r--epan/dissectors/packet-ositp.c1
-rw-r--r--epan/dissectors/packet-ossp.c2
-rw-r--r--epan/dissectors/packet-p_mul.c2
-rw-r--r--epan/dissectors/packet-per.c1
-rw-r--r--epan/dissectors/packet-pop.c1
-rw-r--r--epan/dissectors/packet-ppi.c1
-rw-r--r--epan/dissectors/packet-ppp.c1
-rw-r--r--epan/dissectors/packet-pw-atm.c2
-rw-r--r--epan/dissectors/packet-pw-common.c1
-rw-r--r--epan/dissectors/packet-q2931.c1
-rw-r--r--epan/dissectors/packet-rpc.c1
-rw-r--r--epan/dissectors/packet-rpcap.c1
-rw-r--r--epan/dissectors/packet-rtse.c12
-rw-r--r--epan/dissectors/packet-sccp.c1
-rw-r--r--epan/dissectors/packet-scsi-ssc.c1
-rw-r--r--epan/dissectors/packet-sctp.c1
-rw-r--r--epan/dissectors/packet-ses.c2
-rw-r--r--epan/dissectors/packet-sml.c2
-rw-r--r--epan/dissectors/packet-smtp.c1
-rw-r--r--epan/dissectors/packet-ssl.c1
-rw-r--r--epan/dissectors/packet-sua.c2
-rw-r--r--epan/dissectors/packet-tcp.c3
-rw-r--r--epan/dissectors/packet-uts.c1
-rw-r--r--epan/dissectors/packet-v5ua.c2
-rw-r--r--epan/dissectors/packet-wsp.c2
-rw-r--r--epan/packet.c2
-rw-r--r--epan/packet.h3
-rw-r--r--epan/reassemble.c2
-rw-r--r--ringbuffer.h1
-rw-r--r--tshark.c3
-rw-r--r--ui/capture.c1
-rw-r--r--ui/gtk/expert_comp_dlg.c1
-rw-r--r--ui/gtk/export_sslkeys.c1
-rw-r--r--ui/gtk/fileset_dlg.c2
-rw-r--r--ui/gtk/packet_panes.c1
-rw-r--r--ui/gtk/voip_calls_dlg.c3
-rw-r--r--wsutil/str_util.h3
92 files changed, 160 insertions, 42 deletions
diff --git a/asn1/idmp/packet-idmp-template.c b/asn1/idmp/packet-idmp-template.c
index 705630afa3..0642c4cefd 100644
--- a/asn1/idmp/packet-idmp-template.c
+++ b/asn1/idmp/packet-idmp-template.c
@@ -32,6 +32,8 @@
#include <epan/ipproto.h>
#include <epan/strutil.h>
+#include <wsutil/str_util.h>
+
#include "packet-tcp.h"
#include "packet-ber.h"
diff --git a/asn1/kerberos/packet-kerberos-template.c b/asn1/kerberos/packet-kerberos-template.c
index 07d7d7ec95..5548ae1414 100644
--- a/asn1/kerberos/packet-kerberos-template.c
+++ b/asn1/kerberos/packet-kerberos-template.c
@@ -65,6 +65,7 @@
#include <epan/prefs.h>
#include <wsutil/file_util.h>
#include <wsutil/ws_diag_control.h>
+#include <wsutil/str_util.h>
#include "packet-kerberos.h"
#include "packet-netbios.h"
#include "packet-tcp.h"
diff --git a/asn1/ldap/packet-ldap-template.c b/asn1/ldap/packet-ldap-template.c
index 5c4e447802..0d5e2cdd06 100644
--- a/asn1/ldap/packet-ldap-template.c
+++ b/asn1/ldap/packet-ldap-template.c
@@ -94,6 +94,7 @@
#include <epan/asn1.h>
#include <epan/expert.h>
#include <epan/uat.h>
+#include <wsutil/str_util.h>
#include "packet-frame.h"
#include "packet-tcp.h"
#include "packet-windows-common.h"
diff --git a/asn1/lte-rrc/packet-lte-rrc-template.c b/asn1/lte-rrc/packet-lte-rrc-template.c
index b768b592b3..731eb52bc5 100644
--- a/asn1/lte-rrc/packet-lte-rrc-template.c
+++ b/asn1/lte-rrc/packet-lte-rrc-template.c
@@ -37,6 +37,8 @@
#include <epan/exceptions.h>
#include <epan/show_exception.h>
+#include <wsutil/str_util.h>
+
#include "packet-per.h"
#include "packet-rrc.h"
#include "packet-gsm_a_common.h"
diff --git a/asn1/rtse/packet-rtse-template.c b/asn1/rtse/packet-rtse-template.c
index b263d21294..35130d7d9f 100644
--- a/asn1/rtse/packet-rtse-template.c
+++ b/asn1/rtse/packet-rtse-template.c
@@ -30,6 +30,8 @@
#include <epan/asn1.h>
#include <epan/expert.h>
+#include <wsutil/str_util.h>
+
#include "packet-ber.h"
#include "packet-pres.h"
#include "packet-acse.h"
diff --git a/capture_opts.c b/capture_opts.c
index f4c97e27d9..5d82ad5c78 100644
--- a/capture_opts.c
+++ b/capture_opts.c
@@ -29,6 +29,8 @@
#include <string.h>
+#include <errno.h>
+
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
diff --git a/dumpcap.c b/dumpcap.c
index 06b76c41ca..80aadc5246 100644
--- a/dumpcap.c
+++ b/dumpcap.c
@@ -160,6 +160,7 @@
#include "log.h"
#include "wsutil/file_util.h"
#include "wsutil/os_version_info.h"
+#include "wsutil/str_util.h"
#include "caputils/ws80211_utils.h"
diff --git a/editcap.c b/editcap.c
index ba924ae33c..8f69671cb1 100644
--- a/editcap.c
+++ b/editcap.c
@@ -84,6 +84,7 @@
#include <wsutil/privileges.h>
#include <wsutil/report_err.h>
#include <wsutil/strnatcmp.h>
+#include <wsutil/str_util.h>
#include <wsutil/ws_diag_control.h>
#include <wsutil/ws_version_info.h>
diff --git a/epan/dissectors/file-file.c b/epan/dissectors/file-file.c
index acb8e19607..b668000a06 100644
--- a/epan/dissectors/file-file.c
+++ b/epan/dissectors/file-file.c
@@ -37,6 +37,7 @@
#include <epan/tap.h>
#include <epan/expert.h>
#include <wsutil/md5.h>
+#include <wsutil/str_util.h>
#include "color.h"
#include "color_filters.h"
diff --git a/epan/dissectors/file-gif.c b/epan/dissectors/file-gif.c
index 5fc0ddb07c..502736b151 100644
--- a/epan/dissectors/file-gif.c
+++ b/epan/dissectors/file-gif.c
@@ -37,9 +37,10 @@
#include "config.h"
-
#include <epan/packet.h>
+#include <wsutil/str_util.h>
+
void proto_register_gif(void);
void proto_reg_handoff_gif(void);
diff --git a/epan/dissectors/packet-ansi_a.c b/epan/dissectors/packet-ansi_a.c
index d157f90c00..ea1870a6a4 100644
--- a/epan/dissectors/packet-ansi_a.c
+++ b/epan/dissectors/packet-ansi_a.c
@@ -39,7 +39,6 @@
#include "config.h"
-
#include <epan/packet.h>
#include <epan/exceptions.h>
#include <epan/prefs.h>
@@ -49,6 +48,8 @@
#include <epan/expert.h>
#include <epan/to_str.h>
+#include <wsutil/str_util.h>
+
#include "packet-rtp.h"
#include "packet-bssap.h"
#include "packet-ansi_a.h"
diff --git a/epan/dissectors/packet-asap.c b/epan/dissectors/packet-asap.c
index 2893cc1f0a..cc19e71bfe 100644
--- a/epan/dissectors/packet-asap.c
+++ b/epan/dissectors/packet-asap.c
@@ -44,6 +44,8 @@
#include <epan/to_str.h>
#include <epan/sctpppids.h>
+#include <wsutil/str_util.h>
+
void proto_register_asap(void);
void proto_reg_handoff_asap(void);
diff --git a/epan/dissectors/packet-auto_rp.c b/epan/dissectors/packet-auto_rp.c
index 25a6e54797..3c0d430766 100644
--- a/epan/dissectors/packet-auto_rp.c
+++ b/epan/dissectors/packet-auto_rp.c
@@ -28,6 +28,8 @@
#include <epan/packet.h>
#include <epan/to_str.h>
+#include <wsutil/str_util.h>
+
void proto_register_auto_rp(void);
void proto_reg_handoff_auto_rp(void);
diff --git a/epan/dissectors/packet-bgp.c b/epan/dissectors/packet-bgp.c
index beed817b26..909236102e 100644
--- a/epan/dissectors/packet-bgp.c
+++ b/epan/dissectors/packet-bgp.c
@@ -59,7 +59,6 @@
#include "config.h"
-
#include <epan/packet.h>
#include <epan/exceptions.h>
#include <epan/addr_and_mask.h>
@@ -69,6 +68,7 @@
#include <epan/expert.h>
#include <epan/etypes.h>
#include <epan/to_str.h>
+#include <wsutil/str_util.h>
#include "packet-ip.h"
#include "packet-ldp.h"
#include "packet-bgp.h"
diff --git a/epan/dissectors/packet-bootp.c b/epan/dissectors/packet-bootp.c
index c5c0f4df19..39635c41d1 100644
--- a/epan/dissectors/packet-bootp.c
+++ b/epan/dissectors/packet-bootp.c
@@ -121,6 +121,7 @@
#include <epan/expert.h>
#include <epan/uat.h>
#include <epan/oui.h>
+#include <wsutil/str_util.h>
void proto_register_bootp(void);
void proto_reg_handoff_bootp(void);
diff --git a/epan/dissectors/packet-bssap.c b/epan/dissectors/packet-bssap.c
index b275a6ca8e..c2c2234761 100644
--- a/epan/dissectors/packet-bssap.c
+++ b/epan/dissectors/packet-bssap.c
@@ -34,6 +34,7 @@
#include <epan/packet.h>
#include <epan/expert.h>
#include <epan/prefs.h>
+#include <wsutil/str_util.h>
#include "packet-bssap.h"
#include "packet-gsm_a_common.h"
#include "packet-e212.h"
diff --git a/epan/dissectors/packet-collectd.c b/epan/dissectors/packet-collectd.c
index 65522d2488..a532068013 100644
--- a/epan/dissectors/packet-collectd.c
+++ b/epan/dissectors/packet-collectd.c
@@ -31,6 +31,8 @@
#include <epan/stats_tree.h>
#include <epan/to_str.h>
+#include <wsutil/str_util.h>
+
#define STR_NONNULL(str) ((str) ? (str) : "(null)")
#define TYPE_HOST 0x0000
diff --git a/epan/dissectors/packet-cops.c b/epan/dissectors/packet-cops.c
index 920060faa2..fd24b6a88c 100644
--- a/epan/dissectors/packet-cops.c
+++ b/epan/dissectors/packet-cops.c
@@ -54,12 +54,14 @@
#include "config.h"
-
#include <epan/packet.h>
#include "packet-tcp.h"
#include <epan/oids.h>
#include <epan/expert.h>
+
+#include <wsutil/str_util.h>
+
#include "packet-ber.h"
/* XXX - The "plain" COPS port (3288) can be overridden in the prefs.
diff --git a/epan/dissectors/packet-daap.c b/epan/dissectors/packet-daap.c
index 1afe34c2d3..dffb8f2c53 100644
--- a/epan/dissectors/packet-daap.c
+++ b/epan/dissectors/packet-daap.c
@@ -25,6 +25,7 @@
#include <epan/packet.h>
#include <epan/exceptions.h>
+#include <wsutil/str_util.h>
#include "packet-http.h"
#define TCP_PORT_DAAP 3689
diff --git a/epan/dissectors/packet-data.c b/epan/dissectors/packet-data.c
index a9576bcd7a..9d1111a94a 100644
--- a/epan/dissectors/packet-data.c
+++ b/epan/dissectors/packet-data.c
@@ -29,6 +29,7 @@
#include <epan/prefs.h>
#include <epan/to_str.h>
#include <wsutil/md5.h>
+#include <wsutil/str_util.h>
/* proto_data cannot be static because it's referenced in the
* print routines
diff --git a/epan/dissectors/packet-dccp.c b/epan/dissectors/packet-dccp.c
index bb0e57fb48..339e8d822d 100644
--- a/epan/dissectors/packet-dccp.c
+++ b/epan/dissectors/packet-dccp.c
@@ -56,6 +56,7 @@
#include <epan/expert.h>
#include <epan/conversation.h>
#include <epan/tap.h>
+#include <wsutil/str_util.h>
#include <wsutil/utf8_entities.h>
#include "packet-dccp.h"
diff --git a/epan/dissectors/packet-dcerpc.c b/epan/dissectors/packet-dcerpc.c
index 1cdab2e5c3..21442413e3 100644
--- a/epan/dissectors/packet-dcerpc.c
+++ b/epan/dissectors/packet-dcerpc.c
@@ -40,6 +40,7 @@
#include <epan/addr_resolv.h>
#include <epan/show_exception.h>
#include <epan/decode_as.h>
+#include <wsutil/str_util.h>
#include "packet-tcp.h"
#include "packet-dcerpc.h"
#include "packet-dcerpc-nt.h"
diff --git a/epan/dissectors/packet-dhcpv6.c b/epan/dissectors/packet-dhcpv6.c
index 25f4c2fd50..fa947fb671 100644
--- a/epan/dissectors/packet-dhcpv6.c
+++ b/epan/dissectors/packet-dhcpv6.c
@@ -58,6 +58,7 @@
#include <epan/prefs.h>
#include <epan/to_str.h>
#include <epan/arptypes.h>
+#include <wsutil/str_util.h>
#include "packet-tcp.h"
#include "packet-arp.h"
diff --git a/epan/dissectors/packet-dmp.c b/epan/dissectors/packet-dmp.c
index 985fb544c2..0e6ef8b09e 100644
--- a/epan/dissectors/packet-dmp.c
+++ b/epan/dissectors/packet-dmp.c
@@ -47,6 +47,8 @@
#include <epan/strutil.h>
#include <epan/uat.h>
+#include <wsutil/str_util.h>
+
#include "packet-p1.h"
#include "packet-p22.h"
#include "packet-s5066sis.h"
diff --git a/epan/dissectors/packet-dnp.c b/epan/dissectors/packet-dnp.c
index 7970b5144c..408b7e958e 100644
--- a/epan/dissectors/packet-dnp.c
+++ b/epan/dissectors/packet-dnp.c
@@ -40,6 +40,7 @@
#include <epan/to_str.h>
#include <epan/crc16-tvb.h>
#include <wsutil/crc16.h>
+#include <wsutil/str_util.h>
/*
* See
diff --git a/epan/dissectors/packet-dtls.c b/epan/dissectors/packet-dtls.c
index ce92f88ea5..f90e9cab4c 100644
--- a/epan/dissectors/packet-dtls.c
+++ b/epan/dissectors/packet-dtls.c
@@ -56,6 +56,7 @@
#include <epan/uat.h>
#include <epan/sctpppids.h>
#include <epan/exported_pdu.h>
+#include <wsutil/str_util.h>
#include "packet-ssl-utils.h"
void proto_register_dtls(void);
diff --git a/epan/dissectors/packet-dua.c b/epan/dissectors/packet-dua.c
index 97dd5a23f9..a117eab0ed 100644
--- a/epan/dissectors/packet-dua.c
+++ b/epan/dissectors/packet-dua.c
@@ -34,6 +34,7 @@
#include <epan/packet.h>
#include <epan/sctpppids.h>
+#include <wsutil/str_util.h>
void proto_register_dua(void);
void proto_reg_handoff_dua(void);
diff --git a/epan/dissectors/packet-ecp-oui.c b/epan/dissectors/packet-ecp-oui.c
index a21326c16a..14fd8ae8a5 100644
--- a/epan/dissectors/packet-ecp-oui.c
+++ b/epan/dissectors/packet-ecp-oui.c
@@ -27,9 +27,11 @@
#include <epan/packet.h>
#include <epan/addr_resolv.h>
+#include <epan/oui.h>
+
+#include <wsutil/str_util.h>
#include "packet-ieee802a.h"
-#include "oui.h"
void proto_register_ecp_oui(void);
void proto_reg_handoff_ecp(void);
diff --git a/epan/dissectors/packet-enrp.c b/epan/dissectors/packet-enrp.c
index 4e66ebb6df..f709b22a20 100644
--- a/epan/dissectors/packet-enrp.c
+++ b/epan/dissectors/packet-enrp.c
@@ -43,6 +43,8 @@
#include <epan/to_str.h>
#include <epan/sctpppids.h>
+#include <wsutil/str_util.h>
+
void proto_register_enrp(void);
void proto_reg_handoff_enrp(void);
diff --git a/epan/dissectors/packet-evrc.c b/epan/dissectors/packet-evrc.c
index 6464f7ff8e..fbe522ec96 100644
--- a/epan/dissectors/packet-evrc.c
+++ b/epan/dissectors/packet-evrc.c
@@ -42,6 +42,7 @@
#include <epan/prefs.h>
#include <epan/expert.h>
+#include <wsutil/str_util.h>
/* PROTOTYPES/FORWARDS */
diff --git a/epan/dissectors/packet-frame.c b/epan/dissectors/packet-frame.c
index 5912f2570f..fde672106e 100644
--- a/epan/dissectors/packet-frame.c
+++ b/epan/dissectors/packet-frame.c
@@ -38,6 +38,7 @@
#include <epan/tap.h>
#include <epan/expert.h>
#include <wsutil/md5.h>
+#include <wsutil/str_util.h>
#include "packet-frame.h"
#include "log.h"
diff --git a/epan/dissectors/packet-gsm_a_bssmap.c b/epan/dissectors/packet-gsm_a_bssmap.c
index a0c8e369c8..fada2fe3d3 100644
--- a/epan/dissectors/packet-gsm_a_bssmap.c
+++ b/epan/dissectors/packet-gsm_a_bssmap.c
@@ -43,6 +43,8 @@
#include <epan/expert.h>
#include <epan/asn1.h>
+#include <wsutil/str_util.h>
+
#include "packet-bssgp.h"
#include "packet-gsm_a_common.h"
#include "packet-e212.h"
diff --git a/epan/dissectors/packet-gsm_a_common.c b/epan/dissectors/packet-gsm_a_common.c
index 84b7f4ba44..30123fb17f 100644
--- a/epan/dissectors/packet-gsm_a_common.c
+++ b/epan/dissectors/packet-gsm_a_common.c
@@ -34,6 +34,7 @@
#include <epan/expert.h>
#include <epan/tap.h>
#include <epan/stat_tap_ui.h>
+#include <wsutil/str_util.h>
#include "packet-gsm_a_common.h"
#include "packet-bssap.h"
#include "packet-gmr1_common.h"
diff --git a/epan/dissectors/packet-iax2.c b/epan/dissectors/packet-iax2.c
index a1fa4731b7..ac2f8e75fd 100644
--- a/epan/dissectors/packet-iax2.c
+++ b/epan/dissectors/packet-iax2.c
@@ -39,6 +39,8 @@
#include <epan/aftypes.h>
#include <epan/tap.h>
+#include <wsutil/str_util.h>
+
#include "packet-iax2.h"
#include <epan/iax2_codec_type.h>
diff --git a/epan/dissectors/packet-idmp.c b/epan/dissectors/packet-idmp.c
index 8f79096e68..192244ad10 100644
--- a/epan/dissectors/packet-idmp.c
+++ b/epan/dissectors/packet-idmp.c
@@ -40,6 +40,8 @@
#include <epan/ipproto.h>
#include <epan/strutil.h>
+#include <wsutil/str_util.h>
+
#include "packet-tcp.h"
#include "packet-ber.h"
@@ -171,7 +173,7 @@ static int hf_idmp_present = -1; /* INTEGER */
static int hf_idmp_absent = -1; /* NULL */
/*--- End of included file: packet-idmp-hf.c ---*/
-#line 130 "../../asn1/idmp/packet-idmp-template.c"
+#line 132 "../../asn1/idmp/packet-idmp-template.c"
/* Initialize the subtree pointers */
static gint ett_idmp = -1;
@@ -190,7 +192,7 @@ static gint ett_idmp_Code = -1;
static gint ett_idmp_InvokeId = -1;
/*--- End of included file: packet-idmp-ett.c ---*/
-#line 134 "../../asn1/idmp/packet-idmp-template.c"
+#line 136 "../../asn1/idmp/packet-idmp-template.c"
/*--- Included file: packet-idmp-fn.c ---*/
@@ -618,7 +620,7 @@ dissect_idmp_IDM_PDU(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U
/*--- End of included file: packet-idmp-fn.c ---*/
-#line 136 "../../asn1/idmp/packet-idmp-template.c"
+#line 138 "../../asn1/idmp/packet-idmp-template.c"
void
register_idmp_protocol_info(const char *oid, const ros_info_t *rinfo, int proto _U_, const char *name)
@@ -934,7 +936,7 @@ void proto_register_idmp(void)
NULL, HFILL }},
/*--- End of included file: packet-idmp-hfarr.c ---*/
-#line 319 "../../asn1/idmp/packet-idmp-template.c"
+#line 321 "../../asn1/idmp/packet-idmp-template.c"
};
/* List of subtrees */
@@ -957,7 +959,7 @@ void proto_register_idmp(void)
&ett_idmp_InvokeId,
/*--- End of included file: packet-idmp-ettarr.c ---*/
-#line 327 "../../asn1/idmp/packet-idmp-template.c"
+#line 329 "../../asn1/idmp/packet-idmp-template.c"
};
module_t *idmp_module;
diff --git a/epan/dissectors/packet-ieee80211.c b/epan/dissectors/packet-ieee80211.c
index 0b6d1759e9..8102b2d380 100644
--- a/epan/dissectors/packet-ieee80211.c
+++ b/epan/dissectors/packet-ieee80211.c
@@ -83,6 +83,7 @@
#include <epan/packet.h>
#include <epan/exceptions.h>
#include <wsutil/pint.h>
+#include <wsutil/str_util.h>
#include <epan/addr_resolv.h>
#include <epan/address_types.h>
#include <epan/strutil.h>
diff --git a/epan/dissectors/packet-igmp.c b/epan/dissectors/packet-igmp.c
index 6527096126..113cf0e9cb 100644
--- a/epan/dissectors/packet-igmp.c
+++ b/epan/dissectors/packet-igmp.c
@@ -113,6 +113,7 @@
#include <epan/to_str.h>
#include <epan/ipproto.h>
#include <epan/in_cksum.h>
+#include <wsutil/str_util.h>
#include "packet-igmp.h"
void proto_register_igmp(void);
diff --git a/epan/dissectors/packet-ip.c b/epan/dissectors/packet-ip.c
index ed4f73cb48..5702623891 100644
--- a/epan/dissectors/packet-ip.c
+++ b/epan/dissectors/packet-ip.c
@@ -46,6 +46,7 @@
#include <epan/ax25_pids.h>
#include <epan/decode_as.h>
#include <wiretap/erf.h>
+#include <wsutil/str_util.h>
#include "packet-ip.h"
#include "packet-juniper.h"
diff --git a/epan/dissectors/packet-ipars.c b/epan/dissectors/packet-ipars.c
index 121125c729..5e44bec563 100644
--- a/epan/dissectors/packet-ipars.c
+++ b/epan/dissectors/packet-ipars.c
@@ -28,6 +28,7 @@
#include "config.h"
#include <epan/packet.h>
+#include <wsutil/str_util.h>
void proto_register_ipars(void);
static int proto_ipars = -1;
diff --git a/epan/dissectors/packet-ipv6.c b/epan/dissectors/packet-ipv6.c
index 556aeb11ab..2973caf4e1 100644
--- a/epan/dissectors/packet-ipv6.c
+++ b/epan/dissectors/packet-ipv6.c
@@ -44,6 +44,7 @@
#include <epan/in_cksum.h>
#include <epan/decode_as.h>
#include <wiretap/erf.h>
+#include <wsutil/str_util.h>
#include "packet-ipv6.h"
#include "packet-ip.h"
#include "packet-juniper.h"
diff --git a/epan/dissectors/packet-isakmp.c b/epan/dissectors/packet-isakmp.c
index ca315fd3df..3f805e708c 100644
--- a/epan/dissectors/packet-isakmp.c
+++ b/epan/dissectors/packet-isakmp.c
@@ -51,6 +51,7 @@
#include <epan/expert.h>
#include <epan/to_str.h>
#include <epan/conversation.h>
+#include <wsutil/str_util.h>
#include "packet-x509if.h"
#include "packet-x509af.h"
#include "packet-isakmp.h"
diff --git a/epan/dissectors/packet-iua.c b/epan/dissectors/packet-iua.c
index 0131a78ee8..5a4ef32b4f 100644
--- a/epan/dissectors/packet-iua.c
+++ b/epan/dissectors/packet-iua.c
@@ -35,6 +35,7 @@
#include <epan/prefs.h>
#include <epan/sctpppids.h>
#include <epan/lapd_sapi.h>
+#include <wsutil/str_util.h>
void proto_register_iua(void);
void proto_reg_handoff_iua(void);
diff --git a/epan/dissectors/packet-kerberos.c b/epan/dissectors/packet-kerberos.c
index 271b17719a..59d8b83099 100644
--- a/epan/dissectors/packet-kerberos.c
+++ b/epan/dissectors/packet-kerberos.c
@@ -73,6 +73,7 @@
#include <epan/prefs.h>
#include <wsutil/file_util.h>
#include <wsutil/ws_diag_control.h>
+#include <wsutil/str_util.h>
#include "packet-kerberos.h"
#include "packet-netbios.h"
#include "packet-tcp.h"
@@ -349,7 +350,7 @@ static int hf_kerberos_KDCOptions_renew = -1;
static int hf_kerberos_KDCOptions_validate = -1;
/*--- End of included file: packet-kerberos-hf.c ---*/
-#line 172 "../../asn1/kerberos/packet-kerberos-template.c"
+#line 173 "../../asn1/kerberos/packet-kerberos-template.c"
/* Initialize the subtree pointers */
static gint ett_kerberos = -1;
@@ -425,7 +426,7 @@ static gint ett_kerberos_KERB_PA_PAC_REQUEST = -1;
static gint ett_kerberos_ChangePasswdData = -1;
/*--- End of included file: packet-kerberos-ett.c ---*/
-#line 186 "../../asn1/kerberos/packet-kerberos-template.c"
+#line 187 "../../asn1/kerberos/packet-kerberos-template.c"
static expert_field ei_kerberos_decrypted_keytype = EI_INIT;
static expert_field ei_kerberos_address = EI_INIT;
@@ -454,7 +455,7 @@ static gboolean gbl_do_col_info;
#define KERBEROS_ADDR_TYPE_IPV6 24
/*--- End of included file: packet-kerberos-val.h ---*/
-#line 199 "../../asn1/kerberos/packet-kerberos-template.c"
+#line 200 "../../asn1/kerberos/packet-kerberos-template.c"
static void
call_kerberos_callbacks(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int tag, kerberos_callbacks *cb)
@@ -3847,6 +3848,7 @@ dissect_kerberos_T_encKrbPrivPart_user_data(gboolean implicit_tag _U_, tvbuff_t
call_kerberos_callbacks(actx->pinfo, tree, new_tvb, KRB_CBTAG_PRIV_USER_DATA, (kerberos_callbacks*)actx->private_data);
}
+
return offset;
}
@@ -4340,7 +4342,7 @@ dissect_kerberos_ChangePasswdData(gboolean implicit_tag _U_, tvbuff_t *tvb _U_,
/*--- End of included file: packet-kerberos-fn.c ---*/
-#line 1985 "../../asn1/kerberos/packet-kerberos-template.c"
+#line 1986 "../../asn1/kerberos/packet-kerberos-template.c"
/* Make wrappers around exported functions for now */
int
@@ -5394,7 +5396,7 @@ void proto_register_kerberos(void) {
NULL, HFILL }},
/*--- End of included file: packet-kerberos-hfarr.c ---*/
-#line 2366 "../../asn1/kerberos/packet-kerberos-template.c"
+#line 2367 "../../asn1/kerberos/packet-kerberos-template.c"
};
/* List of subtrees */
@@ -5472,7 +5474,7 @@ void proto_register_kerberos(void) {
&ett_kerberos_ChangePasswdData,
/*--- End of included file: packet-kerberos-ettarr.c ---*/
-#line 2382 "../../asn1/kerberos/packet-kerberos-template.c"
+#line 2383 "../../asn1/kerberos/packet-kerberos-template.c"
};
static ei_register_info ei[] = {
diff --git a/epan/dissectors/packet-ldap.c b/epan/dissectors/packet-ldap.c
index a3b43f0028..3a414cc33a 100644
--- a/epan/dissectors/packet-ldap.c
+++ b/epan/dissectors/packet-ldap.c
@@ -102,6 +102,7 @@
#include <epan/asn1.h>
#include <epan/expert.h>
#include <epan/uat.h>
+#include <wsutil/str_util.h>
#include "packet-frame.h"
#include "packet-tcp.h"
#include "packet-windows-common.h"
@@ -344,7 +345,7 @@ static int hf_ldap_graceAuthNsRemaining = -1; /* INTEGER_0_maxInt */
static int hf_ldap_error = -1; /* T_error */
/*--- End of included file: packet-ldap-hf.c ---*/
-#line 194 "../../asn1/ldap/packet-ldap-template.c"
+#line 195 "../../asn1/ldap/packet-ldap-template.c"
/* Initialize the subtree pointers */
static gint ett_ldap = -1;
@@ -416,7 +417,7 @@ static gint ett_ldap_PasswordPolicyResponseValue = -1;
static gint ett_ldap_T_warning = -1;
/*--- End of included file: packet-ldap-ett.c ---*/
-#line 206 "../../asn1/ldap/packet-ldap-template.c"
+#line 207 "../../asn1/ldap/packet-ldap-template.c"
static expert_field ei_ldap_exceeded_filter_length = EI_INIT;
static expert_field ei_ldap_too_many_filter_elements = EI_INIT;
@@ -3836,7 +3837,7 @@ static int dissect_PasswordPolicyResponseValue_PDU(tvbuff_t *tvb _U_, packet_inf
/*--- End of included file: packet-ldap-fn.c ---*/
-#line 921 "../../asn1/ldap/packet-ldap-template.c"
+#line 922 "../../asn1/ldap/packet-ldap-template.c"
static int dissect_LDAPMessage_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, ldap_conv_info_t *ldap_info) {
int offset = 0;
@@ -5699,7 +5700,7 @@ void proto_register_ldap(void) {
NULL, HFILL }},
/*--- End of included file: packet-ldap-hfarr.c ---*/
-#line 2215 "../../asn1/ldap/packet-ldap-template.c"
+#line 2216 "../../asn1/ldap/packet-ldap-template.c"
};
/* List of subtrees */
@@ -5773,7 +5774,7 @@ void proto_register_ldap(void) {
&ett_ldap_T_warning,
/*--- End of included file: packet-ldap-ettarr.c ---*/
-#line 2229 "../../asn1/ldap/packet-ldap-template.c"
+#line 2230 "../../asn1/ldap/packet-ldap-template.c"
};
/* UAT for header fields */
static uat_field_t custom_attribute_types_uat_fields[] = {
@@ -5940,7 +5941,7 @@ proto_reg_handoff_ldap(void)
/*--- End of included file: packet-ldap-dis-tab.c ---*/
-#line 2379 "../../asn1/ldap/packet-ldap-template.c"
+#line 2380 "../../asn1/ldap/packet-ldap-template.c"
}
diff --git a/epan/dissectors/packet-lte-rrc.c b/epan/dissectors/packet-lte-rrc.c
index 97d2816825..d55284fe63 100644
--- a/epan/dissectors/packet-lte-rrc.c
+++ b/epan/dissectors/packet-lte-rrc.c
@@ -45,6 +45,8 @@
#include <epan/exceptions.h>
#include <epan/show_exception.h>
+#include <wsutil/str_util.h>
+
#include "packet-per.h"
#include "packet-rrc.h"
#include "packet-gsm_a_common.h"
@@ -199,7 +201,7 @@ typedef enum _SI_OrPSI_GERAN_enum {
} SI_OrPSI_GERAN_enum;
/*--- End of included file: packet-lte-rrc-val.h ---*/
-#line 79 "../../asn1/lte-rrc/packet-lte-rrc-template.c"
+#line 81 "../../asn1/lte-rrc/packet-lte-rrc-template.c"
/* Initialize the protocol and registered fields */
static int proto_lte_rrc = -1;
@@ -3076,7 +3078,7 @@ static int hf_lte_rrc_reserved_r12 = -1; /* BIT_STRING_SIZE_19 */
static int dummy_hf_lte_rrc_eag_field = -1; /* never registered */
/*--- End of included file: packet-lte-rrc-hf.c ---*/
-#line 84 "../../asn1/lte-rrc/packet-lte-rrc-template.c"
+#line 86 "../../asn1/lte-rrc/packet-lte-rrc-template.c"
static int hf_lte_rrc_eutra_cap_feat_group_ind_1 = -1;
static int hf_lte_rrc_eutra_cap_feat_group_ind_2 = -1;
@@ -4667,7 +4669,7 @@ static gint ett_lte_rrc_SBCCH_SL_BCH_Message = -1;
static gint ett_lte_rrc_MasterInformationBlock_SL = -1;
/*--- End of included file: packet-lte-rrc-ett.c ---*/
-#line 266 "../../asn1/lte-rrc/packet-lte-rrc-template.c"
+#line 268 "../../asn1/lte-rrc/packet-lte-rrc-template.c"
static gint ett_lte_rrc_featureGroupIndicators = -1;
static gint ett_lte_rrc_featureGroupIndRel9Add = -1;
@@ -45261,7 +45263,7 @@ static int dissect_UE_EUTRA_Capability_v9a0_IEs_PDU(tvbuff_t *tvb _U_, packet_in
/*--- End of included file: packet-lte-rrc-fn.c ---*/
-#line 2668 "../../asn1/lte-rrc/packet-lte-rrc-template.c"
+#line 2670 "../../asn1/lte-rrc/packet-lte-rrc-template.c"
static void
dissect_lte_rrc_DL_CCCH(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
@@ -56906,7 +56908,7 @@ void proto_register_lte_rrc(void) {
"BIT_STRING_SIZE_19", HFILL }},
/*--- End of included file: packet-lte-rrc-hfarr.c ---*/
-#line 2844 "../../asn1/lte-rrc/packet-lte-rrc-template.c"
+#line 2846 "../../asn1/lte-rrc/packet-lte-rrc-template.c"
{ &hf_lte_rrc_eutra_cap_feat_group_ind_1,
{ "Indicator 1", "lte-rrc.eutra_cap_feat_group_ind_1",
@@ -59026,7 +59028,7 @@ void proto_register_lte_rrc(void) {
&ett_lte_rrc_MasterInformationBlock_SL,
/*--- End of included file: packet-lte-rrc-ettarr.c ---*/
-#line 3555 "../../asn1/lte-rrc/packet-lte-rrc-template.c"
+#line 3557 "../../asn1/lte-rrc/packet-lte-rrc-template.c"
&ett_lte_rrc_featureGroupIndicators,
&ett_lte_rrc_featureGroupIndRel9Add,
@@ -59105,7 +59107,7 @@ void proto_register_lte_rrc(void) {
/*--- End of included file: packet-lte-rrc-dis-reg.c ---*/
-#line 3617 "../../asn1/lte-rrc/packet-lte-rrc-template.c"
+#line 3619 "../../asn1/lte-rrc/packet-lte-rrc-template.c"
register_init_routine(&lte_rrc_init_protocol);
register_cleanup_routine(&lte_rrc_cleanup_protocol);
diff --git a/epan/dissectors/packet-m2tp.c b/epan/dissectors/packet-m2tp.c
index b3ed1c2ac5..0470349b5d 100644
--- a/epan/dissectors/packet-m2tp.c
+++ b/epan/dissectors/packet-m2tp.c
@@ -31,6 +31,8 @@
#include <epan/packet.h>
+#include <wsutil/str_util.h>
+
#define M2TP_PAYLOAD_PROTOCOL_ID 99 /* s-link, not IANA-registered */
void proto_register_m2tp(void);
diff --git a/epan/dissectors/packet-m2ua.c b/epan/dissectors/packet-m2ua.c
index 3160b3bde6..764d65e367 100644
--- a/epan/dissectors/packet-m2ua.c
+++ b/epan/dissectors/packet-m2ua.c
@@ -33,6 +33,8 @@
#include <epan/prefs.h>
#include <epan/sctpppids.h>
+#include <wsutil/str_util.h>
+
void proto_register_m2ua(void);
void proto_reg_handoff_m2ua(void);
diff --git a/epan/dissectors/packet-m3ua.c b/epan/dissectors/packet-m3ua.c
index d095997736..2c92ce0bd2 100644
--- a/epan/dissectors/packet-m3ua.c
+++ b/epan/dissectors/packet-m3ua.c
@@ -35,6 +35,7 @@
#include <epan/packet.h>
#include <epan/prefs.h>
#include <epan/sctpppids.h>
+#include <wsutil/str_util.h>
#include "packet-mtp3.h"
#include "packet-sccp.h"
#include "packet-frame.h"
diff --git a/epan/dissectors/packet-media.c b/epan/dissectors/packet-media.c
index a75a3b4473..a62d70d39a 100644
--- a/epan/dissectors/packet-media.c
+++ b/epan/dissectors/packet-media.c
@@ -30,6 +30,8 @@
#include <epan/packet.h>
+#include <wsutil/str_util.h>
+
void proto_register_media(void);
/* proto_media cannot be static because it's referenced in the
diff --git a/epan/dissectors/packet-mip6.c b/epan/dissectors/packet-mip6.c
index 14465f4584..f209483019 100644
--- a/epan/dissectors/packet-mip6.c
+++ b/epan/dissectors/packet-mip6.c
@@ -58,6 +58,8 @@
#include <epan/ip_opts.h>
#include <epan/sminmpec.h>
+#include <wsutil/str_util.h>
+
#include "packet-ntp.h"
#include "packet-gtpv2.h"
#include "packet-e164.h"
diff --git a/epan/dissectors/packet-mtp3mg.c b/epan/dissectors/packet-mtp3mg.c
index 2eedc93963..9eac6f46dd 100644
--- a/epan/dissectors/packet-mtp3mg.c
+++ b/epan/dissectors/packet-mtp3mg.c
@@ -40,6 +40,8 @@
#include <epan/packet.h>
#include <epan/expert.h>
+#include <wsutil/str_util.h>
+
#include "packet-mtp3.h"
void proto_register_mtp3mg(void);
diff --git a/epan/dissectors/packet-ndmp.c b/epan/dissectors/packet-ndmp.c
index 7be486c7b5..a88febad79 100644
--- a/epan/dissectors/packet-ndmp.c
+++ b/epan/dissectors/packet-ndmp.c
@@ -32,6 +32,7 @@
#include <epan/packet.h>
#include <epan/expert.h>
+#include <wsutil/str_util.h>
#include "packet-rpc.h"
#include "packet-ndmp.h"
#include "packet-tcp.h"
diff --git a/epan/dissectors/packet-netflow.c b/epan/dissectors/packet-netflow.c
index 1dfe064991..a0250e77d3 100644
--- a/epan/dissectors/packet-netflow.c
+++ b/epan/dissectors/packet-netflow.c
@@ -133,6 +133,7 @@
#include <epan/to_str.h>
#include <epan/expert.h>
#include <epan/addr_resolv.h>
+#include <wsutil/str_util.h>
#include "packet-tcp.h"
#include "packet-udp.h"
#include "packet-ntp.h"
diff --git a/epan/dissectors/packet-nfs.c b/epan/dissectors/packet-nfs.c
index 8ec773e977..75ed9c623a 100644
--- a/epan/dissectors/packet-nfs.c
+++ b/epan/dissectors/packet-nfs.c
@@ -36,6 +36,7 @@
#include <epan/decode_as.h>
#include <wsutil/crc16.h>
#include <wsutil/crc32.h>
+#include <wsutil/str_util.h>
#include "packet-nfs.h"
void proto_register_nfs(void);
diff --git a/epan/dissectors/packet-ntlmssp.c b/epan/dissectors/packet-ntlmssp.c
index 27643de081..29d4c74027 100644
--- a/epan/dissectors/packet-ntlmssp.c
+++ b/epan/dissectors/packet-ntlmssp.c
@@ -42,6 +42,7 @@
#include <wsutil/md5.h>
#include <wsutil/des.h>
#include <wsutil/crc32.h>
+#include <wsutil/str_util.h>
#include "packet-windows-common.h"
#include "packet-smb-common.h"
diff --git a/epan/dissectors/packet-ositp.c b/epan/dissectors/packet-ositp.c
index 1266cb87af..816f8b3889 100644
--- a/epan/dissectors/packet-ositp.c
+++ b/epan/dissectors/packet-ositp.c
@@ -32,6 +32,7 @@
#include <epan/conversation.h>
#include <epan/ipproto.h>
#include <epan/expert.h>
+#include <wsutil/str_util.h>
#include "packet-frame.h"
#include "packet-osi.h"
diff --git a/epan/dissectors/packet-ossp.c b/epan/dissectors/packet-ossp.c
index 33987d0660..b87846cd22 100644
--- a/epan/dissectors/packet-ossp.c
+++ b/epan/dissectors/packet-ossp.c
@@ -33,6 +33,8 @@
#include <epan/addr_resolv.h>
#include <epan/expert.h>
+#include <wsutil/str_util.h>
+
/* General declarations */
void proto_register_ossp(void);
void proto_reg_handoff_ossp(void);
diff --git a/epan/dissectors/packet-p_mul.c b/epan/dissectors/packet-p_mul.c
index d97c74146d..e91229697f 100644
--- a/epan/dissectors/packet-p_mul.c
+++ b/epan/dissectors/packet-p_mul.c
@@ -43,6 +43,8 @@
#include <epan/asn1.h>
#include <epan/in_cksum.h>
+#include <wsutil/str_util.h>
+
#include "packet-cdt.h"
#include "packet-ber.h"
#include "packet-s5066sis.h"
diff --git a/epan/dissectors/packet-per.c b/epan/dissectors/packet-per.c
index 34d078f569..c6a3cfa687 100644
--- a/epan/dissectors/packet-per.c
+++ b/epan/dissectors/packet-per.c
@@ -36,6 +36,7 @@ proper helper routines
#include <epan/to_str.h>
#include <epan/asn1.h>
#include <epan/expert.h>
+#include <wsutil/str_util.h>
#include "packet-per.h"
void proto_register_per(void);
diff --git a/epan/dissectors/packet-pop.c b/epan/dissectors/packet-pop.c
index c5ec313e53..a90c44eb28 100644
--- a/epan/dissectors/packet-pop.c
+++ b/epan/dissectors/packet-pop.c
@@ -33,6 +33,7 @@
#include <epan/conversation.h>
#include <epan/prefs.h>
#include <epan/reassemble.h>
+#include <wsutil/str_util.h>
#include "packet-ssl.h"
#include "packet-ssl-utils.h"
diff --git a/epan/dissectors/packet-ppi.c b/epan/dissectors/packet-ppi.c
index 0fd7ebd03d..53a929c3fe 100644
--- a/epan/dissectors/packet-ppi.c
+++ b/epan/dissectors/packet-ppi.c
@@ -53,6 +53,7 @@
#include <epan/reassemble.h>
#include <wsutil/frequency-utils.h>
#include <wsutil/pint.h>
+#include <wsutil/str_util.h>
/* Needed for wtap_pcap_encap_to_wtap_encap(). */
#include <wiretap/pcap-encap.h>
diff --git a/epan/dissectors/packet-ppp.c b/epan/dissectors/packet-ppp.c
index 50219ac92a..e586b73fa8 100644
--- a/epan/dissectors/packet-ppp.c
+++ b/epan/dissectors/packet-ppp.c
@@ -27,6 +27,7 @@
#include <epan/packet.h>
#include <wsutil/pint.h>
+#include <wsutil/str_util.h>
#include <epan/prefs.h>
#include "packet-ppp.h"
#include <epan/ppptypes.h>
diff --git a/epan/dissectors/packet-pw-atm.c b/epan/dissectors/packet-pw-atm.c
index c6f98b69ac..0bfb7da652 100644
--- a/epan/dissectors/packet-pw-atm.c
+++ b/epan/dissectors/packet-pw-atm.c
@@ -40,6 +40,8 @@
#include <epan/expert.h>
#include <epan/prefs.h>
+#include <wsutil/str_util.h>
+
#include <wiretap/wtap.h> /*for atm pseudo header*/
#include "packet-mpls.h"
#include "packet-atm.h"
diff --git a/epan/dissectors/packet-pw-common.c b/epan/dissectors/packet-pw-common.c
index 02281659cb..4e87f105a0 100644
--- a/epan/dissectors/packet-pw-common.c
+++ b/epan/dissectors/packet-pw-common.c
@@ -24,6 +24,7 @@
#include "config.h"
#include <epan/packet.h>
+#include <wsutil/str_util.h>
#include "packet-pw-common.h"
void proto_register_pw_padding(void);
diff --git a/epan/dissectors/packet-q2931.c b/epan/dissectors/packet-q2931.c
index c2570b184f..d6e479a6a6 100644
--- a/epan/dissectors/packet-q2931.c
+++ b/epan/dissectors/packet-q2931.c
@@ -28,6 +28,7 @@
#include <epan/nlpid.h>
#include <epan/etypes.h>
#include <epan/expert.h>
+#include <wsutil/str_util.h>
#include "packet-q931.h"
#include "packet-arp.h"
diff --git a/epan/dissectors/packet-rpc.c b/epan/dissectors/packet-rpc.c
index b6cd75b176..5079419d8e 100644
--- a/epan/dissectors/packet-rpc.c
+++ b/epan/dissectors/packet-rpc.c
@@ -30,6 +30,7 @@
#include <epan/expert.h>
#include <epan/exceptions.h>
#include <wsutil/pint.h>
+#include <wsutil/str_util.h>
#include <epan/prefs.h>
#include <epan/reassemble.h>
#include <epan/tap.h>
diff --git a/epan/dissectors/packet-rpcap.c b/epan/dissectors/packet-rpcap.c
index 46a2e62c8b..da3823e05f 100644
--- a/epan/dissectors/packet-rpcap.c
+++ b/epan/dissectors/packet-rpcap.c
@@ -31,6 +31,7 @@
#include <epan/to_str.h>
#include <epan/expert.h>
#include <wiretap/wtap.h>
+#include <wsutil/str_util.h>
#include "packet-frame.h"
#include "packet-tcp.h"
diff --git a/epan/dissectors/packet-rtse.c b/epan/dissectors/packet-rtse.c
index f91406d4c6..5ba17e72d9 100644
--- a/epan/dissectors/packet-rtse.c
+++ b/epan/dissectors/packet-rtse.c
@@ -38,6 +38,8 @@
#include <epan/asn1.h>
#include <epan/expert.h>
+#include <wsutil/str_util.h>
+
#include "packet-ber.h"
#include "packet-pres.h"
#include "packet-acse.h"
@@ -91,7 +93,7 @@ static int hf_rtse_t61String = -1; /* T_t61String */
static int hf_rtse_octetString = -1; /* T_octetString */
/*--- End of included file: packet-rtse-hf.c ---*/
-#line 58 "../../asn1/rtse/packet-rtse-template.c"
+#line 60 "../../asn1/rtse/packet-rtse-template.c"
/* Initialize the subtree pointers */
static gint ett_rtse = -1;
@@ -108,7 +110,7 @@ static gint ett_rtse_SessionConnectionIdentifier = -1;
static gint ett_rtse_CallingSSuserReference = -1;
/*--- End of included file: packet-rtse-ett.c ---*/
-#line 62 "../../asn1/rtse/packet-rtse-template.c"
+#line 64 "../../asn1/rtse/packet-rtse-template.c"
static expert_field ei_rtse_dissector_oid_not_implemented = EI_INIT;
static expert_field ei_rtse_unknown_rtse_pdu = EI_INIT;
@@ -735,7 +737,7 @@ dissect_rtse_RTSE_apdus(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset
/*--- End of included file: packet-rtse-fn.c ---*/
-#line 192 "../../asn1/rtse/packet-rtse-template.c"
+#line 194 "../../asn1/rtse/packet-rtse-template.c"
/*
* Dissect RTSE PDUs inside a PPDU.
@@ -1007,7 +1009,7 @@ void proto_register_rtse(void) {
NULL, HFILL }},
/*--- End of included file: packet-rtse-hfarr.c ---*/
-#line 363 "../../asn1/rtse/packet-rtse-template.c"
+#line 365 "../../asn1/rtse/packet-rtse-template.c"
};
/* List of subtrees */
@@ -1029,7 +1031,7 @@ void proto_register_rtse(void) {
&ett_rtse_CallingSSuserReference,
/*--- End of included file: packet-rtse-ettarr.c ---*/
-#line 372 "../../asn1/rtse/packet-rtse-template.c"
+#line 374 "../../asn1/rtse/packet-rtse-template.c"
};
static ei_register_info ei[] = {
diff --git a/epan/dissectors/packet-sccp.c b/epan/dissectors/packet-sccp.c
index 7c6f710f47..7f2a1025cf 100644
--- a/epan/dissectors/packet-sccp.c
+++ b/epan/dissectors/packet-sccp.c
@@ -46,6 +46,7 @@
#include <epan/tap.h>
#include <epan/to_str.h>
#include <wiretap/wtap.h>
+#include <wsutil/str_util.h>
#include "packet-mtp3.h"
#include "packet-tcap.h"
#include "packet-sccp.h"
diff --git a/epan/dissectors/packet-scsi-ssc.c b/epan/dissectors/packet-scsi-ssc.c
index 079c3eb827..c31dcbdf12 100644
--- a/epan/dissectors/packet-scsi-ssc.c
+++ b/epan/dissectors/packet-scsi-ssc.c
@@ -33,6 +33,7 @@
#include <epan/packet.h>
#include <epan/conversation.h>
+#include <wsutil/str_util.h>
#include "packet-scsi.h"
#include "packet-scsi-ssc.h"
#include "packet-scsi-smc.h"
diff --git a/epan/dissectors/packet-sctp.c b/epan/dissectors/packet-sctp.c
index 76ab3273d2..0fc30fafc2 100644
--- a/epan/dissectors/packet-sctp.c
+++ b/epan/dissectors/packet-sctp.c
@@ -67,6 +67,7 @@
#include <wsutil/crc32.h>
#include <wsutil/adler32.h>
#include <wsutil/utf8_entities.h>
+#include <wsutil/str_util.h>
#include "packet-sctp.h"
diff --git a/epan/dissectors/packet-ses.c b/epan/dissectors/packet-ses.c
index e82e8e75ef..2dead5a20f 100644
--- a/epan/dissectors/packet-ses.c
+++ b/epan/dissectors/packet-ses.c
@@ -31,6 +31,8 @@
#include <epan/conversation.h>
#include <epan/reassemble.h>
+#include <wsutil/str_util.h>
+
#include "packet-ber.h"
#include "packet-ses.h"
diff --git a/epan/dissectors/packet-sml.c b/epan/dissectors/packet-sml.c
index d5379c7f11..5d072e05a5 100644
--- a/epan/dissectors/packet-sml.c
+++ b/epan/dissectors/packet-sml.c
@@ -35,6 +35,8 @@ Short description of the SML protocol on the SML Wireshark Wiki page: https://w
#include <epan/crc16-tvb.h>
#include <epan/expert.h>
+#include <wsutil/str_util.h>
+
#define TCP_PORT_SML 0
#define UDP_PORT_SML 0
diff --git a/epan/dissectors/packet-smtp.c b/epan/dissectors/packet-smtp.c
index b9f8643540..d428c40e41 100644
--- a/epan/dissectors/packet-smtp.c
+++ b/epan/dissectors/packet-smtp.c
@@ -35,6 +35,7 @@
#include <epan/strutil.h>
#include <epan/reassemble.h>
#include <wsutil/base64.h>
+#include <wsutil/str_util.h>
#include "packet-ssl.h"
#include "packet-ssl-utils.h"
diff --git a/epan/dissectors/packet-ssl.c b/epan/dissectors/packet-ssl.c
index 0e485c8754..1e5b95c23c 100644
--- a/epan/dissectors/packet-ssl.c
+++ b/epan/dissectors/packet-ssl.c
@@ -89,6 +89,7 @@
#include <epan/tap.h>
#include <epan/uat.h>
#include <epan/exported_pdu.h>
+#include <wsutil/str_util.h>
#include "packet-tcp.h"
#include "packet-x509af.h"
#include "packet-ocsp.h"
diff --git a/epan/dissectors/packet-sua.c b/epan/dissectors/packet-sua.c
index 44f891c114..7b3dc0177f 100644
--- a/epan/dissectors/packet-sua.c
+++ b/epan/dissectors/packet-sua.c
@@ -35,6 +35,8 @@
#include <epan/tap.h>
#include <epan/to_str.h>
+#include <wsutil/str_util.h>
+
#include "packet-mtp3.h"
#include "packet-sccp.h"
void proto_register_sua(void);
diff --git a/epan/dissectors/packet-tcp.c b/epan/dissectors/packet-tcp.c
index 4db6c1ec84..56bbdf34e6 100644
--- a/epan/dissectors/packet-tcp.c
+++ b/epan/dissectors/packet-tcp.c
@@ -37,8 +37,9 @@
#include <epan/reassemble.h>
#include <epan/decode_as.h>
#include <epan/in_cksum.h>
-#include <wsutil/utf8_entities.h>
+#include <wsutil/utf8_entities.h>
+#include <wsutil/str_util.h>
#include <wsutil/sha1.h>
#include "packet-tcp.h"
diff --git a/epan/dissectors/packet-uts.c b/epan/dissectors/packet-uts.c
index 468ca975eb..e46caae62b 100644
--- a/epan/dissectors/packet-uts.c
+++ b/epan/dissectors/packet-uts.c
@@ -29,6 +29,7 @@
#include <epan/packet.h>
#include <wiretap/wtap.h>
+#include <wsutil/str_util.h>
#define SOH (0x01)
#define STX (0x02)
diff --git a/epan/dissectors/packet-v5ua.c b/epan/dissectors/packet-v5ua.c
index 77bb972456..053cb16cf1 100644
--- a/epan/dissectors/packet-v5ua.c
+++ b/epan/dissectors/packet-v5ua.c
@@ -44,6 +44,8 @@
#include <epan/packet.h>
#include <epan/sctpppids.h> /* include V5UA payload protocol ID */
+#include <wsutil/str_util.h>
+
void proto_register_v5ua(void);
void proto_reg_handoff_v5ua(void);
diff --git a/epan/dissectors/packet-wsp.c b/epan/dissectors/packet-wsp.c
index d1475c5c02..da2cb8528e 100644
--- a/epan/dissectors/packet-wsp.c
+++ b/epan/dissectors/packet-wsp.c
@@ -47,6 +47,8 @@
#include <epan/expert.h>
#include <epan/conversation.h>
+#include <wsutil/str_util.h>
+
#include "packet-wap.h"
#include "packet-wsp.h"
diff --git a/epan/packet.c b/epan/packet.c
index 0ed943876a..465229016c 100644
--- a/epan/packet.c
+++ b/epan/packet.c
@@ -50,6 +50,8 @@
#include <epan/range.h>
#include <epan/asm_utils.h>
+#include <wsutil/str_util.h>
+
static gint proto_malformed = -1;
static dissector_handle_t frame_handle = NULL;
static dissector_handle_t file_handle = NULL;
diff --git a/epan/packet.h b/epan/packet.h
index c953b07c05..5333d99348 100644
--- a/epan/packet.h
+++ b/epan/packet.h
@@ -56,9 +56,6 @@ struct epan_range;
((guint)(offset) + (guint)(len) > (guint)(offset) && \
(guint)(offset) + (guint)(len) <= (guint)(captured_len))
-/* To pass one of two strings, singular or plural */
-#define plurality(d,s,p) ((d) == 1 ? (s) : (p))
-
typedef struct _packet_counts {
gint sctp;
gint tcp;
diff --git a/epan/reassemble.c b/epan/reassemble.c
index 76a6500ff3..e14bbe8d30 100644
--- a/epan/reassemble.c
+++ b/epan/reassemble.c
@@ -29,6 +29,8 @@
#include <epan/reassemble.h>
#include <epan/tvbuff-int.h>
+#include <wsutil/str_util.h>
+
/*
* Functions for reassembly tables where the endpoint addresses, and a
* fragment ID, are used as the key.
diff --git a/ringbuffer.h b/ringbuffer.h
index ca322ae8a1..b5f4776c3e 100644
--- a/ringbuffer.h
+++ b/ringbuffer.h
@@ -24,7 +24,6 @@
#define __RINGBUFFER_H__
#include <stdio.h>
-#include "file.h"
#include "wiretap/wtap.h"
#define RINGBUFFER_UNLIMITED_FILES 0
diff --git a/tshark.c b/tshark.c
index d770bac18c..002c811b97 100644
--- a/tshark.c
+++ b/tshark.c
@@ -86,7 +86,6 @@
#ifdef HAVE_LUA
#include <epan/wslua/init_wslua.h>
#endif
-#include "file.h"
#include "frame_tvbuff.h"
#include <epan/disabled_protos.h>
#include <epan/prefs.h>
@@ -130,6 +129,8 @@
#include "log.h"
#include <epan/funnel.h>
+#include <wsutil/str_util.h>
+
#ifdef HAVE_PLUGINS
#include <wsutil/plugins.h>
#endif
diff --git a/ui/capture.c b/ui/capture.c
index f553fa8975..b0721995e4 100644
--- a/ui/capture.c
+++ b/ui/capture.c
@@ -54,6 +54,7 @@
#include "ui/ui_util.h"
#include "wsutil/file_util.h"
+#include "wsutil/str_util.h"
#include "log.h"
typedef struct if_stat_cache_item_s {
diff --git a/ui/gtk/expert_comp_dlg.c b/ui/gtk/expert_comp_dlg.c
index bedf52ceae..83197dbe50 100644
--- a/ui/gtk/expert_comp_dlg.c
+++ b/ui/gtk/expert_comp_dlg.c
@@ -31,6 +31,7 @@
#include <epan/tap.h>
#include <epan/stat_tap_ui.h>
+#include <wsutil/str_util.h>
#include "ui/simple_dialog.h"
diff --git a/ui/gtk/export_sslkeys.c b/ui/gtk/export_sslkeys.c
index 34873fd6d3..a03fa71455 100644
--- a/ui/gtk/export_sslkeys.c
+++ b/ui/gtk/export_sslkeys.c
@@ -35,6 +35,7 @@
#endif
#include <wsutil/file_util.h>
+#include <wsutil/str_util.h>
#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
diff --git a/ui/gtk/fileset_dlg.c b/ui/gtk/fileset_dlg.c
index 96893fa82e..3b612c9401 100644
--- a/ui/gtk/fileset_dlg.c
+++ b/ui/gtk/fileset_dlg.c
@@ -30,8 +30,8 @@
#include <gtk/gtk.h>
-#include "file.h"
#include <wsutil/filesystem.h>
+#include <wsutil/str_util.h>
#include "../fileset.h"
diff --git a/ui/gtk/packet_panes.c b/ui/gtk/packet_panes.c
index 71de45a3b6..3c74b25dcb 100644
--- a/ui/gtk/packet_panes.c
+++ b/ui/gtk/packet_panes.c
@@ -56,6 +56,7 @@
#include "ui/ui_util.h"
#include <wsutil/file_util.h>
+#include <wsutil/str_util.h>
#include "ui/gtk/keys.h"
#include "ui/gtk/color_utils.h"
diff --git a/ui/gtk/voip_calls_dlg.c b/ui/gtk/voip_calls_dlg.c
index dd5abba795..0eeb4e2373 100644
--- a/ui/gtk/voip_calls_dlg.c
+++ b/ui/gtk/voip_calls_dlg.c
@@ -35,13 +35,14 @@
#include <string.h>
-
#include <epan/packet.h>
#include <epan/stat_tap_ui.h>
#include <epan/addr_resolv.h>
#include <epan/dissectors/packet-h225.h>
#include <epan/dissectors/packet-h248.h>
+#include <wsutil/str_util.h>
+
#include "../globals.h"
#include "ui/voip_calls.h"
diff --git a/wsutil/str_util.h b/wsutil/str_util.h
index 43a60dca9d..997c8c6139 100644
--- a/wsutil/str_util.h
+++ b/wsutil/str_util.h
@@ -113,6 +113,9 @@ gchar *format_size(gint64 size, format_size_flags_e flags);
WS_DLL_PUBLIC
gchar printable_char_or_period(gchar c);
+/* To pass one of two strings, singular or plural */
+#define plurality(d,s,p) ((d) == 1 ? (s) : (p))
+
#ifdef __cplusplus
}