aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-mq.c
diff options
context:
space:
mode:
authorrobionekenobi <robionekenobi@bluewin.ch>2020-12-11 14:25:11 +0100
committerAndersBroman <a.broman58@gmail.com>2020-12-15 13:01:34 +0000
commit253c49b73e2eabfba5c18b2e05d810e0fb049eda (patch)
treed1470217562b53c573b4498dca840bd74387621f /epan/dissectors/packet-mq.c
parentb7cb24c1fdf2f65eaa6fc73a6a2ce2ebeed7817e (diff)
packet-mq: Improve MQINQ Display
Improve display of Integer value (use standard, no alignement) Reduce un-needed space in table display for Prm. Use, where possible, 'xxx: Text (decimal)' display for Integer value
Diffstat (limited to 'epan/dissectors/packet-mq.c')
-rw-r--r--epan/dissectors/packet-mq.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/epan/dissectors/packet-mq.c b/epan/dissectors/packet-mq.c
index 83cc3f9906..2fec2d2c4c 100644
--- a/epan/dissectors/packet-mq.c
+++ b/epan/dissectors/packet-mq.c
@@ -2649,11 +2649,7 @@ static void dissect_mq_pdu(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree)
const guint8* _pVal = NULL;
for (iSelector = 0; iSelector < iNbSelectors; iSelector++)
{
- //proto_tree_add_item(mq_tree, hf_mq_inq_sel, tvb, offset + iOffsetINQ + iSelector * 4, 4, p_mq_parm->mq_int_enc);
- guint _Val = tvb_get_guint32(tvb, offset + iOffsetINQ + iSelector* 4, p_mq_parm->mq_int_enc);
- _pVal = (const guint8*)try_val_to_str_ext(_Val, GET_VALS_EXTP(selector));
- proto_tree_add_uint_format(mq_tree, hf_mq_inq_sel, tvb, offset + iOffsetINQ + iSelector * 4, 4, 0,
- "Selector........: 0x%08x (%d) %s", _Val, _Val, _pVal);
+ proto_tree_add_item(mq_tree, hf_mq_inq_sel, tvb, offset + iOffsetINQ + iSelector * 4, 4, p_mq_parm->mq_int_enc);
}
iOffsetINQ += iNbSelectors * 4;
if (p_mq_parm->mq_opcode == MQ_TST_MQINQ_REPLY || p_mq_parm->mq_opcode == MQ_TST_MQSET)
@@ -2678,7 +2674,7 @@ static void dissect_mq_pdu(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree)
_posSel += 4;
if (_pVal)
proto_tree_add_uint_format(mq_tree, hf_mq_inq_intvalue, tvb, offset + iOffsetINQ + iInteger * 4, 4, 0,
- "Integer value...: 0x%08x (%d) %s", _lVal, _lVal, _pVal);
+ "Integer value...: %s (%d)", _pVal, _lVal);
else
proto_tree_add_item(mq_tree, hf_mq_inq_intvalue, tvb, offset + iOffsetINQ + iInteger * 4, 4, p_mq_parm->mq_int_enc);
}
@@ -4175,7 +4171,7 @@ void proto_register_mq(void)
{&hf_mq_inq_nbsel, {"Selector count..", "mq.inq.nbsel", FT_UINT32, BASE_DEC, NULL, 0x0, "INQ Selector count", HFILL}},
{&hf_mq_inq_nbint, {"Integer count...", "mq.inq.nbint", FT_UINT32, BASE_DEC, NULL, 0x0, "INQ Integer count", HFILL}},
{&hf_mq_inq_charlen, {"Character length", "mq.inq.charlen", FT_UINT32, BASE_DEC, NULL, 0x0, "INQ Character length", HFILL}},
- {&hf_mq_inq_sel, {"Selector........", "mq.inq.sel", FT_UINT32, BASE_HEX_DEC | BASE_EXT_STRING, GET_VALS_EXTP(selector), 0x0, "INQ Selector", HFILL}},
+ {&hf_mq_inq_sel, {"Selector........", "mq.inq.sel", FT_UINT32, BASE_DEC | BASE_EXT_STRING, GET_VALS_EXTP(selector), 0x0, "INQ Selector", HFILL}},
{&hf_mq_inq_intvalue, {"Integer value...", "mq.inq.intvalue", FT_UINT32, BASE_DEC, NULL, 0x0, "INQ Integer value", HFILL}},
{&hf_mq_inq_charvalues, {"Char values.....", "mq.inq.charvalues", FT_STRING, STR_UNICODE, NULL, 0x0, "INQ Character values", HFILL}},