aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-iso14443.c
diff options
context:
space:
mode:
authorMartin Kaiser <wireshark@kaiser.cx>2016-02-15 21:35:46 +0100
committerMartin Kaiser <wireshark@kaiser.cx>2016-02-15 20:56:51 +0000
commit338a0c74e3939b99cfc6c0655b35c22e37b02338 (patch)
treec45bae6ec4add79cd157132014a3534525e7a7b9 /epan/dissectors/packet-iso14443.c
parent458d5982796d9a00b29c850fe5c04b974613a21f (diff)
iso14443: dissect FWI in the ATS
use the same hf as for ATQB's FWI Change-Id: I2c1db117688e16e91fc4072d9b6f4bba46f64fd6 Reviewed-on: https://code.wireshark.org/review/13960 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Diffstat (limited to 'epan/dissectors/packet-iso14443.c')
-rw-r--r--epan/dissectors/packet-iso14443.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/epan/dissectors/packet-iso14443.c b/epan/dissectors/packet-iso14443.c
index 3373a64981..f44b89f550 100644
--- a/epan/dissectors/packet-iso14443.c
+++ b/epan/dissectors/packet-iso14443.c
@@ -174,6 +174,7 @@ static int ett_iso14443_app_data = -1;
static int ett_iso14443_prot_inf = -1;
static int ett_iso14443_prot_type = -1;
static int ett_iso14443_ats_t0 = -1;
+static int ett_iso14443_ats_tb1 = -1;
static int ett_iso14443_attr_p1 = -1;
static int ett_iso14443_attr_p2 = -1;
static int ett_iso14443_pcb = -1;
@@ -338,7 +339,7 @@ static int dissect_iso14443_atqb(tvbuff_t *tvb, gint offset,
proto_item *app_data_it, *prot_inf_it, *prot_type_it;
proto_tree *app_data_tree, *prot_inf_tree, *prot_type_tree;
gint app_data_offset, rem_len;
- guint8 max_frame_size_code;
+ guint8 max_frame_size_code, fwi;
proto_item *pi;
gboolean iso14443_adc;
guint8 prot_inf_len = 0;
@@ -396,8 +397,9 @@ static int dissect_iso14443_atqb(tvbuff_t *tvb, gint offset,
proto_tree_add_item(prot_type_tree, hf_iso14443_4_compl_atqb,
tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
- proto_tree_add_item(prot_inf_tree, hf_iso14443_fwi,
- tvb, offset, 1, ENC_BIG_ENDIAN);
+ fwi = (tvb_get_guint8(tvb, offset) & 0xF0) >> 4;
+ proto_tree_add_uint_bits_format_value(prot_inf_tree, hf_iso14443_fwi,
+ tvb, offset*8, 4, fwi, "%d", fwi);
iso14443_adc = tvb_get_guint8(tvb, offset) & 0x04;
proto_tree_add_item(prot_inf_tree, hf_iso14443_adc,
tvb, offset, 1, ENC_BIG_ENDIAN);
@@ -569,9 +571,9 @@ static int dissect_iso14443_ats(tvbuff_t *tvb, gint offset,
{
proto_item *ti = proto_tree_get_parent(tree);
circuit_t *circuit;
- guint8 tl, t0 = 0, fsci;
- proto_item *t0_it, *pi;
- proto_tree *t0_tree;
+ guint8 tl, t0 = 0, fsci, fwi;
+ proto_item *t0_it, *tb1_it, *pi;
+ proto_tree *t0_tree, *tb1_tree;
gint offset_tl, hist_len;
col_set_str(pinfo->cinfo, COL_INFO, "ATS");
@@ -608,8 +610,12 @@ static int dissect_iso14443_ats(tvbuff_t *tvb, gint offset,
offset++;
}
if (t0 & HAVE_TB1) {
- proto_tree_add_item(tree, hf_iso14443_tb1,
+ tb1_it = proto_tree_add_item(tree, hf_iso14443_tb1,
tvb, offset, 1, ENC_BIG_ENDIAN);
+ tb1_tree = proto_item_add_subtree(tb1_it, ett_iso14443_ats_tb1);
+ fwi = (tvb_get_guint8(tvb, offset) & 0xF0) >> 4;
+ proto_tree_add_uint_bits_format_value(tb1_tree, hf_iso14443_fwi,
+ tvb, offset*8, 4, fwi, "%d", fwi);
offset++;
}
if (t0 & HAVE_TA1) {
@@ -1281,7 +1287,7 @@ proto_register_iso14443(void)
},
{ &hf_iso14443_fwi,
{ "FWI", "iso14443.fwi", FT_UINT8, BASE_DEC,
- NULL, 0xF0, NULL, HFILL }
+ NULL, 0, NULL, HFILL }
},
{ &hf_iso14443_adc,
{ "Application Data Coding", "iso14443.adc", FT_BOOLEAN, 8,
@@ -1477,6 +1483,7 @@ proto_register_iso14443(void)
&ett_iso14443_prot_inf,
&ett_iso14443_prot_type,
&ett_iso14443_ats_t0,
+ &ett_iso14443_ats_tb1,
&ett_iso14443_attr_p1,
&ett_iso14443_attr_p2,
&ett_iso14443_pcb,