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-fcsp.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'epan/dissectors/packet-fcsp.c') diff --git a/epan/dissectors/packet-fcsp.c b/epan/dissectors/packet-fcsp.c index 72487b5566..28a5e44506 100644 --- a/epan/dissectors/packet-fcsp.c +++ b/epan/dissectors/packet-fcsp.c @@ -233,8 +233,8 @@ static void dissect_fcsp_dhchap_challenge(tvbuff_t *tvb, proto_tree *tree) name_len = tvb_get_ntohs(tvb, offset+2); if (name_type == FC_AUTH_NAME_TYPE_WWN) { - proto_tree_add_string(tree, hf_auth_responder_wwn, tvb, offset+4, - 8, tvb_fcwwn_to_str(tvb, offset+4)); + proto_tree_add_item(tree, hf_auth_responder_wwn, tvb, offset+4, + 8, ENC_NA); } else { proto_tree_add_item(tree, hf_auth_responder_name, tvb, offset+4, @@ -322,8 +322,7 @@ static void dissect_fcsp_auth_negotiate(tvbuff_t *tvb, proto_tree *tree) name_len = tvb_get_ntohs(tvb, offset+2); if (name_type == FC_AUTH_NAME_TYPE_WWN) { - proto_tree_add_string(tree, hf_auth_initiator_wwn, tvb, offset+4, 8, - tvb_fcwwn_to_str(tvb, offset+4)); + proto_tree_add_item(tree, hf_auth_initiator_wwn, tvb, offset+4, 8, ENC_NA); } else { proto_tree_add_item(tree, hf_auth_initiator_name, tvb, offset+4, @@ -464,7 +463,7 @@ proto_register_fcsp(void) { &hf_auth_initiator_wwn, { "Initiator Name (WWN)", "fcsp.initwwn", - FT_STRING, BASE_NONE, NULL, 0x0, + FT_FCWWN, BASE_NONE, NULL, 0x0, NULL, HFILL}}, { &hf_auth_initiator_name, @@ -499,7 +498,7 @@ proto_register_fcsp(void) { &hf_auth_responder_wwn, { "Responder Name (WWN)", "fcsp.rspwwn", - FT_STRING, BASE_NONE, NULL, 0x0, + FT_FCWWN, BASE_NONE, NULL, 0x0, NULL, HFILL}}, { &hf_auth_responder_name, -- cgit v1.2.3