aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-cisco-sm.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2013-09-16 10:39:06 +0000
committerMichael Mann <mmann78@netscape.net>2013-09-16 10:39:06 +0000
commit346f803d42ac477109e02df2578eb8c86ccf4c4f (patch)
tree4277e1e48aeb6d492ceb835af645460070fb04ec /epan/dissectors/packet-cisco-sm.c
parent58e4750ecbf593fb678c713da398979b7fb2ed5d (diff)
Convert proto_tree_add_uint_format to proto_tree_add_uint_format_value if hf_ field name is the first part of the formatted string. This was all manual inspection and most cases were either:
1. Case sensitivity differences between hf_ field name and formatted string. 2. Unnecessary whitespace between hf_ field name and colon in formatted string There are cases where the hf_ field name doesn't quite match the proto_tree_add_uint_format, but it's close enough that one of them should be "right", I'm just not sure which is, I just know the string in proto_tree_add_uint_format is the one displayed. svn path=/trunk/; revision=52098
Diffstat (limited to 'epan/dissectors/packet-cisco-sm.c')
-rw-r--r--epan/dissectors/packet-cisco-sm.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/epan/dissectors/packet-cisco-sm.c b/epan/dissectors/packet-cisco-sm.c
index 6f8fec590a..5575eb9dc5 100644
--- a/epan/dissectors/packet-cisco-sm.c
+++ b/epan/dissectors/packet-cisco-sm.c
@@ -293,8 +293,8 @@ dissect_sm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
ti = proto_tree_add_item(tree, proto_sm, tvb, offset, 0, ENC_NA);
sm_tree = proto_item_add_subtree(ti, ett_sm);
- proto_tree_add_uint_format(sm_tree, hf_sm_sm_msg_type, tvb, offset, 4, sm_message_type,
- "SM Message type: %s (0x%0x)", val_to_str_const(sm_message_type, sm_message_type_value, "reserved"), sm_message_type);
+ proto_tree_add_uint_format_value(sm_tree, hf_sm_sm_msg_type, tvb, offset, 4, sm_message_type,
+ "%s (0x%0x)", val_to_str_const(sm_message_type, sm_message_type_value, "reserved"), sm_message_type);
offset = offset + 4;
if (sm_message_type == MESSAGE_TYPE_PDU) {
@@ -310,8 +310,8 @@ dissect_sm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_item(sm_tree, hf_sm_msg_id, tvb, offset, 2, ENC_BIG_ENDIAN);
offset = offset +2;
msg_type = tvb_get_ntohs(tvb,offset);
- proto_tree_add_uint_format(sm_tree, hf_sm_msg_type, tvb, offset, 2, msg_type,
- "Message type: %s (0x%0x)", val_to_str_const(msg_type, sm_pdu_type_value, "reserved"),
+ proto_tree_add_uint_format_value(sm_tree, hf_sm_msg_type, tvb, offset, 2, msg_type,
+ "%s (0x%0x)", val_to_str_const(msg_type, sm_pdu_type_value, "reserved"),
msg_type);
msg_type = tvb_get_ntohs(tvb,offset);
offset = offset + 2;
@@ -426,8 +426,8 @@ dissect_sm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_item(sm_tree, hf_sm_msg_id, tvb, offset, 2, ENC_BIG_ENDIAN);
offset = offset +2;
msg_type = tvb_get_ntohs(tvb,offset);
- proto_tree_add_uint_format(sm_tree, hf_sm_msg_type, tvb, offset, 2, msg_type,
- "Message type: %s (0x%0x)", val_to_str_const(msg_type, sm_pdu_type_value, "reserved"),
+ proto_tree_add_uint_format_value(sm_tree, hf_sm_msg_type, tvb, offset, 2, msg_type,
+ "%s (0x%0x)", val_to_str_const(msg_type, sm_pdu_type_value, "reserved"),
msg_type);
msg_type = tvb_get_ntohs(tvb,offset);
offset = offset + 2;
@@ -462,8 +462,7 @@ dissect_sm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (msg_type == PDU_RETRIEVAL_CONFIRM && tvb_get_ntohl(tvb,offset) == 0x01) {
offset += 4;
bsn_num = tvb_get_ntohl(tvb,offset);
- proto_tree_add_uint_format(sm_tree, hf_sm_bsn_num, tvb, offset, 4,
- bsn_num, "BSN: %d", bsn_num);
+ proto_tree_add_item(sm_tree, hf_sm_bsn_num, tvb, offset, 4, ENC_BIG_ENDIAN);
}
break;
case PDU_LSC_REQUEST:
@@ -593,8 +592,8 @@ proto_register_sm(void)
NULL, HFILL }
},
{ &hf_sm_bsn_num,
- { "BSN Number","sm.bsn_num",
- FT_UINT32, BASE_HEX, NULL, 0x0,
+ { "BSN","sm.bsn_num",
+ FT_UINT32, BASE_DEC, NULL, 0x0,
NULL, HFILL }
},