summaryrefslogtreecommitdiff
path: root/epan/tvbuff.h
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2002-07-17 06:55:29 +0000
committerGuy Harris <guy@alum.mit.edu>2002-07-17 06:55:29 +0000
commit47b147ffd119809198871932874f6fc5b7e6e836 (patch)
treee3040460a5348a10bfe0cba753a7eec70fb5349b /epan/tvbuff.h
parentcc00331455604ca51fa743a4f73f5c899c023a67 (diff)
downloadwireshark-47b147ffd119809198871932874f6fc5b7e6e836.tar.gz
Add an extra argument to "tvb_find_line_end()", which specifies what it
should do if it doesn't find an EOL; if FALSE, it behaves as before, returning values that treat the line as ending at the end of the tvbuff, and if TRUE, it returns -1, so its caller can do segment reassembly until it gets the EOL. Add an option to the SMTP dissector to do segment reassembly, and do segment reassembly of the first line. svn path=/trunk/; revision=5891
Diffstat (limited to 'epan/tvbuff.h')
-rw-r--r--epan/tvbuff.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/epan/tvbuff.h b/epan/tvbuff.h
index 4b96f2a519..e770ed98ad 100644
--- a/epan/tvbuff.h
+++ b/epan/tvbuff.h
@@ -9,7 +9,7 @@
* the data of a backing tvbuff, or can be a composite of
* other tvbuffs.
*
- * $Id: tvbuff.h,v 1.27 2002/05/13 01:24:47 guy Exp $
+ * $Id: tvbuff.h,v 1.28 2002/07/17 06:55:24 guy Exp $
*
* Copyright (c) 2000 by Gilbert Ramirez <gram@alumni.rice.edu>
*
@@ -341,10 +341,20 @@ extern gint tvb_get_nstringz0(tvbuff_t *tvb, gint offset, guint maxlength,
* specified offset in the tvbuff, going no further than the specified
* length.
*
- * Return the offset right past the end of the line as the return value,
- * and return the offset of the EOL character(s) in "*eol".
+ * Return the length of the line (not counting the line terminator at
+ * the end), or, if we don't find a line terminator:
+ *
+ * if "deseg" is true, return -1;
+ *
+ * if "deseg" is false, return the amount of data remaining in
+ * the buffer.
+ *
+ * Set "*next_offset" to the offset of the character past the line
+ * terminator, or past the end of the buffer if we don't find a line
+ * terminator. (It's not set if we return -1.)
*/
-extern gint tvb_find_line_end(tvbuff_t *tvb, gint offset, int len, gint *eol);
+extern gint tvb_find_line_end(tvbuff_t *tvb, gint offset, int len,
+ gint *next_offset, gboolean desegment);
/*
* Given a tvbuff, an offset into the tvbuff, and a length that starts