diff options
author | Marian Ďurkovič <md@bts.sk> | 2014-08-18 09:14:30 +0200 |
---|---|---|
committer | Evan Huus <eapache@gmail.com> | 2014-08-18 16:31:05 +0000 |
commit | 8f0d81d332ec77ba14917ab3ac642d8945a528df (patch) | |
tree | f4dcadc001ea50cda159b4a93656db75f073d125 /epan/dissectors/packet-isis-lsp.c | |
parent | 3788097ac87c500824695584f5147b6b7b124b31 (diff) |
TRILL TREE Sub-TLV fixes
1) Fix starting tree number
2) Display Nicknames both in hex and dec
Change-Id: If58d034e98429019d769ebe7be635a296e8ef18d
Reviewed-on: https://code.wireshark.org/review/3687
Petri-Dish: Evan Huus <eapache@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Evan Huus <eapache@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-isis-lsp.c')
-rw-r--r-- | epan/dissectors/packet-isis-lsp.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/epan/dissectors/packet-isis-lsp.c b/epan/dissectors/packet-isis-lsp.c index e4dd87350e..310b3b699a 100644 --- a/epan/dissectors/packet-isis-lsp.c +++ b/epan/dissectors/packet-isis-lsp.c @@ -779,7 +779,7 @@ dissect_isis_rt_capable_clv(tvbuff_t *tvb, packet_info* pinfo _U_, guint16 rt_block; proto_tree *rt_tree; - gint root_id = 1; /* To display the root id */ + guint16 root_id; /* To display the root id */ length = length - 5; /* Ignoring the 5 reserved bytes */ offset = offset + 5; @@ -845,17 +845,17 @@ dissect_isis_rt_capable_clv(tvbuff_t *tvb, packet_info* pinfo _U_, length--; offset++; + root_id = tvb_get_ntohs(tvb, offset); proto_tree_add_item(rt_tree, hf_isis_lsp_rt_capable_tree_root_id_starting_tree_no, tvb, offset, 2, ENC_BIG_ENDIAN); len -= 2; length -= 2; offset += 2; - root_id = 1; while (len>1) { rt_block = tvb_get_ntohs(tvb, offset); proto_tree_add_uint_format(rt_tree, hf_isis_lsp_rt_capable_tree_root_id_nickname, tvb, offset, 2, - rt_block, "Nickname(%dth root): %d", root_id, rt_block); + rt_block, "Nickname(%dth root): 0x%04x (%d)", root_id, rt_block, rt_block); root_id++; len -= 2; length -= 2; @@ -950,17 +950,17 @@ dissect_isis_rt_capable_clv(tvbuff_t *tvb, packet_info* pinfo _U_, length--; offset++; + root_id = tvb_get_ntohs(tvb, offset); proto_tree_add_item(rt_tree, hf_isis_lsp_rt_capable_tree_used_id_starting_tree_no, tvb, offset, 2, ENC_BIG_ENDIAN); len -= 2; length -= 2; offset += 2; - root_id = 1; while (len>1) { rt_block = tvb_get_ntohs(tvb, offset); proto_tree_add_uint_format(rt_tree, hf_isis_lsp_rt_capable_tree_used_id_nickname, tvb, offset,2, - rt_block, "Nickname(%dth root): %d", root_id, rt_block); + rt_block, "Nickname(%dth root): 0x%04x (%d)", root_id, rt_block, rt_block); root_id++; len -= 2; offset += 2; |