aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2014-12-19 21:42:14 -0500
committerMichael Mann <mmann78@netscape.net>2014-12-21 15:13:30 +0000
commitf002332d88a8253cb823cffe82bcedcf4ac196a4 (patch)
tree188434acdbcb2d7f1843e19ebc69bc1af94b7e18 /plugins
parentcdaa6698297a9e14ae9b321f0c6ee536afa917b6 (diff)
Replace ether_to_str with either address_to_str or tvb_ether_to_str.
Change-Id: I8cce9fddbfe950e27e96ea8a5a6d2e0921ff4260 Reviewed-on: https://code.wireshark.org/review/5933 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'plugins')
-rw-r--r--plugins/profinet/packet-dcerpc-pn-io.c37
-rw-r--r--plugins/wimaxasncp/packet-wimaxasncp.c2
2 files changed, 27 insertions, 12 deletions
diff --git a/plugins/profinet/packet-dcerpc-pn-io.c b/plugins/profinet/packet-dcerpc-pn-io.c
index affe6a1c93..ed9ecab9a3 100644
--- a/plugins/profinet/packet-dcerpc-pn-io.c
+++ b/plugins/profinet/packet-dcerpc-pn-io.c
@@ -2664,12 +2664,16 @@ pnio_ar_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, pnio_ar_t *ar)
proto_item *item;
proto_item *sub_item;
proto_tree *sub_tree;
+ address controllermac_addr, devicemac_addr;
+
+ SET_ADDRESS(&controllermac_addr, AT_ETHER, 6, ar->controllermac);
+ SET_ADDRESS(&devicemac_addr, AT_ETHER, 6, ar->devicemac);
sub_tree = proto_tree_add_subtree_format(tree, tvb, 0, 0, ett_pn_io_ar_info, &sub_item,
"ARUUID:%s ContrMAC:%s ContrAlRef:0x%x DevMAC:%s DevAlRef:0x%x InCR:0x%x OutCR=0x%x",
guid_to_ep_str((const e_guid_t*) &ar->aruuid),
- ether_to_str((const guint8 *)ar->controllermac), ar->controlleralarmref,
- ether_to_str((const guint8 *)ar->devicemac), ar->devicealarmref,
+ address_to_str(wmem_packet_scope(), &controllermac_addr), ar->controlleralarmref,
+ address_to_str(wmem_packet_scope(), &devicemac_addr), ar->devicealarmref,
ar->inputframeid, ar->outputframeid);
PROTO_ITEM_SET_GENERATED(sub_item);
@@ -9499,18 +9503,22 @@ pn_io_ar_conv_filter(packet_info *pinfo)
pnio_ar_t *ar = (pnio_ar_t *)p_get_proto_data(wmem_file_scope(), pinfo, proto_pn_io, 0);
void* profinet_type = p_get_proto_data(pinfo->pool, pinfo, proto_pn_io, 0);
char *buf;
+ address controllermac_addr, devicemac_addr;
if ((profinet_type == NULL) || (GPOINTER_TO_UINT(profinet_type) != 10) || (ar == NULL)) {
return NULL;
}
+ SET_ADDRESS(&controllermac_addr, AT_ETHER, 6, ar->controllermac);
+ SET_ADDRESS(&devicemac_addr, AT_ETHER, 6, ar->devicemac);
+
buf = g_strdup_printf(
"pn_io.ar_uuid == %s || " /* ARUUID */
"(pn_io.alarm_src_endpoint == 0x%x && eth.src == %s) || " /* Alarm CR (contr -> dev) */
"(pn_io.alarm_src_endpoint == 0x%x && eth.src == %s)", /* Alarm CR (dev -> contr) */
guid_to_ep_str((const e_guid_t*) &ar->aruuid),
- ar->controlleralarmref, ether_to_str((const guint8 *)ar->controllermac),
- ar->devicealarmref, ether_to_str((const guint8 *)ar->devicemac));
+ ar->controlleralarmref, address_to_str(wmem_packet_scope(), &controllermac_addr),
+ ar->devicealarmref, address_to_str(wmem_packet_scope(), &devicemac_addr));
return buf;
}
@@ -9519,11 +9527,18 @@ pn_io_ar_conv_data_filter(packet_info *pinfo)
{
pnio_ar_t *ar = (pnio_ar_t *)p_get_proto_data(wmem_file_scope(), pinfo, proto_pn_io, 0);
void* profinet_type = p_get_proto_data(pinfo->pool, pinfo, proto_pn_io, 0);
- char *buf;
+ char *buf, *controllermac_str, *devicemac_str;
+ address controllermac_addr, devicemac_addr;
if ((profinet_type == NULL) || (GPOINTER_TO_UINT(profinet_type) != 10) || (ar == NULL)) {
return NULL;
}
+
+ SET_ADDRESS(&controllermac_addr, AT_ETHER, 6, ar->controllermac);
+ SET_ADDRESS(&devicemac_addr, AT_ETHER, 6, ar->devicemac);
+
+ controllermac_str = address_to_str(wmem_packet_scope(), &controllermac_addr);
+ devicemac_str = address_to_str(wmem_packet_scope(), &devicemac_addr);
if (ar->arType == 0x0010) /* IOCARSingle using RT_CLASS_3 */
{
buf = g_strdup_printf(
@@ -9533,8 +9548,8 @@ pn_io_ar_conv_data_filter(packet_info *pinfo)
"(pn_io.alarm_src_endpoint == 0x%x && eth.src == %s)", /* Alarm CR (dev -> contr) */
guid_to_ep_str((const e_guid_t*) &ar->aruuid),
ar->inputframeid, ar->outputframeid,
- ar->controlleralarmref, ether_to_str((const guint8 *)ar->controllermac),
- ar->devicealarmref, ether_to_str((const guint8 *)ar->devicemac));
+ ar->controlleralarmref, controllermac_str,
+ ar->devicealarmref, devicemac_str);
}
else
{
@@ -9545,10 +9560,10 @@ pn_io_ar_conv_data_filter(packet_info *pinfo)
"(pn_io.alarm_src_endpoint == 0x%x && eth.src == %s) || " /* Alarm CR (contr -> dev) */
"(pn_io.alarm_src_endpoint == 0x%x && eth.src == %s)", /* Alarm CR (dev -> contr) */
guid_to_ep_str((const e_guid_t*) &ar->aruuid),
- ar->inputframeid, ether_to_str((const guint8 *)ar->devicemac), ether_to_str((const guint8 *)ar->controllermac),
- ar->outputframeid, ether_to_str((const guint8 *)ar->controllermac), ether_to_str((const guint8 *)ar->devicemac),
- ar->controlleralarmref, ether_to_str((const guint8 *)ar->controllermac),
- ar->devicealarmref, ether_to_str((const guint8 *)ar->devicemac));
+ ar->inputframeid, devicemac_str, controllermac_str,
+ ar->outputframeid, controllermac_str, devicemac_str,
+ ar->controlleralarmref, controllermac_str,
+ ar->devicealarmref, devicemac_str);
}
return buf;
}
diff --git a/plugins/wimaxasncp/packet-wimaxasncp.c b/plugins/wimaxasncp/packet-wimaxasncp.c
index 5ba7dee551..dce21816ab 100644
--- a/plugins/wimaxasncp/packet-wimaxasncp.c
+++ b/plugins/wimaxasncp/packet-wimaxasncp.c
@@ -674,7 +674,7 @@ static void wimaxasncp_proto_tree_add_ether_value(
p = tvb_get_ptr(tvb, offset, length);
ether_name = get_ether_name(p);
- ether_str = ether_to_str(p);
+ ether_str = tvb_ether_to_str(tvb, offset);
proto_tree_add_ether_format(
tree, hf_value,