aboutsummaryrefslogtreecommitdiffstats
path: root/packet-atalk.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2003-04-20 11:36:16 +0000
committerGuy Harris <guy@alum.mit.edu>2003-04-20 11:36:16 +0000
commitd359286841fb9221400bcc64bf8bbcc88e3127fd (patch)
tree7ed0620519b78e1ad0b8f6a83d488e1dd856bb3f /packet-atalk.c
parent4af58d8967aecdaea73d618ea7d6310183e6ffd2 (diff)
downloadwireshark-d359286841fb9221400bcc64bf8bbcc88e3127fd.tar.gz
wireshark-d359286841fb9221400bcc64bf8bbcc88e3127fd.tar.bz2
wireshark-d359286841fb9221400bcc64bf8bbcc88e3127fd.zip
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
Diffstat (limited to 'packet-atalk.c')
-rw-r--r--packet-atalk.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/packet-atalk.c b/packet-atalk.c
index 5a56dc24aa..67bbc07b13 100644
--- a/packet-atalk.c
+++ b/packet-atalk.c
@@ -2,7 +2,7 @@
* Routines for AppleTalk packet disassembly: LLAP, DDP, NBP, ATP, ASP,
* RTMP.
*
- * $Id: packet-atalk.c,v 1.87 2003/03/05 07:17:49 guy Exp $
+ * $Id: packet-atalk.c,v 1.88 2003/04/20 11:36:11 guy Exp $
*
* Simon Wilkinson <sxw@dcs.ed.ac.uk>
*
@@ -127,6 +127,7 @@ static int hf_atp_segment_overlap_conflict = -1;
static int hf_atp_segment_multiple_tails = -1;
static int hf_atp_segment_too_long_segment = -1;
static int hf_atp_segment_error = -1;
+static int hf_atp_reassembled_in = -1;
/* ------------------------- */
static int proto_zip = -1;
@@ -346,6 +347,7 @@ static const fragment_items atp_frag_items = {
&hf_atp_segment_multiple_tails,
&hf_atp_segment_too_long_segment,
&hf_atp_segment_error,
+ &hf_atp_reassembled_in,
"segments"
};
@@ -857,14 +859,8 @@ dissect_atp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
more_fragment);
if (fd_head != NULL) {
if (fd_head->next != NULL) {
- new_tvb = tvb_new_real_data(fd_head->data, fd_head->len, fd_head->len);
- tvb_set_child_real_data_tvbuff(tvb, new_tvb);
- add_new_data_source(pinfo, new_tvb, "Reassembled ATP");
- /* Show all fragments. */
- if (tree) {
- show_fragment_seq_tree(fd_head, &atp_frag_items,
- atp_tree, pinfo, new_tvb);
- }
+ new_tvb = process_reassembled_data(tvb, pinfo, "Reassembled ATP",
+ fd_head, &atp_frag_items, NULL, atp_tree);
}
else
new_tvb = tvb_new_subset(tvb, ATP_HDRSIZE -1, -1, -1);
@@ -1965,6 +1961,10 @@ proto_register_atalk(void)
{ &hf_atp_segments,
{ "ATP Fragments", "atp.fragments", FT_NONE, BASE_NONE,
NULL, 0x0, "ATP Fragments", HFILL }},
+
+ { &hf_atp_reassembled_in,
+ { "Reassembled ATP in frame", "atp.reassembled_in", FT_FRAMENUM, BASE_NONE, NULL, 0x0,
+ "This ATP packet is reassembled in this frame", HFILL }}
};
static hf_register_info hf_asp[] = {