aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-zvt.c
diff options
context:
space:
mode:
authorMartin Kaiser <wireshark@kaiser.cx>2016-09-04 18:42:03 +0200
committerMartin Kaiser <wireshark@kaiser.cx>2016-09-04 17:01:26 +0000
commit397a9d0b2e6b763163d306772a0a7a20afe4b8df (patch)
treee4d23811dcde95f62ad6b544f8a9f964f1e7bdd8 /epan/dissectors/packet-zvt.c
parent6c462790a18ea66068b4f4542bc6d99bcaa7617c (diff)
zvt: start dissecting Intermediate Status Information
Change-Id: I351621f1def5ad6da577a9b0d1b2c5ab49018564 Reviewed-on: https://code.wireshark.org/review/17488 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Diffstat (limited to 'epan/dissectors/packet-zvt.c')
-rw-r--r--epan/dissectors/packet-zvt.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/epan/dissectors/packet-zvt.c b/epan/dissectors/packet-zvt.c
index 4fc62e1038..be89f2e0e3 100644
--- a/epan/dissectors/packet-zvt.c
+++ b/epan/dissectors/packet-zvt.c
@@ -107,6 +107,8 @@ typedef struct _apdu_info_t {
#define CTRL_INIT 0x0693
#define CTRL_PRINT_LINE 0x06D1
+static void dissect_zvt_int_status(tvbuff_t *tvb, gint offset, guint16 len,
+ packet_info *pinfo, proto_tree *tree, zvt_transaction_t *zvt_trans);
static void dissect_zvt_reg(tvbuff_t *tvb, gint offset, guint16 len,
packet_info *pinfo, proto_tree *tree, zvt_transaction_t *zvt_trans);
static void dissect_zvt_bitmap_seq(tvbuff_t *tvb, gint offset, guint16 len,
@@ -114,7 +116,7 @@ static void dissect_zvt_bitmap_seq(tvbuff_t *tvb, gint offset, guint16 len,
static const apdu_info_t apdu_info[] = {
{ CTRL_STATUS, 0, DIRECTION_PT_TO_ECR, NULL },
- { CTRL_INT_STATUS, 0, DIRECTION_PT_TO_ECR, NULL },
+ { CTRL_INT_STATUS, 0, DIRECTION_PT_TO_ECR, dissect_zvt_int_status },
{ CTRL_REGISTRATION, 4, DIRECTION_ECR_TO_PT, dissect_zvt_reg },
/* authorisation has at least a 0x04 tag and 6 bytes for the amount */
{ CTRL_AUTHORISATION, 7, DIRECTION_ECR_TO_PT, dissect_zvt_bitmap_seq },
@@ -197,6 +199,7 @@ static int hf_zvt_ccrc = -1;
static int hf_zvt_aprc = -1;
static int hf_zvt_len = -1;
static int hf_zvt_data = -1;
+static int hf_zvt_int_status = -1;
static int hf_zvt_reg_pwd = -1;
static int hf_zvt_reg_cfg = -1;
static int hf_zvt_cc = -1;
@@ -448,6 +451,21 @@ dissect_zvt_bitmap(tvbuff_t *tvb, gint offset,
}
+static void dissect_zvt_int_status(tvbuff_t *tvb, gint offset, guint16 len _U_,
+ packet_info *pinfo, proto_tree *tree, zvt_transaction_t *zvt_trans)
+{
+ proto_tree_add_item(tree, hf_zvt_int_status,
+ tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset++;
+
+ if (len > 1)
+ offset++; /* skip "timeout" */
+
+ if (len > 2)
+ dissect_zvt_bitmap_seq(tvb, offset, len-2, pinfo, tree, zvt_trans);
+}
+
+
static void
dissect_zvt_reg(tvbuff_t *tvb, gint offset, guint16 len _U_,
packet_info *pinfo, proto_tree *tree, zvt_transaction_t *zvt_trans)
@@ -852,6 +870,9 @@ proto_register_zvt(void)
{ &hf_zvt_data,
{ "APDU data", "zvt.data",
FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL } },
+ { &hf_zvt_int_status,
+ { "Intermediate status", "zvt.int_status",
+ FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL } },
{ &hf_zvt_reg_pwd,
{ "Password", "zvt.reg.password",
FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL } },