aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ipx.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2015-01-06 14:54:03 -0500
committerMichael Mann <mmann78@netscape.net>2015-01-07 12:37:52 +0000
commit4088a8286d9e2dfd8f2b1c316472d768cbefec8e (patch)
treee089464bdc1b9603db474bad8f974d9df362c8bc /epan/dissectors/packet-ipx.c
parent6252074a249278fffc7e4897087564d951dc67b5 (diff)
SET_ADDRESS -> TVB_SET_ADDRESS to "hide" some of the tvb_get_ptr use.
Not all changes were able to remove their corresponding tvb_get_ptr, because there are other API dependent on the (tvb_get)pointer, but future iterations optimizing those other APIs will then be able to remove it. Change-Id: Id7cefd440b81834de1d1aace7cd0789b1c871a22 Reviewed-on: https://code.wireshark.org/review/6358 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-ipx.c')
-rw-r--r--epan/dissectors/packet-ipx.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/epan/dissectors/packet-ipx.c b/epan/dissectors/packet-ipx.c
index 4f7a411a02..6e6739eef3 100644
--- a/epan/dissectors/packet-ipx.c
+++ b/epan/dissectors/packet-ipx.c
@@ -301,8 +301,6 @@ dissect_ipx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree *ipx_tree = NULL;
proto_item *ti = NULL, *hidden_item;
- const guint8 *src_net_node, *dst_net_node;
-
guint8 ipx_hops;
char *str;
guint16 first_socket, second_socket;
@@ -334,15 +332,12 @@ dissect_ipx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* Adjust the tvbuff length to include only the IPX datagram. */
set_actual_length(tvb, ipxh->ipx_length);
- src_net_node = tvb_get_ptr(tvb, 18, 10);
- dst_net_node = tvb_get_ptr(tvb, 6, 10);
-
- SET_ADDRESS(&pinfo->net_src, AT_IPX, 10, src_net_node);
- SET_ADDRESS(&pinfo->src, AT_IPX, 10, src_net_node);
- SET_ADDRESS(&ipxh->ipx_src, AT_IPX, 10, src_net_node);
- SET_ADDRESS(&pinfo->net_dst, AT_IPX, 10, dst_net_node);
- SET_ADDRESS(&pinfo->dst, AT_IPX, 10, dst_net_node);
- SET_ADDRESS(&ipxh->ipx_dst, AT_IPX, 10, dst_net_node);
+ TVB_SET_ADDRESS(&pinfo->net_src, AT_IPX, tvb, 18, 10);
+ TVB_SET_ADDRESS(&pinfo->src, AT_IPX, tvb, 18, 10);
+ TVB_SET_ADDRESS(&ipxh->ipx_src, AT_IPX, tvb, 18, 10);
+ TVB_SET_ADDRESS(&pinfo->net_dst, AT_IPX, tvb, 6, 10);
+ TVB_SET_ADDRESS(&pinfo->dst, AT_IPX, tvb, 6, 10);
+ TVB_SET_ADDRESS(&ipxh->ipx_dst, AT_IPX, tvb, 6, 10);
col_add_str(pinfo->cinfo, COL_INFO, val_to_str_ext(ipxh->ipx_dsocket, &ipx_socket_vals_ext, "Unknown (0x%04x)"));