Ethereal-dev: [Ethereal-dev] Slice and matches/contains operators

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

From: Biot Olivier <Olivier.Biot@xxxxxxxxxxx>
Date: Thu, 1 Jan 2004 17:52:23 +0100
Hi list,

Today it is not possible to perform a matches or contains operation on a
slice: the dfilter processor tries to convert the 2nd operand of the
matches/contains operator into a byte sequence, and it fails in
epan/ftypes/ftypes.c in in fvalue_from_string().

I updated epan/dfilter/semcheck.c so the matches operator now also works on
slices. This means something like http[3:10] matches "cgi" now works.

I also updated epan/ftypes/ftype-bytes.c in order to allow the contains
operator to operate on slices where the 2nd operand is a string which can
now be converted to a byte sequence.

Regards,

Olivier