From 71c02b20eb798569393da09fc6557c314244e3e8 Mon Sep 17 00:00:00 2001 From: Michael Mann Date: Wed, 24 Dec 2014 00:06:35 -0500 Subject: Create FT_FCWWN field type. Also, convert the "string" hf_ entries that used tvb_fcwwn_to_str as a string to use proto_tree_add_item with FT_FCWWN type. Change-Id: I4ca77870499fd8239584a70874998b5d194a7167 Reviewed-on: https://code.wireshark.org/review/6036 Petri-Dish: Michael Mann Reviewed-by: Michael Mann --- epan/dissectors/packet-fc.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'epan/dissectors/packet-fc.c') diff --git a/epan/dissectors/packet-fc.c b/epan/dissectors/packet-fc.c index 45efa6ab2b..2423620d46 100644 --- a/epan/dissectors/packet-fc.c +++ b/epan/dissectors/packet-fc.c @@ -1048,10 +1048,8 @@ dissect_fc_helper (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboolean if (df_ctl & FC_DFCTL_NH) { /* Yes - dissect it. */ if (tree) { - proto_tree_add_string (fc_tree, hf_fc_nh_da, tvb, next_offset, 8, - fcwwn_to_str (tvb_get_string_enc(wmem_packet_scope(), tvb, offset, 8, ENC_ASCII))); - proto_tree_add_string (fc_tree, hf_fc_nh_sa, tvb, offset+8, 8, - fcwwn_to_str (tvb_get_string_enc(wmem_packet_scope(), tvb, offset+8, 8, ENC_ASCII))); + proto_tree_add_item(fc_tree, hf_fc_nh_da, tvb, next_offset, 8, ENC_NA); + proto_tree_add_item(fc_tree, hf_fc_nh_sa, tvb, next_offset+8, 8, ENC_NA); } next_offset += 16; } @@ -1455,10 +1453,10 @@ proto_register_fc(void) {"Reassembled Frame", "fc.reassembled", FT_BOOLEAN, BASE_NONE, NULL, 0x0, NULL, HFILL}}, { &hf_fc_nh_da, - {"Network DA", "fc.nethdr.da", FT_STRING, BASE_NONE, NULL, + {"Network DA", "fc.nethdr.da", FT_FCWWN, BASE_NONE, NULL, 0x0, NULL, HFILL}}, { &hf_fc_nh_sa, - {"Network SA", "fc.nethdr.sa", FT_STRING, BASE_NONE, NULL, + {"Network SA", "fc.nethdr.sa", FT_FCWWN, BASE_NONE, NULL, 0x0, NULL, HFILL}}, /* Basic Link Svc field definitions */ -- cgit v1.2.3