summaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-rmt-fec.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:14:33 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:14:33 +0000
commit9f153fbfec0fb9c9ce38e749a7c6f4a5e115d4e9 (patch)
tree2784370cda9bbf2da9114d70f05399c0b229d28c /epan/dissectors/packet-rmt-fec.c
parentAdding debian version 4.2.6-1. (diff)
downloadwireshark-9f153fbfec0fb9c9ce38e749a7c6f4a5e115d4e9.tar.xz
wireshark-9f153fbfec0fb9c9ce38e749a7c6f4a5e115d4e9.zip
Merging upstream version 4.4.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'epan/dissectors/packet-rmt-fec.c')
-rw-r--r--epan/dissectors/packet-rmt-fec.c60
1 files changed, 30 insertions, 30 deletions
diff --git a/epan/dissectors/packet-rmt-fec.c b/epan/dissectors/packet-rmt-fec.c
index 044fe49a..053c4313 100644
--- a/epan/dissectors/packet-rmt-fec.c
+++ b/epan/dissectors/packet-rmt-fec.c
@@ -33,30 +33,30 @@
void proto_register_rmt_fec(void);
-static int proto_rmt_fec = -1;
-
-static int hf_encoding_id = -1;
-static int hf_instance_id = -1;
-static int hf_sbn = -1;
-static int hf_sbn_with_mask = -1;
-static int hf_sbl = -1;
-static int hf_esi = -1;
-static int hf_esi_with_mask = -1;
-static int hf_fti_transfer_length = -1;
-static int hf_fti_encoding_symbol_length = -1;
-static int hf_fti_max_source_block_length = -1;
-static int hf_fti_max_number_encoding_symbols = -1;
-static int hf_fti_num_blocks = -1;
-static int hf_fti_num_subblocks = -1;
-static int hf_fti_alignment = -1;
-
-static int ett_main = -1;
-
-static expert_field ei_fec_encoding_id = EI_INIT;
+static int proto_rmt_fec;
+
+static int hf_encoding_id;
+static int hf_instance_id;
+static int hf_sbn;
+static int hf_sbn_with_mask;
+static int hf_sbl;
+static int hf_esi;
+static int hf_esi_with_mask;
+static int hf_fti_transfer_length;
+static int hf_fti_encoding_symbol_length;
+static int hf_fti_max_source_block_length;
+static int hf_fti_max_number_encoding_symbols;
+static int hf_fti_num_blocks;
+static int hf_fti_num_subblocks;
+static int hf_fti_alignment;
+
+static int ett_main;
+
+static expert_field ei_fec_encoding_id;
typedef struct fec_packet_data
{
- guint8 instance_id;
+ uint8_t instance_id;
} fec_packet_data_t;
@@ -83,11 +83,11 @@ const value_string string_fec_encoding_id[] =
/* ---------- */
/* Decode an EXT_FTI extension and fill FEC array */
-void fec_decode_ext_fti(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, guint8 encoding_id)
+void fec_decode_ext_fti(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, uint8_t encoding_id)
{
- guint64 transfer_length;
+ uint64_t transfer_length;
fec_packet_data_t *fec_data;
- guint8 instance_id = 0;
+ uint8_t instance_id = 0;
proto_item *ti;
if (encoding_id == 6){
@@ -101,7 +101,7 @@ void fec_decode_ext_fti(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int
if (encoding_id >= 128)
{
- instance_id = (guint8) tvb_get_ntohs(tvb, offset+8);
+ instance_id = (uint8_t) tvb_get_ntohs(tvb, offset+8);
/* Decode FEC Instance ID */
fec_data = wmem_new0(wmem_file_scope(), fec_packet_data_t);
@@ -175,9 +175,9 @@ dissect_fec(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
{
proto_item *ti;
proto_tree *fec_tree;
- guint offset = 0;
+ unsigned offset = 0;
fec_data_exchange_t *fec = (fec_data_exchange_t*)data;
- guint8 encoding_id = 0;
+ uint8_t encoding_id = 0;
fec_packet_data_t *packet_data = (fec_packet_data_t*)p_get_proto_data(wmem_file_scope(), pinfo, proto_rmt_fec, 0);
if (fec != NULL)
@@ -235,7 +235,7 @@ dissect_fec(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
proto_tree_add_item(fec_tree, hf_sbn, tvb, offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(fec_tree, hf_esi, tvb, offset+1, 3, ENC_BIG_ENDIAN);
- col_append_sep_fstr(pinfo->cinfo, COL_INFO, " ", "SBN: %u", tvb_get_guint8(tvb, offset));
+ col_append_sep_fstr(pinfo->cinfo, COL_INFO, " ", "SBN: %u", tvb_get_uint8(tvb, offset));
col_append_sep_fstr(pinfo->cinfo, COL_INFO, " ", "ESI: 0x%X", tvb_get_ntoh24(tvb, offset+1));
offset += 4;
@@ -266,7 +266,7 @@ void proto_register_rmt_fec(void)
},
{ &hf_instance_id,
{ "FEC Instance ID", "rmt-fec.instance_id",
- FT_UINT8, BASE_DEC, NULL, 0x0,
+ FT_UINT16, BASE_DEC, NULL, 0x0,
NULL, HFILL }
},
{ &hf_sbn,
@@ -332,7 +332,7 @@ void proto_register_rmt_fec(void)
};
/* Setup protocol subtree array */
- static gint *ett[] = {
+ static int *ett[] = {
&ett_main,
};