aboutsummaryrefslogtreecommitdiffstats
path: root/packet-ip.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-ip.c
parent4af58d8967aecdaea73d618ea7d6310183e6ffd2 (diff)
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-ip.c')
-rw-r--r--packet-ip.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/packet-ip.c b/packet-ip.c
index 84d298ae09..46f59b944a 100644
--- a/packet-ip.c
+++ b/packet-ip.c
@@ -1,7 +1,7 @@
/* packet-ip.c
* Routines for IP and miscellaneous IP protocol packet disassembly
*
- * $Id: packet-ip.c,v 1.189 2003/04/20 08:06:00 guy Exp $
+ * $Id: packet-ip.c,v 1.190 2003/04/20 11:36:13 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -120,6 +120,7 @@ static const fragment_items ip_frag_items = {
&hf_ip_fragment_multiple_tails,
&hf_ip_fragment_too_long_fragment,
&hf_ip_fragment_error,
+ &hf_ip_reassembled_in,
"fragments"
};
@@ -1033,9 +1034,14 @@ dissect_ip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
(iph->ip_off & IP_OFFSET)*8,
pinfo->iplen - pinfo->iphdrlen,
iph->ip_off & IP_MF);
- next_tvb = process_reassembled_data(tvb, pinfo, "Reassembled IPv4",
- ipfd_head, &ip_frag_items, hf_ip_reassembled_in, &update_col_info,
- ip_tree);
+
+ if (ipfd_head != NULL) {
+ next_tvb = process_reassembled_data(tvb, pinfo, "Reassembled IPv4",
+ ipfd_head, &ip_frag_items, &update_col_info, ip_tree);
+ } else {
+ /* We don't have the complete reassembled payload. */
+ next_tvb = NULL;
+ }
} else {
/* If this is the first fragment, dissect its contents, otherwise
just show it as a fragment.
@@ -1693,7 +1699,6 @@ proto_register_ip(void)
{ &hf_ip_reassembled_in,
{ "Reassembled IP in frame", "ip.reassembled_in", FT_FRAMENUM, BASE_NONE, NULL, 0x0,
"This IP packet is reassembled in this frame", HFILL }}
-
};
static gint *ett[] = {
&ett_ip,