aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/wimax/mac_hd_generic_decoder.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2013-03-22 23:59:54 +0000
committerGuy Harris <guy@alum.mit.edu>2013-03-22 23:59:54 +0000
commita2414d8909088ddb40c907886e725993e6baecb5 (patch)
tree53f0ebac8baa171f4317c7eb502a354da8596c72 /plugins/wimax/mac_hd_generic_decoder.c
parent3295912210fa1a8d7d0b1a18aa7c100f27905ed1 (diff)
Don't wire into the reassembly code the notion that reassemblies should
be done on flows from one address to another; reassembly for protocols running atop TCP should be done on flows from one TCP endpoint to another. We do this by: adding "reassembly table" as a data structure; associating hash tables for both in-progress reassemblies and completed reassemblies with that data structure (currently, not all reassemblies use the latter; they might keep completed reassemblies in the first table); having functions to create and destroy keys in that table; offering standard routines for doing address-based and address-and-port-based flow processing, so that dissectors not needing their own specialized flow processing can just use them. This fixes some mis-reassemblies of NIS YPSERV YPALL responses (where the second YPALL response is processed as if it were a continuation of a previous response between different endpoints, even though said response is already reassembled), and also allows the DCE RPC-specific stuff to be moved out of epan/reassembly.c into the DCE RPC dissector. svn path=/trunk/; revision=48491
Diffstat (limited to 'plugins/wimax/mac_hd_generic_decoder.c')
-rw-r--r--plugins/wimax/mac_hd_generic_decoder.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/plugins/wimax/mac_hd_generic_decoder.c b/plugins/wimax/mac_hd_generic_decoder.c
index 9c812df956..edd4545ea9 100644
--- a/plugins/wimax/mac_hd_generic_decoder.c
+++ b/plugins/wimax/mac_hd_generic_decoder.c
@@ -87,7 +87,7 @@ static gint extended_subheader_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_
static gint arq_feedback_payload_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *parent_item);
/* Static variables */
-static GHashTable *payload_frag_table = NULL;
+static reassembly_table payload_reassembly_table;
gint proto_mac_header_generic_decoder = -1;
static gint ett_mac_header_generic_decoder = -1;
@@ -598,7 +598,8 @@ void wimax_defragment_init(void)
{
gint i;
- fragment_table_init(&payload_frag_table);
+ reassembly_table_init(&payload_reassembly_table,
+ &addresses_reassembly_table_functions);
/* Init fragmentation variables. */
for (i = 0; i < MAX_CID; i++)
@@ -1073,7 +1074,7 @@ void dissect_mac_header_generic_decoder(tvbuff_t *tvb, packet_info *pinfo, proto
/* Use dl_src and dl_dst in defrag. */
pinfo->src = pinfo->dl_src;
pinfo->dst = pinfo->dl_dst;
- payload_frag = fragment_add_seq(tvb, offset, pinfo, cid, payload_frag_table, frag_number[cid_index], frag_len, ((frag_type==LAST_FRAG)?0:1));
+ payload_frag = fragment_add_seq(&payload_reassembly_table, tvb, offset, pinfo, cid, NULL, frag_number[cid_index], frag_len, ((frag_type==LAST_FRAG)?0:1), 0);
/* Restore address pointers. */
pinfo->src = save_src;
pinfo->dst = save_dst;