aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-nlsp.c
diff options
context:
space:
mode:
Diffstat (limited to 'epan/dissectors/packet-nlsp.c')
-rw-r--r--epan/dissectors/packet-nlsp.c37
1 files changed, 14 insertions, 23 deletions
diff --git a/epan/dissectors/packet-nlsp.c b/epan/dissectors/packet-nlsp.c
index 37a2ea3fef..e05bb25811 100644
--- a/epan/dissectors/packet-nlsp.c
+++ b/epan/dissectors/packet-nlsp.c
@@ -442,7 +442,6 @@ nlsp_dissect_nlsp_hello(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
{
guint16 packet_length;
int len;
- guint16 holding_timer;
if (hello_type == NLSP_TYPE_WAN_HELLO) {
proto_tree_add_item(tree, hf_nlsp_hello_state, tvb,
@@ -462,9 +461,7 @@ nlsp_dissect_nlsp_hello(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
offset += 6;
- holding_timer = tvb_get_ntohs(tvb, offset);
- proto_tree_add_uint_format_value(tree, hf_nlsp_hello_holding_timer,
- tvb, offset, 2, holding_timer, "%us", holding_timer);
+ proto_tree_add_item(tree, hf_nlsp_hello_holding_timer, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
packet_length = tvb_get_ntohs(tvb, offset);
@@ -680,8 +677,7 @@ dissect_lsp_link_info_clv(tvbuff_t *tvb, packet_info* pinfo, proto_tree *tree, i
"Short link info entry");
return;
}
- proto_tree_add_uint_format_value(tree, hf_nlsp_link_info_delay, tvb, offset, 4,
- tvb_get_ntohl(tvb, offset), "%uus", tvb_get_ntohl(tvb, offset));
+ proto_tree_add_item(tree, hf_nlsp_link_info_delay, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
length -= 4;
@@ -690,8 +686,7 @@ dissect_lsp_link_info_clv(tvbuff_t *tvb, packet_info* pinfo, proto_tree *tree, i
"Short link info entry");
return;
}
- proto_tree_add_uint_format_value(tree, hf_nlsp_link_info_throughput, tvb, offset, 4,
- tvb_get_ntohl(tvb, offset), "%u bits/s", tvb_get_ntohl(tvb, offset));
+ proto_tree_add_item(tree, hf_nlsp_link_info_throughput, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
length -= 4;
@@ -824,8 +819,7 @@ dissect_lsp_ext_routes_clv(tvbuff_t *tvb, packet_info* pinfo, proto_tree *tree,
return;
}
- proto_tree_add_uint_format_value(tree, hf_nlsp_ext_routes_rip_delay, tvb, offset, 2,
- tvb_get_ntohs(tvb, offset), "%u ticks", tvb_get_ntohs(tvb, offset));
+ proto_tree_add_item(tree, hf_nlsp_ext_routes_rip_delay, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
length -= 2;
}
@@ -918,8 +912,7 @@ nlsp_dissect_nlsp_lsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
offset += 2;
remaining_lifetime = tvb_get_ntohs(tvb, offset);
- proto_tree_add_uint_format_value(tree, hf_nlsp_remaining_lifetime, tvb, offset, 2,
- remaining_lifetime, "%us", remaining_lifetime);
+ proto_tree_add_uint(tree, hf_nlsp_remaining_lifetime, tvb, offset, 2, remaining_lifetime);
offset += 2;
col_append_fstr(pinfo->cinfo, COL_INFO, ", LSP ID: %s",
@@ -1022,8 +1015,7 @@ dissect_csnp_lsp_entries(tvbuff_t *tvb, packet_info* pinfo, proto_tree *tree, in
proto_tree_add_item(subtree, hf_nlsp_csnp_lsp_sequence_number, tvb, offset+10, 4, ENC_BIG_ENDIAN);
- proto_tree_add_uint_format_value(subtree, hf_nlsp_csnp_remaining_lifetime, tvb, offset, 2,
- tvb_get_ntohs(tvb, offset), "%us", tvb_get_ntohs(tvb, offset));
+ proto_tree_add_item(subtree, hf_nlsp_csnp_remaining_lifetime, tvb, offset, 2, ENC_BIG_ENDIAN);
proto_tree_add_checksum(subtree, tvb, offset+14, hf_nlsp_csnp_lsp_checksum, -1, NULL, pinfo, 0, ENC_BIG_ENDIAN, PROTO_CHECKSUM_NO_FLAGS);
@@ -1058,8 +1050,7 @@ dissect_psnp_lsp_entries(tvbuff_t *tvb, packet_info* pinfo, proto_tree *tree, in
proto_tree_add_item(subtree, hf_nlsp_psnp_lsp_sequence_number, tvb, offset+10, 4, ENC_BIG_ENDIAN);
- proto_tree_add_uint_format_value(subtree, hf_nlsp_psnp_remaining_lifetime, tvb, offset, 2,
- tvb_get_ntohs(tvb, offset), "%us", tvb_get_ntohs(tvb, offset));
+ proto_tree_add_item(subtree, hf_nlsp_psnp_remaining_lifetime, tvb, offset, 2, ENC_BIG_ENDIAN);
proto_tree_add_checksum(subtree, tvb, offset+14, hf_nlsp_psnp_lsp_checksum, -1, NULL, pinfo, 0, ENC_BIG_ENDIAN, PROTO_CHECKSUM_NO_FLAGS);
@@ -1389,7 +1380,7 @@ proto_register_nlsp(void)
{ &hf_nlsp_hello_holding_timer,
{ "Holding Timer", "nlsp.hello.holding_timer",
- FT_UINT8, BASE_DEC, NULL, 0x0,
+ FT_UINT8, BASE_DEC|BASE_UNIT_STRING, &units_seconds, 0x0,
NULL, HFILL }
},
@@ -1541,12 +1532,12 @@ proto_register_nlsp(void)
},
{ &hf_nlsp_link_info_delay,
{ "Delay", "nlsp.link_info.delay",
- FT_UINT32, BASE_DEC, NULL, 0x0,
+ FT_UINT32, BASE_DEC|BASE_UNIT_STRING, &units_microseconds, 0x0,
NULL, HFILL }
},
{ &hf_nlsp_link_info_throughput,
{ "Throughput", "nlsp.link_info.throughput",
- FT_UINT32, BASE_DEC, NULL, 0x0,
+ FT_UINT32, BASE_DEC|BASE_UNIT_STRING, &units_bit_sec, 0x0,
NULL, HFILL }
},
{ &hf_nlsp_link_info_media_type,
@@ -1596,12 +1587,12 @@ proto_register_nlsp(void)
},
{ &hf_nlsp_ext_routes_rip_delay,
{ "RIP delay", "nlsp.ext_routes.rip_delay",
- FT_UINT16, BASE_DEC, NULL, 0x0,
+ FT_UINT16, BASE_DEC|BASE_UNIT_STRING, &units_tick_ticks, 0x0,
NULL, HFILL }
},
{ &hf_nlsp_remaining_lifetime,
{ "Remaining Lifetime", "nlsp.remaining_lifetime",
- FT_UINT16, BASE_DEC, NULL, 0x0,
+ FT_UINT16, BASE_DEC|BASE_UNIT_STRING, &units_seconds, 0x0,
NULL, HFILL }
},
{ &hf_nlsp_lsp_id_system_id,
@@ -1641,7 +1632,7 @@ proto_register_nlsp(void)
},
{ &hf_nlsp_csnp_remaining_lifetime,
{ "Remaining Lifetime", "nlsp.csnp.remaining_lifetime",
- FT_UINT16, BASE_DEC, NULL, 0x0,
+ FT_UINT16, BASE_DEC|BASE_UNIT_STRING, &units_seconds, 0x0,
NULL, HFILL }
},
{ &hf_nlsp_csnp_lsp_checksum,
@@ -1671,7 +1662,7 @@ proto_register_nlsp(void)
},
{ &hf_nlsp_psnp_remaining_lifetime,
{ "Remaining Lifetime", "nlsp.psnp.remaining_lifetime",
- FT_UINT16, BASE_DEC, NULL, 0x0,
+ FT_UINT16, BASE_DEC|BASE_UNIT_STRING, &units_seconds, 0x0,
NULL, HFILL }
},
{ &hf_nlsp_psnp_lsp_checksum,