summaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-fw1.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:14:26 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:14:26 +0000
commitc4e8a3222648fcf22ca207f1815ebbf7cd144eeb (patch)
tree93d5c6aa93d9987680dd1adad5685e2ad698f223 /epan/dissectors/packet-fw1.c
parentAdding upstream version 4.2.6. (diff)
downloadwireshark-upstream.tar.xz
wireshark-upstream.zip
Adding upstream version 4.4.0.upstream/4.4.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'epan/dissectors/packet-fw1.c')
-rw-r--r--epan/dissectors/packet-fw1.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/epan/dissectors/packet-fw1.c b/epan/dissectors/packet-fw1.c
index a9e42eba..27fef274 100644
--- a/epan/dissectors/packet-fw1.c
+++ b/epan/dissectors/packet-fw1.c
@@ -9,7 +9,7 @@
* Copyright 2002,2003,2018 Alfred Koebler
*
* To use this dissector use the command line option
- * -o eth.interpret_as_fw1_monitor:TRUE
+ * -o eth.interpret_as_fw1_monitor:true
*
* At the moment the way with the option is the best one.
* A automatic way is not possible, because the file format isn't different
@@ -66,7 +66,7 @@
* Additional interpretation of field Chain Position.
* Show the chain position in the interface list.
* Support for new format of fw monitor file
- * writen by option -u | -s for UUID/SUUID.
+ * written by option -u | -s for UUID/SUUID.
* NOTICE: First paket will have UUID == 0 !
*
* SPDX-License-Identifier: GPL-2.0-or-later
@@ -86,28 +86,28 @@ void proto_register_fw1(void);
void proto_reg_handoff_fw1(void);
/* Place FW1 summary in proto tree */
-static gboolean fw1_summary_in_tree = TRUE;
-static gboolean fw1_with_uuid = FALSE;
-static gboolean fw1_iflist_with_chain = FALSE;
+static bool fw1_summary_in_tree = true;
+static bool fw1_with_uuid;
+static bool fw1_iflist_with_chain;
static dissector_handle_t ethertype_handle;
/* Initialize the protocol and registered fields */
-static int proto_fw1 = -1;
-static int hf_fw1_direction = -1;
-static int hf_fw1_chain = -1;
-static int hf_fw1_interface = -1;
-static int hf_fw1_uuid = -1;
-static int hf_fw1_type = -1;
-static int hf_fw1_trailer = -1;
+static int proto_fw1;
+static int hf_fw1_direction;
+static int hf_fw1_chain;
+static int hf_fw1_interface;
+static int hf_fw1_uuid;
+static int hf_fw1_type;
+static int hf_fw1_trailer;
/* Initialize the subtree pointers */
-static gint ett_fw1 = -1;
+static int ett_fw1;
#define ETH_HEADER_SIZE 14
#define MAX_INTERFACES 20
-static gchar *p_interfaces[MAX_INTERFACES];
+static char *p_interfaces[MAX_INTERFACES];
static int interface_anzahl=0;
static void
@@ -125,10 +125,10 @@ dissect_fw1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
char direction;
char chain;
char *interface_name;
- guint32 iface_len = 10;
+ uint32_t iface_len = 10;
wmem_strbuf_t *header;
int i;
- gboolean found;
+ bool found;
static const char fw1_header[] = "FW1 Monitor";
ethertype_data_t ethertype_data;
@@ -140,12 +140,12 @@ dissect_fw1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
col_clear(pinfo->cinfo, COL_INFO);
/* fetch info to local variable */
- direction = tvb_get_guint8(tvb, 0);
+ direction = tvb_get_uint8(tvb, 0);
if (!fw1_iflist_with_chain)
chain = ' ';
else
- chain = tvb_get_guint8(tvb, 1);
+ chain = tvb_get_uint8(tvb, 1);
if (fw1_with_uuid)
iface_len = 6;
@@ -153,10 +153,10 @@ dissect_fw1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
interface_name=tvb_get_stringzpad(pinfo->pool, tvb, 2, iface_len, ENC_ASCII|ENC_NA);
/* Known interface name - if not, remember it */
- found=FALSE;
+ found=false;
for (i=0; i<interface_anzahl; i++) {
if ( strcmp(p_interfaces[i], interface_name) == 0 ) {
- found=TRUE;
+ found=true;
break;
}
}
@@ -246,7 +246,7 @@ proto_register_fw1(void)
}
};
/* Setup protocol subtree array */
- static gint *ett[] = {
+ static int *ett[] = {
&ett_fw1,
};
module_t *fw1_module;