aboutsummaryrefslogtreecommitdiffstats
path: root/epan/tvbuff.h
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2002-07-17 06:55:29 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2002-07-17 06:55:29 +0000
commitfc616618cac99301b5e51d05a94a9582c37c3dca (patch)
treee3040460a5348a10bfe0cba753a7eec70fb5349b /epan/tvbuff.h
parent60f24595ad782fcd02f0179dbf6b84ecb8b26a36 (diff)
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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@5891 f5534014-38df-0310-8fa8-9805f1628bb7
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