aboutsummaryrefslogtreecommitdiffstats
path: root/epan/tvbuff-int.h
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2018-04-19 19:56:34 -0700
committerGuy Harris <guy@alum.mit.edu>2018-04-20 02:58:36 +0000
commitd5dc4677edf5c44165a1a23efcd796bfa1b74d27 (patch)
treefd50a89b4962711326ac9ff947aa7f3d9b652d51 /epan/tvbuff-int.h
parentb545c60658143a730619df7b6c6f6df2f22e6398 (diff)
Update some comments.
We no longer have TVBUFF_ values corresponding to different types of tvbuff; we have, instead, a set of method pointers for the different types. Refer to the types by name, rather than by TVBUFF_ value. Expand the description of some fields in the tvbuff structure. Change-Id: I38b5281df247ddd66b4e39abfc129053a012d241 Reviewed-on: https://code.wireshark.org/review/27036 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/tvbuff-int.h')
-rw-r--r--epan/tvbuff-int.h24
1 files changed, 16 insertions, 8 deletions
diff --git a/epan/tvbuff-int.h b/epan/tvbuff-int.h
index 38391e0295..6a5c1d4490 100644
--- a/epan/tvbuff-int.h
+++ b/epan/tvbuff-int.h
@@ -42,21 +42,29 @@ struct tvbuff {
guint flags;
struct tvbuff *ds_tvb; /**< data source top-level tvbuff */
- /** We're either a TVBUFF_REAL_DATA or a
- * TVBUFF_SUBSET that has a backing buffer that
- * has real_data != NULL, or a TVBUFF_COMPOSITE
- * which has flattened its data due to a call
- * to tvb_get_ptr().
+ /** Pointer to the data for this tvbuff.
+ * It might be null, which either means that 1) it's a
+ * zero-length tvbuff or 2) the tvbuff was lazily
+ * constructed, so that we don't allocate a buffer of
+ * backing data and fill it in unless we need that
+ * data, e.g. when tvb_get_ptr() is called.
*/
const guint8 *real_data;
- /** Length of virtual buffer (and/or real_data). */
+ /** Amount of data that's available from the capture
+ * file. This is the length of virtual buffer (and/or
+ * real_data). It may be less than the reported
+ * length if this is from a packet that was cut short
+ * by the capture process. */
guint length;
- /** Reported length. */
+ /** Amount of data that was reported as being in
+ * the packet or other data that this represents.
+ * As indicated above, it may be greater than the
+ * amount of data that's available. */
guint reported_length;
- /* Offset from beginning of first TVBUFF_REAL. */
+ /* Offset from beginning of first "real" tvbuff. */
gint raw_offset;
};