summaryrefslogtreecommitdiffstats
path: root/epan/dissectors/file-file.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:14:53 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:14:53 +0000
commita86c5f7cae7ec9a3398300555a0b644689d946a1 (patch)
tree39fe4b107c71174fd1e8a8ceb9a4d2aa14116248 /epan/dissectors/file-file.c
parentReleasing progress-linux version 4.2.6-1~progress7.99u1. (diff)
downloadwireshark-a86c5f7cae7ec9a3398300555a0b644689d946a1.tar.xz
wireshark-a86c5f7cae7ec9a3398300555a0b644689d946a1.zip
Merging upstream version 4.4.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--epan/dissectors/file-file.c53
1 files changed, 24 insertions, 29 deletions
diff --git a/epan/dissectors/file-file.c b/epan/dissectors/file-file.c
index 2c5ee342..81b99c1a 100644
--- a/epan/dissectors/file-file.c
+++ b/epan/dissectors/file-file.c
@@ -16,14 +16,9 @@
#endif
#include <epan/packet.h>
-#include <epan/epan.h>
#include <epan/exceptions.h>
#include <epan/show_exception.h>
-#include <epan/timestamp.h>
-#include <epan/prefs.h>
-#include <epan/to_str.h>
#include <epan/tap.h>
-#include <epan/expert.h>
#include <epan/proto_data.h>
#include <epan/color_filters.h>
#include <wiretap/wtap.h>
@@ -33,21 +28,21 @@
void proto_register_file(void);
-static int proto_file = -1;
-static int hf_file_record_number = -1;
-static int hf_file_record_len = -1;
-static int hf_file_ftap_encap = -1;
-static int hf_file_marked = -1;
-static int hf_file_ignored = -1;
-static int hf_file_protocols = -1;
-static int hf_file_num_p_prot_data = -1;
-static int hf_file_proto_name_and_key = -1;
-static int hf_file_color_filter_name = -1;
-static int hf_file_color_filter_text = -1;
+static int proto_file;
+static int hf_file_record_number;
+static int hf_file_record_len;
+static int hf_file_ftap_encap;
+static int hf_file_marked;
+static int hf_file_ignored;
+static int hf_file_protocols;
+static int hf_file_num_p_prot_data;
+static int hf_file_proto_name_and_key;
+static int hf_file_color_filter_name;
+static int hf_file_color_filter_text;
-static gint ett_file = -1;
+static int ett_file;
-static int file_tap = -1;
+static int file_tap;
dissector_table_t file_encap_dissector_table;
@@ -59,13 +54,13 @@ dissector_table_t file_encap_dissector_table;
void
register_file_record_end_routine(packet_info *pinfo, void (*func)(void))
{
- pinfo->frame_end_routines = g_slist_append(pinfo->frame_end_routines, (gpointer)func);
+ pinfo->frame_end_routines = g_slist_append(pinfo->frame_end_routines, (void *)func);
}
typedef void (*void_func_t)(void);
static void
-call_file_record_end_routine(gpointer routine, gpointer dummy _U_)
+call_file_record_end_routine(void *routine, void *dummy _U_)
{
void_func_t func = (void_func_t)routine;
(*func)();
@@ -79,7 +74,7 @@ dissect_file_record(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree,
proto_tree *volatile fh_tree = NULL;
proto_tree *volatile tree;
proto_item *item;
- const gchar *cap_plurality, *frame_plurality;
+ const char *cap_plurality, *frame_plurality;
const color_filter_t *color_filter;
file_data_t *file_data = (file_data_t*)data;
@@ -92,7 +87,7 @@ dissect_file_record(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree,
if(!proto_field_is_referenced(tree, proto_file)) {
tree=NULL;
} else {
- guint cap_len, frame_len;
+ unsigned cap_len, frame_len;
/* Put in frame header information. */
cap_len = tvb_captured_length(tvb);
@@ -126,12 +121,12 @@ dissect_file_record(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree,
if(pinfo->fd->pfd != 0){
proto_item *ppd_item;
- guint num_entries = g_slist_length(pinfo->fd->pfd);
- guint i;
+ unsigned num_entries = g_slist_length(pinfo->fd->pfd);
+ unsigned i;
ppd_item = proto_tree_add_uint(fh_tree, hf_file_num_p_prot_data, tvb, 0, 0, num_entries);
proto_item_set_generated(ppd_item);
for(i=0; i<num_entries; i++){
- gchar* str = p_get_proto_name_and_key(wmem_file_scope(), pinfo, i);
+ char* str = p_get_proto_name_and_key(wmem_file_scope(), pinfo, i);
proto_tree_add_string_format(fh_tree, hf_file_proto_name_and_key, tvb, 0, 0, str, "%s", str);
}
}
@@ -149,7 +144,7 @@ dissect_file_record(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree,
if (pinfo->fd->ignored) {
/* Ignored package, stop handling here */
col_set_str(pinfo->cinfo, COL_INFO, "<Ignored>");
- proto_tree_add_boolean_format(tree, hf_file_ignored, tvb, 0, -1, TRUE, "This record is marked as ignored");
+ proto_tree_add_boolean_format(tree, hf_file_ignored, tvb, 0, -1, true, "This record is marked as ignored");
return tvb_captured_length(tvb);
}
@@ -162,7 +157,7 @@ dissect_file_record(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree,
/* Note: A Windows "exceptional exception" may leave the kazlib's (Portable Exception Handling)
stack in an inconsistent state thus causing a crash at some point in the
handling of the exception.
- See: https://www.wireshark.org/lists/wireshark-dev/200704/msg00243.html
+ See: https://lists.wireshark.org/archives/wireshark-dev/200704/msg00243.html
*/
__try {
#endif
@@ -235,7 +230,7 @@ dissect_file_record(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree,
/* Note: A Windows "exceptional exception" may leave the kazlib's (Portable Exception Handling)
stack in an inconsistent state thus causing a crash at some point in the
handling of the exception.
- See: https://www.wireshark.org/lists/wireshark-dev/200704/msg00243.html
+ See: https://lists.wireshark.org/archives/wireshark-dev/200704/msg00243.html
*/
__try {
#endif
@@ -361,7 +356,7 @@ proto_register_file(void)
NULL, HFILL }},
};
- static gint *ett[] = {
+ static int *ett[] = {
&ett_file
};