diff options
author | Martin Kaiser <wireshark@kaiser.cx> | 2015-02-17 23:13:00 +0100 |
---|---|---|
committer | Martin Kaiser <wireshark@kaiser.cx> | 2015-02-17 22:13:53 +0000 |
commit | 23c8bb814ccd212dcdce0735f4bde898c41f73d7 (patch) | |
tree | fb9e43a43887a2d79ad9d8300f616d4e6e403713 /epan | |
parent | eca4d29235aac4cd17323abc87a2a7a2983cd0a0 (diff) |
[zvt] dissect some more fields
Change-Id: I93ffcfddd59a196a7e4f9f354b99884a7f5a814c
Reviewed-on: https://code.wireshark.org/review/7208
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
Diffstat (limited to 'epan')
-rw-r--r-- | epan/dissectors/packet-zvt.c | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/epan/dissectors/packet-zvt.c b/epan/dissectors/packet-zvt.c index dfda677451..27bcba889f 100644 --- a/epan/dissectors/packet-zvt.c +++ b/epan/dissectors/packet-zvt.c @@ -130,6 +130,8 @@ static int hf_zvt_len = -1; static int hf_zvt_data = -1; static int hf_zvt_reg_pwd = -1; static int hf_zvt_reg_cfg = -1; +static int hf_zvt_cc = -1; +static int hf_zvt_reg_svc_byte = -1; static int hf_zvt_auth_tag = -1; static const value_string serial_char[] = { @@ -200,8 +202,25 @@ dissect_zvt_reg(tvbuff_t *tvb, gint offset, guint16 len _U_, { proto_tree_add_item(tree, hf_zvt_reg_pwd, tvb, offset, 3, ENC_NA); offset += 3; + proto_tree_add_item(tree, hf_zvt_reg_cfg, - tvb, offset, 1, ENC_LITTLE_ENDIAN); + tvb, offset, 1, ENC_BIG_ENDIAN); + offset++; + + /* check for the optional part CC|0x03|service byte */ + if (tvb_captured_length_remaining(tvb, offset)>=4 && + tvb_get_guint8(tvb, offset+2)==0x03) { + + proto_tree_add_item(tree, hf_zvt_cc, + tvb, offset, 2, ENC_BIG_ENDIAN); + offset += 2; + + offset++; /* 0x03 */ + + proto_tree_add_item(tree, hf_zvt_reg_svc_byte, + tvb, offset, 1, ENC_BIG_ENDIAN); + offset++; + } } @@ -550,6 +569,14 @@ proto_register_zvt(void) { &hf_zvt_reg_cfg, { "Config byte", "zvt.reg.config_byte", FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL } }, + /* we don't call the filter zvt.reg.cc, the currency code + appears in several apdus */ + { &hf_zvt_cc, + { "Currency Code (CC)", "zvt.cc", + FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL } }, + { &hf_zvt_reg_svc_byte, + { "Service byte", "zvt.reg.service_byte", + FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL } }, { &hf_zvt_auth_tag, { "Tag", "zvt.auth.tag", FT_UINT8, BASE_HEX|BASE_EXT_STRING, &auth_tag_ext, 0, NULL, HFILL } } |