diff options
author | Michael Mann <mmann78@netscape.net> | 2017-11-02 20:55:23 -0400 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2017-11-05 23:17:32 +0000 |
commit | 23afd28daf7a8ccbdba395e83fed79c0ca352f50 (patch) | |
tree | 6d012d4a832beea463e329cdeb85e45f03bf925b /epan/dissectors/packet-tipc.c | |
parent | 08bf89f4877b65a6a31c33023d8022bf9d94d1b6 (diff) |
Convert TIPC to use endpoint conversations
Change-Id: Iab03ebbfc982bf7182851f63c17fa59bc71d7709
Reviewed-on: https://code.wireshark.org/review/24219
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-tipc.c')
-rw-r--r-- | epan/dissectors/packet-tipc.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/epan/dissectors/packet-tipc.c b/epan/dissectors/packet-tipc.c index 8cbefbd99e..3dd4289814 100644 --- a/epan/dissectors/packet-tipc.c +++ b/epan/dissectors/packet-tipc.c @@ -2141,7 +2141,7 @@ dissect_tipc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_ proto_item *ti, *item; proto_tree *tipc_tree, *tipc_data_tree; int offset = 0; - guint32 dword; + guint32 srcport, destport = 0, dword; guint8 version; guint32 msg_size; guint8 hdr_size; @@ -2293,16 +2293,14 @@ dissect_tipc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_ break; } - dword = tvb_get_ntohl(tipc_tvb, offset); - pinfo->ptype = PT_TIPC; - pinfo->srcport = dword; - proto_tree_add_item(tipc_tree, hf_tipc_org_port, tipc_tvb, offset, 4, ENC_BIG_ENDIAN); + proto_tree_add_item_ret_uint(tipc_tree, hf_tipc_org_port, tipc_tvb, offset, 4, ENC_BIG_ENDIAN, &srcport); offset = offset + 4; if (user != TIPC_NAME_DISTRIBUTOR) { - dword = tvb_get_ntohl(tipc_tvb, offset); - pinfo->destport = dword; - proto_tree_add_item(tipc_tree, hf_tipc_dst_port, tipc_tvb, offset, 4, ENC_BIG_ENDIAN); + proto_tree_add_item_ret_uint(tipc_tree, hf_tipc_dst_port, tipc_tvb, offset, 4, ENC_BIG_ENDIAN, &destport); } + + conversation_create_endpoint(pinfo, &pinfo->src, &pinfo->dst, ENDPOINT_TIPC, srcport, destport, 0); + offset = offset + 4; /* 20 - 24 Bytes 20 bytes: Used in subnetwork local, connection oriented messages, where error code, reroute |