aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ppp.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2015-01-03 21:56:16 -0500
committerMichael Mann <mmann78@netscape.net>2015-01-04 16:32:03 +0000
commit553da374461efb87436dbbed7d319d252d4fe2e6 (patch)
tree1f581449dc0a022f8feb4f2088aec6fb47fd023f /epan/dissectors/packet-ppp.c
parent2085bbec9d0e4661af77a6e9530cffd5df15ecc8 (diff)
Create BASE_DOT, BASE_DASH, and BASE_SEMICOLON types for the FT_BYTES field type.
These "bases" will put a ".", "-", or ":" respectively between hexidecimal bytes in the field in packet view and display filter. FT_BYTES with BASE_NONE will have no separator in the packet view, but continue to have the ':' as a separator in the display filter. Converted the "string" hf_ entries that used tvb_fc_to_str as a string to use proto_tree_add_item with FT_BYTES/BASE_DOT type. Converted applicable tvb_bytes_to_ep_str_punct() calls to use the new BASE values. Change-Id: I2442185bb314d04a3ff2ba57883652ecd738b5f9 Reviewed-on: https://code.wireshark.org/review/6098 Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-ppp.c')
-rw-r--r--epan/dissectors/packet-ppp.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/epan/dissectors/packet-ppp.c b/epan/dissectors/packet-ppp.c
index b132b7de2a..f2eca9f157 100644
--- a/epan/dissectors/packet-ppp.c
+++ b/epan/dissectors/packet-ppp.c
@@ -5334,10 +5334,9 @@ dissect_ipv6cp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static void
dissect_ipv6cp_if_id_opt(const ip_tcp_opt *optp _U_, tvbuff_t *tvb, int offset,
- guint length, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
+ guint length _U_, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
{
- proto_tree_add_bytes_format_value(tree, hf_ipv6cp_interface_identifier, tvb, offset+2, length-2,
- NULL, "%s", tvb_bytes_to_ep_str_punct(tvb, offset+2, 8, ':'));
+ proto_tree_add_item(tree, hf_ipv6cp_interface_identifier, tvb, offset+2, 8, ENC_NA);
}
void
@@ -6750,7 +6749,7 @@ proto_register_ipv6cp(void)
{
static hf_register_info hf[] = {
/* Generated from convert_proto_tree_add_text.pl */
- { &hf_ipv6cp_interface_identifier, { "Interface Identifier", "ipv6cp.interface_identifier", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
+ { &hf_ipv6cp_interface_identifier, { "Interface Identifier", "ipv6cp.interface_identifier", FT_BYTES, BASE_SEMICOLON, NULL, 0x0, NULL, HFILL }},
};
static gint *ett[] = {
&ett_ipv6cp,