diff options
author | Michael Mann <mmann78@netscape.net> | 2017-11-11 17:16:13 -0500 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2017-11-13 05:21:36 +0000 |
commit | 800b26edbe34e135cc9be1d4395db2c13ae1213f (patch) | |
tree | fae0a8da631334bde17966a4e7a6a5c0f4491f71 /epan/dissectors/packet-iuup.c | |
parent | 7c40580584eac67a23633e58810028dddc58781c (diff) |
Remove circuit API
Replace with conversation API that limits the "endpoint" to a single
uint32 value.
The intention is to eventually have "layered" endpoints, because circuit_id
was used in cases where src/dest port have already been populated (and
are used for layers above). Those src/dest ports should just be treated
as just another endpoint, but we currently only have support for one.
Change-Id: Ic6aa7ef0241275aa4dfde9459194369b48c72960
Reviewed-on: https://code.wireshark.org/review/24369
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-iuup.c')
-rw-r--r-- | epan/dissectors/packet-iuup.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/epan/dissectors/packet-iuup.c b/epan/dissectors/packet-iuup.c index 348f2b8f4a..60b63bd7c8 100644 --- a/epan/dissectors/packet-iuup.c +++ b/epan/dissectors/packet-iuup.c @@ -34,6 +34,7 @@ #include <epan/packet.h> #include <epan/prefs.h> #include <epan/expert.h> +#include <epan/conversation.h> #include <epan/crc10-tvb.h> #include <wsutil/crc10.h> #include <wsutil/crc6.h> @@ -633,7 +634,7 @@ static int dissect_iuup(tvbuff_t* tvb_in, packet_info* pinfo, proto_tree* tree, phdr &= 0x7fff; - pinfo->circuit_id = phdr; + conversation_create_endpoint_by_id(pinfo, ENDPOINT_IUUP, phdr, 0); tvb = tvb_new_subset_length(tvb_in,2,len); } @@ -668,7 +669,7 @@ static int dissect_iuup(tvbuff_t* tvb_in, packet_info* pinfo, proto_tree* tree, proto_tree_add_item(iuup_tree,hf_iuup_rfci,tvb,1,1,ENC_BIG_ENDIAN); add_hdr_crc(tvb, pinfo, iuup_tree, crccheck); add_payload_crc(tvb, pinfo, iuup_tree); - dissect_iuup_payload(tvb,pinfo,iuup_tree,second_octet & 0x3f,4,pinfo->circuit_id); + dissect_iuup_payload(tvb,pinfo,iuup_tree,second_octet & 0x3f,4, conversation_get_endpoint_by_id(pinfo, ENDPOINT_IUUP, USE_LAST_ENDPOINT)); return tvb_captured_length(tvb); case PDUTYPE_DATA_NO_CRC: col_append_fstr(pinfo->cinfo, COL_INFO," RFCI %u", (guint)(second_octet & 0x3f)); @@ -682,7 +683,7 @@ static int dissect_iuup(tvbuff_t* tvb_in, packet_info* pinfo, proto_tree* tree, proto_tree_add_item(iuup_tree,hf_iuup_rfci,tvb,1,1,ENC_BIG_ENDIAN); add_hdr_crc(tvb, pinfo, iuup_tree, crccheck); - dissect_iuup_payload(tvb,pinfo,iuup_tree,second_octet & 0x3f,3,pinfo->circuit_id); + dissect_iuup_payload(tvb,pinfo,iuup_tree,second_octet & 0x3f,3, conversation_get_endpoint_by_id(pinfo, ENDPOINT_IUUP, USE_LAST_ENDPOINT)); return tvb_captured_length(tvb); case PDUTYPE_DATA_CONTROL_PROC: if (tree) { @@ -733,7 +734,7 @@ static int dissect_iuup(tvbuff_t* tvb_in, packet_info* pinfo, proto_tree* tree, switch( second_octet & PROCEDURE_MASK ) { case PROC_INIT: add_payload_crc(tvb, pinfo, iuup_tree); - dissect_iuup_init(tvb,pinfo,iuup_tree,pinfo->circuit_id); + dissect_iuup_init(tvb,pinfo,iuup_tree, conversation_get_endpoint_by_id(pinfo, ENDPOINT_IUUP, USE_LAST_ENDPOINT)); return tvb_captured_length(tvb); case PROC_RATE: add_payload_crc(tvb, pinfo, iuup_tree); |