Ethereal-dev: [Ethereal-dev] ABS/REL time in display filters

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

From: "Ronnie Sahlberg" <rsahlber@xxxxxxxxxxxxxx>
Date: Wed, 30 May 2001 18:45:48 +1000
Hi list

Attached is an updated ftype-time.c .

This update makes it possible to use absolute and relative time fields in
display filters.

There are two issues with the patch:
relative time:
when applying a display filter, the frame.time_delta field of the frame
layer is changed
to be the delta between the displayed frames and not the captured frames.
This means that the display filter only really works once.
This is a "feature" of the behaviour in file.c and not really this patch.

absolute time:
The patch will not compile properly or work as it is since it uses the
function strptime() which
is nonstandard.
To get it working under Linux one needs to include <time.h> and set some
defines so the prototype is
included properly, I did this under Linux and it seems to work.
I guess there are different ways to include this prototype on other
implementations.
Perhaps configure can be used to set this up properly on all platforms,
perhaps not, I dont know
how configure is configured or how it works.
Alternatively: one can remove the function absolute_val_from_string() from
the file.

Please use your own judgement in what parts of this patch to use.

Attachment: ftype-time.c
Description: Binary data