From d359286841fb9221400bcc64bf8bbcc88e3127fd Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Sun, 20 Apr 2003 11:36:16 +0000 Subject: Add a pointer to an hf_ value for a "reassembled_in" field (which can be null) to the "fragment_items" structure, and don't pass that value into "process_reassembled_data()", just have it use the value in the "fragment_items" structure passed to it. Make "process_reassembled_data()" capable of handling reassembly done by "fragment_add_seq_check()", and use it in the ATP and 802.11 dissectors; give them "reassembled_in" fields. Make "process_reassembled_data()" handle only the case of a completed reassembly (fd_head != NULL) so that we can use it in those dissectors without gunking the code up too much. svn path=/trunk/; revision=7513 --- packet-clnp.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'packet-clnp.c') diff --git a/packet-clnp.c b/packet-clnp.c index 35f9b1375d..1e1912c27a 100644 --- a/packet-clnp.c +++ b/packet-clnp.c @@ -1,7 +1,7 @@ /* packet-clnp.c * Routines for ISO/OSI network and transport protocol packet disassembly * - * $Id: packet-clnp.c,v 1.72 2003/04/20 08:06:00 guy Exp $ + * $Id: packet-clnp.c,v 1.73 2003/04/20 11:36:13 guy Exp $ * Laurent Deniel * Ralf Schneider * @@ -92,6 +92,7 @@ static const fragment_items clnp_frag_items = { &hf_clnp_segment_multiple_tails, &hf_clnp_segment_too_long_segment, &hf_clnp_segment_error, + &hf_clnp_reassembled_in, "segments" }; @@ -1885,9 +1886,14 @@ static void dissect_clnp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) clnp_reassembled_table, segment_offset, segment_length - cnf_hdr_len, cnf_type & CNF_MORE_SEGS); - next_tvb = process_reassembled_data(tvb, pinfo, "Reassembled CLNP", - fd_head, &clnp_frag_items, hf_clnp_reassembled_in, &update_col_info, - clnp_tree); + + if (fd_head != NULL) { + next_tvb = process_reassembled_data(tvb, pinfo, "Reassembled CLNP", + fd_head, &clnp_frag_items, &update_col_info, clnp_tree); + } else { + /* We don't have the complete reassembled payload. */ + next_tvb = NULL; + } } else { /* If this is the first segment, dissect its contents, otherwise just show it as a segment. -- cgit v1.2.3