diff options
author | Michael Mann <mmann78@netscape.net> | 2015-02-12 19:51:11 -0500 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2015-02-21 15:33:56 +0000 |
commit | 13531d36fb91f3abbd6e62add83faf863e62d974 (patch) | |
tree | 4f31d03273b57468e8f47d9a8f7f649ef3c42082 /epan/dissectors/packet-bat.c | |
parent | c1b672cf23dc2f3e55dc37e84099240932953806 (diff) |
Convert dissectors to use address_with_resolution_to_str instead of two separate calls for address string and name resolution.
Change-Id: I7c8cfbcf201b3b73afe731302572646ce7833d64
Reviewed-on: https://code.wireshark.org/review/7284
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-bat.c')
-rw-r--r-- | epan/dissectors/packet-bat.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/epan/dissectors/packet-bat.c b/epan/dissectors/packet-bat.c index 562fbeb511..dbf7413b02 100644 --- a/epan/dissectors/packet-bat.c +++ b/epan/dissectors/packet-bat.c @@ -266,8 +266,8 @@ static int dissect_bat_batman_v5(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_item *ti; ti = proto_tree_add_protocol_format(tree, proto_bat_plugin, tvb, offset, BATMAN_PACKET_V5_SIZE, - "B.A.T.M.A.N., Orig: %s (%s)", - get_hostname(orig), address_to_str(wmem_packet_scope(), &batman_packeth->orig)); + "B.A.T.M.A.N., Orig: %s", + address_with_resolution_to_str(wmem_packet_scope(), &batman_packeth->orig)); bat_batman_tree = proto_item_add_subtree(ti, ett_bat_batman); } @@ -471,16 +471,16 @@ static void dissect_bat_vis_v22(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t col_set_str(pinfo->cinfo, COL_PROTOCOL, "BAT_VIS"); /* Set info column */ - col_add_fstr(pinfo->cinfo, COL_INFO, "Src: %s (%s)", - get_hostname(sender_ip), address_to_str(wmem_packet_scope(), &vis_packeth->sender_ip)); + col_add_fstr(pinfo->cinfo, COL_INFO, "Src: %s", + address_with_resolution_to_str(wmem_packet_scope(), &vis_packeth->sender_ip)); /* Set tree info */ if (tree) { proto_item *ti; ti = proto_tree_add_protocol_format(tree, proto_bat_plugin, tvb, 0, VIS_PACKET_V22_SIZE, - "B.A.T.M.A.N. Vis, Src: %s (%s)", - get_hostname(sender_ip), address_to_str(wmem_packet_scope(), &vis_packeth->sender_ip)); + "B.A.T.M.A.N. Vis, Src: %s", + address_with_resolution_to_str(wmem_packet_scope(), &vis_packeth->sender_ip)); bat_vis_tree = proto_item_add_subtree(ti, ett_bat_vis); /* items */ @@ -548,9 +548,9 @@ static void dissect_vis_entry_v22(tvbuff_t *tvb, packet_info *pinfo _U_, proto_t proto_tree *bat_vis_entry_tree; ti = proto_tree_add_protocol_format(tree, proto_bat_plugin, tvb, 0, 7, - "VIS Entry: [%s] %s (%s)", + "VIS Entry: [%s] %s", val_to_str(vis_datah->type, vis_packettypenames, "Unknown (0x%02x)"), - get_hostname(ip), address_to_str(wmem_packet_scope(), &vis_datah->ip)); + address_with_resolution_to_str(wmem_packet_scope(), &vis_datah->ip)); bat_vis_entry_tree = proto_item_add_subtree(ti, ett_bat_vis_entry); proto_tree_add_item(bat_vis_entry_tree, hf_bat_vis_data_type, tvb, 0, 1, ENC_BIG_ENDIAN); @@ -592,16 +592,16 @@ static void dissect_bat_vis_v23(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t col_set_str(pinfo->cinfo, COL_PROTOCOL, "BAT_VIS"); /* Set info column */ - col_add_fstr(pinfo->cinfo, COL_INFO, "Src: %s (%s)", - get_hostname(sender_ip), address_to_str(wmem_packet_scope(), &vis_packeth->sender_ip)); + col_add_fstr(pinfo->cinfo, COL_INFO, "Src: %s", + address_with_resolution_to_str(wmem_packet_scope(), &vis_packeth->sender_ip)); /* Set tree info */ if (tree) { proto_item *ti; ti = proto_tree_add_protocol_format(tree, proto_bat_plugin, tvb, 0, VIS_PACKET_V23_SIZE, - "B.A.T.M.A.N. Vis, Src: %s (%s)", - get_hostname(sender_ip), address_to_str(wmem_packet_scope(), &vis_packeth->sender_ip)); + "B.A.T.M.A.N. Vis, Src: %s", + address_with_resolution_to_str(wmem_packet_scope(), &vis_packeth->sender_ip)); bat_vis_tree = proto_item_add_subtree(ti, ett_bat_vis); /* items */ @@ -669,9 +669,9 @@ static void dissect_vis_entry_v23(tvbuff_t *tvb, packet_info *pinfo _U_, proto_t proto_tree *bat_vis_entry_tree; ti = proto_tree_add_protocol_format(tree, proto_bat_plugin, tvb, 0, 7, - "VIS Entry: [%s] %s (%s)", + "VIS Entry: [%s] %s", val_to_str(vis_datah->type, vis_packettypenames, "Unknown (0x%02x)"), - get_hostname(ip), address_to_str(wmem_packet_scope(), &vis_datah->ip)); + address_with_resolution_to_str(wmem_packet_scope(), &vis_datah->ip)); bat_vis_entry_tree = proto_item_add_subtree(ti, ett_bat_vis_entry); proto_tree_add_item(bat_vis_entry_tree, hf_bat_vis_data_type, tvb, 0, 1, ENC_BIG_ENDIAN); |