summaryrefslogtreecommitdiff
path: root/epan/tvbuff-int.h
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2013-04-18 19:22:24 +0000
committerGuy Harris <guy@alum.mit.edu>2013-04-18 19:22:24 +0000
commitc0c15029ed8d1234c95a71fdf7510a8bf0964fcb (patch)
tree585d3be4be77a93eb5fed23814d87ced468e9df9 /epan/tvbuff-int.h
parentd89d6c8314b8a5c407f86fe0f6e029b4da582b43 (diff)
downloadwireshark-c0c15029ed8d1234c95a71fdf7510a8bf0964fcb.tar.gz
Add to tvbuffs a "fragment length" field; if the tvbuff represents the
first fragment of a non-reassembled packet, and we know the length the packet would have if it were reassembled, this field holds the length of the fragment, and the "reported length" field shows the length the packet would have if it were reassembled, so going past the end of the fragment but staying within the length of the reassembled packet can be reported as "dissection would have worked if the packet had been reassembled" rather than "the packet is too short, so it was probably malformed". Add a FragmentBoundsError exception, thrown in the "dissection would have worked if the packet had been reassembled" case. Add a new tvb_new_subset_length_fragment() routine to create a new subset tvb with specified fragment and reported lengths. Use it in the CLNP dissector. Add some more sanity checks in the CLNP dissector. svn path=/trunk/; revision=48917
Diffstat (limited to 'epan/tvbuff-int.h')
-rw-r--r--epan/tvbuff-int.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/epan/tvbuff-int.h b/epan/tvbuff-int.h
index 1dd1be90c6..33057bdd87 100644
--- a/epan/tvbuff-int.h
+++ b/epan/tvbuff-int.h
@@ -79,6 +79,12 @@ struct tvbuff {
/** Reported length. */
guint reported_length;
+ /* If this tvbuff represents the first fragment of a larger packet
+ * that was not reassembled, this is the length of the fragment
+ * ("reported_length" will be the length of the full packet).
+ */
+ guint fragment_length;
+
/* Offset from beginning of first TVBUFF_REAL. */
gint raw_offset;