Ethereal-dev: Re: [Ethereal-dev] Where is tvb_find_line_end documented?

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Laurent Deniel <laurent.deniel@xxxxxxx>
Date: Tue, 11 Mar 2003 20:41:38 +0100
Yaniv Kaul wrote:
> 
> I stumble from time to time in tvb* functions that are not documented.
> Any idea where tvb_find_line_end is documented, for example?
> (Found it in packet-imap.c, while trying to understand why it does not
> fully dissect IMAP responses with multiple lines).

Like all other tvbuff functions in epan/tvbuff.h :

/*
 * Given a tvbuff, an offset into the tvbuff, and a length that starts
 * at that offset (which may be -1 for "all the way to the end of the
 * tvbuff"), find the end of the (putative) line that starts at the
 * specified offset in the tvbuff, going no further than the specified
 * length.
 *
 * 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 *next_offset, gboolean desegment);

--
Laurent DENIEL        | E-mail: laurent.deniel<at>free.fr
Paris, FRANCE         |         laurent.deniel<at>thalesatm.com
   All above opinions are personal, unless stated otherwise.