Commit Graph

516 Commits

Author SHA1 Message Date
João Valverde fe7bfdf6ca CMake: Require explicit installation of development headers
Develpment headers are a sizeable part of the binary installation
and most users won't ever require them. It's recommended to package
them separately in a devel package or SDK.

Create a CMake installation component for development headers
and add the EXCLUDE_FROM_ALL property.

Headers can be installed using the invocation:

    cmake --install <dir> --component Development
2023-01-18 03:35:13 +00:00
João Valverde e77d716411 dfilter: Print CIDR mask for IPv4/IPv6 field types. 2023-01-06 01:15:10 +00:00
João Valverde f37c7c4062 dfilter: Tweak representation for length-1 byte array
Make dfilter byte representation always use ':' for consistency.

Make 1 byte be represented as "XX:" with the colon suffix to
make it nonambiguous that is is a byte and not other type,
like a protocol.

The difference is can be seen in the following programs. In the
before representation it is not obvious at all that the second
"fc" value is a literal bytes value and not the value of the
protocol "fc", although it can be inferred from the lack of
a READ_TREE instruction. In the After we know that "fc:" must
be bytes and not a protocol.

Note that a leading colon is a syntactical expedient to say
"this value with any type is a literal value and not a protocol
field." A terminating colon is just a part of the dfilter
literal bytes syntax.

Before:

Filter: fc == :fc

Syntax tree:
 0 TEST_ANY_EQ:
   1 FIELD(fc <FT_PROTOCOL>)
   1 FVALUE(fc <FT_PROTOCOL>)

Instructions:
00000 READ_TREE		fc <FT_PROTOCOL> -> reg#0
00001 IF_FALSE_GOTO	3
00002 ANY_EQ		reg#0 == fc <FT_PROTOCOL>

After:

Filter: fc == :fc

Syntax tree:
 0 TEST_ANY_EQ:
   1 FIELD(fc <FT_PROTOCOL>)
   1 FVALUE(fc: <FT_PROTOCOL>)

Instructions:
00000 READ_TREE		fc <FT_PROTOCOL> -> reg#0
00001 IF_FALSE_GOTO	3
00002 ANY_EQ		reg#0 == fc: <FT_PROTOCOL>
2023-01-02 02:54:38 +00:00
João Valverde 76a6e2a2bf ftypes: Do not sanitize strings for UTF-8 errors
The ftype itself is encoding agnostic. In the case of literal
display filter strings it is possible and legal to contain
invalid UTF-8.

Maybe it shouldn't be but that requires a user-friendly diagnostic
message, not silently sanitizing the string as is done currently
(only a debug message is printed in that case).

Do the debug checks in proto_tree_set_string() instead. That
still detects dissector code that might need fixing, which was
the purpose for this check.

Improve documentation and add admonition for proto_tree_add_string().

Ping #18521.
2022-10-26 16:23:55 +01:00
João Valverde 3b803a94c7 ftypes: Cleanup code to parse integers
Replace strtol/strtoul with the glib functions that do
not have a locale dependency.

Cleanup some casts and print formats. Remove some code
duplication. Add some null checks.

Rename a function for consistency.
2022-10-10 17:24:52 +00:00
João Valverde 7b4abf8341 dfilter: Fix integer comparison on big-endian
Fix copy-paste mistake to use the correct struct field.

Fixes #12236.
2022-10-08 16:50:10 +01:00
João Valverde 51320ae59b wsutil: Improve UTF-8 APIs for debugging
In particular add an UTF-8 specific wslog API that should
make it easier to interpret invalid encodings.
2022-10-05 19:34:47 +01:00
João Valverde 32befe119d Add a log domain for encoding errors and lower the log level
Using a warning is probably too exalted for the current state
of the code, where UTF-8 errors are somewhat expected from
dissectors that are lax about input validation.

Use a debug level with its own "UTF-8" domain instead.

Using a dedicated domain allows to filter on encoding errors and
with some enhancements to the logging subsystem make them fatal
for tracking and debugging purposes.

Using a dedicated domain might have other drawbacks but for now
it seems like the best approach.
2022-09-28 14:57:51 +01:00
João Valverde 6d06d4e46b Add some UTF-8 debug checks with a compile time flag
Some older dissectors that predate Unicode and parse text protocols
are prone to generate invalid UTF-8 strings. This is a bug and can have
safety implications.

For example passing invalid UTF-8 to proto_tree_add_string() is a
common bug. There are safeguards in format_text() but this should
not be relied on as a general solution to the problem.

For one, as the name implies, it is only used with representation of a
field value, which is not the same as the value itself of an FT_STRING field.
Issue #18317 shows another reason why.

For now this compile flag only enables extra checks for string ftypes,
which covers a subset of proto.h APIs including
proto_tree_append_string(). Later is should be extended to other
interfaces.

This is also not expected to be disabled for release builds because
there are still many dissectors that do not correctly handle strings.
More work is needed to 1) identify them and 2) fix them.

Ping #18317
2022-09-27 17:04:44 +00:00
João Valverde 0816e317cb dfilter: Fix crash with FT_NONE and arithmetic expressions
Do the first ftype-can check in an arithmetic expressions before
evaluating the second term to be sure we do not allow FT_NONE as a
valid LHS ftype.

$ dftest '_ws.ftypes.none + 1 == 2'
Filter: _ws.ftypes.none + 1 == 2
dftest: FT_NONE cannot +.
	_ws.ftypes.none + 1 == 2
	^~~~~~~~~~~~~~~
2022-07-28 16:50:09 +00:00
João Valverde 5f85c1f8aa dfilter: Use an exact floating-point string representation
The FTREPR_DFILTER format for floating-point numbers
is using an inexact representation so using "apply as
filter" on a floating-point protocol field does not produce a
match, as could be reasonably expected, because we don't
get back the same floating-point number.

Using g_ascii_dtostr() instead produces a string with enough
precision to get back the same machine number with IEEE 754 doubles.

Fixes #16483.
2022-07-23 01:08:31 +01:00
Alexis La Goutte 1ca19b3c38 Fix -Wmissing-prototypes found by Clang
ftype-double.c:89:1: warning: no previous prototype for function 'val_unary_minus'
ftype-double.c:96:1: warning: no previous prototype for function 'val_add'
ftype-double.c:103:1: warning: no previous prototype for function 'val_subtract'
ftype-double.c:110:1: warning: no previous prototype for function 'val_multiply'
ftype-double.c:117:1: warning: no previous prototype for function 'val_divide'
ftype-integer.c:670:1: warning: no previous prototype for function 'uint_bitwise_and'
ftype-integer.c:677:1: warning: no previous prototype for function 'uint_is_zero'
ftype-integer.c:683:1: warning: no previous prototype for function 'uint_is_negative'
ftype-integer.c:689:1: warning: no previous prototype for function 'uint_unary_minus'
ftype-integer.c:704:1: warning: no previous prototype for function 'uint64_bitwise_and'
ftype-integer.c:711:1: warning: no previous prototype for function 'uint64_is_zero'
ftype-integer.c:717:1: warning: no previous prototype for function 'uint64_is_negative'
ftype-integer.c:723:1: warning: no previous prototype for function 'uint64_unary_minus'
ftype-integer.c:738:1: warning: no previous prototype for function 'sint_bitwise_and'
ftype-integer.c:745:1: warning: no previous prototype for function 'sint_is_zero'
ftype-integer.c:751:1: warning: no previous prototype for function 'sint_is_negative'
ftype-integer.c:757:1: warning: no previous prototype for function 'sint_unary_minus
ftype-integer.c:764:1: warning: no previous prototype for function 'sint64_bitwise_and'
ftype-integer.c:771:1: warning: no previous prototype for function 'sint64_is_zero'
ftype-integer.c:777:1: warning: no previous prototype for function 'sint64_is_negative'
ftype-integer.c:783:1: warning: no previous prototype for function 'sint64_unary_minus'
packet-bpv6.c:2182:1: warning: no previous prototype for function 'proto_register_bpv6'
packet-bpv6.c:2766:1: warning: no previous prototype for function 'proto_reg_handoff_bpv6'
packet-bpv7.c:1978:6: warning: no previous prototype for function 'proto_register_bpv7'
packet-bpv7.c:2037:6: warning: no previous prototype for function 'proto_reg_handoff_bpv7'
packet-realtek.c:349:1: warning: no previous prototype for function 'proto_register_realtek'
packet-realtek.c:436:1: warning: no previous prototype for function 'proto_reg_handoff_realtek'
packet-tcpcl.c:2147:1: warning: no previous prototype for function 'proto_register_tcpclv3'
packet-tcpcl.c:2211:1: warning: no previous prototype for function 'proto_reg_handoff_tcpclv3'
2022-07-15 13:45:52 +00:00
João Valverde 4c975b770e dfilter: Improve compatibility of integer types
Before:

$ dftest '_ws.ftypes.int64 == _ws.ftypes.int8'
Filter: _ws.ftypes.int64 == _ws.ftypes.int8
dftest: _ws.ftypes.int64 and _ws.ftypes.int8 are not of compatible types.
	_ws.ftypes.int64 == _ws.ftypes.int8
	                    ^~~~~~~~~~~~~~~

After:

$ dftest '_ws.ftypes.int64 == _ws.ftypes.int8'
Filter: _ws.ftypes.int64 == _ws.ftypes.int8

Syntax tree:
 0 TEST_ANY_EQ:
   1 FIELD(_ws.ftypes.int64 <FT_INT64>)
   1 FIELD(_ws.ftypes.int8 <FT_INT8>)

Instructions:
00000 READ_TREE		_ws.ftypes.int64 <FT_INT64> -> reg#0
00001 IF_FALSE_GOTO	5
00002 READ_TREE		_ws.ftypes.int8 <FT_INT8> -> reg#1
00003 IF_FALSE_GOTO	5
00004 ANY_EQ		reg#0 === reg#1
00005 RETURN
2022-07-14 20:12:30 +00:00
João Valverde e9e6431d7b dfilter: Change boolean string representation
Use "True" or "TRUE" instead of "true" and remove case insensivity.
Same for false. This should serve to differentiate booleans a bit
more from protocol names, which should be using lower-case.
2022-06-25 13:02:34 +01:00
Gerald Combs 3b0d9194bc Docs: Update the ftype description list in wireshark-filter(4).
Update a couple of ftype descriptions and update the list in the
wireshark-filter man page.
2022-06-21 14:33:45 -07:00
João Valverde 47348ae598 dfilter: Add support for literal strings with null bytes
Before:
    Filter: frame matches "abc\x00def"
    dftest: \x00 (NUL byte) cannot be used with a regular string.
    	frame matches "abc\x00def"
    	                  ^~~~
    Filter: _ws.ftypes.string == "a string with a \0 byte"
    dftest: \0 (NUL byte) cannot be used with a regular string.
    	_ws.ftypes.string == "a string with a \0 byte"
    	                                      ^~

After:
    Filter: frame matches "abc\x00def"

    Syntax tree:
     0 TEST_MATCHES:
       1 FIELD(frame)
       1 PCRE(abc\0def)

    Instructions:
    00000 READ_TREE		frame -> reg#0
    00001 IF_FALSE_GOTO	3
    00002 ANY_MATCHES	reg#0 matches abc\0def
    00003 RETURN

    Filter: _ws.ftypes.string == "a string with a \0 byte"

    Syntax tree:
     0 TEST_ANY_EQ:
       1 FIELD(_ws.ftypes.string)
       1 FVALUE("a string with a \0 byte" <FT_STRING>)

    Instructions:
    00000 READ_TREE		_ws.ftypes.string -> reg#0
    00001 IF_FALSE_GOTO	3
    00002 ANY_EQ		reg#0 == "a string with a \0 byte" <FT_STRING>
    00003 RETURN

Fixes issue #16156.
2022-06-21 15:10:08 +00:00
João Valverde cbd3c44776 ftypes: Add FT_UINT_STRING to IS_FT_STRING() macro 2022-06-20 20:35:47 +01:00
João Valverde e42a4de47c ftypes: Fix an error message 2022-06-20 17:55:56 +00:00
João Valverde 0615ba6317 ftypes: Make accessor functions type safe 2022-06-20 17:29:57 +00:00
João Valverde 94fe2b195c Try to fix some warnings.
[1638/2312] Building C object epan/ftypes/CMakeFiles/ftypes.dir/ftype-protocol.c.o
FAILED: epan/ftypes/CMakeFiles/ftypes.dir/ftype-protocol.c.o
/usr/bin/ccache /usr/bin/cc -DG_DISABLE_DEPRECATED -DG_DISABLE_SINGLE_INCLUDES -DWS_BUILD_DLL -I. -I../ -I../include -Iepan/ftypes -I../epan/ftypes -I../epan -isystem /usr/include/glib-2.0 -isystem /usr/lib/x86_64-linux-gnu/glib-2.0/include -fvisibility=hidden  -fexcess-precision=fast -Wall -Wextra -Wendif-labels -Wpointer-arith -Wformat-security -fwrapv -fno-strict-overflow -Wvla -Waddress -Wattributes -Wdiv-by-zero -Wignored-qualifiers -Wpragmas -Wno-overlength-strings -Wno-long-long -Wredundant-decls -Wno-error=maybe-uninitialized -Wno-format-truncation -Wframe-larger-than=32768 -fdiagnostics-color=always -Wunused-const-variable -Wshadow -Wold-style-definition -Wstrict-prototypes -Wlogical-op -Wjump-misses-init -Werror=implicit -Wno-pointer-sign  -fmacro-prefix-map=/builds/wireshark/wireshark/= -fmacro-prefix-map=/builds/wireshark/wireshark/build/= -fmacro-prefix-map=../= -O2 -g -DNDEBUG -fPIC   -std=gnu11 -Werror -MD -MT epan/ftypes/CMakeFiles/ftypes.dir/ftype-protocol.c.o -MF epan/ftypes/CMakeFiles/ftypes.dir/ftype-protocol.c.o.d -o epan/ftypes/CMakeFiles/ftypes.dir/ftype-protocol.c.o   -c ../epan/ftypes/ftype-protocol.c
../epan/ftypes/ftype-protocol.c: In function ‘_tvbcmp’:
../epan/ftypes/ftype-protocol.c:248:62: error: operand of ?: changes signedness from ‘int’ to ‘guint’ {aka ‘unsigned int’} due to unsignedness of other operand [-Werror=sign-compare]
  248 |  guint a_len = a->length < 0 ? tvb_captured_length(a->tvb) : a->length;
      |                                                              ^~~~~~~~~
../epan/ftypes/ftype-protocol.c:249:62: error: operand of ?: changes signedness from ‘int’ to ‘guint’ {aka ‘unsigned int’} due to unsignedness of other operand [-Werror=sign-compare]
  249 |  guint b_len = b->length < 0 ? tvb_captured_length(b->tvb) : b->length;
      |                                                              ^~~~~~~~~
../epan/ftypes/ftype-protocol.c: In function ‘slice’:
../epan/ftypes/ftype-protocol.c:224:60: error: argument ‘length’ might be clobbered by ‘longjmp’ or ‘vfork’ [-Werror=clobbered]
  224 | slice(fvalue_t *fv, GByteArray *bytes, guint offset, guint length)
      |                                                      ~~~~~~^~~~~~
cc1: all warnings being treated as errors
2022-05-23 23:04:07 +01:00
João Valverde 51de43cfd2 dfilter: Fix protocol slices with negative indexes
Field infos have a length property that was not stored with the
field value so when using a negative index the end was computed
from the captured length of the frame tvbuff, leading to incorrect
results. The documentation in wireshark-filter(5) describes how
this was supposed to work but as far as I can tell it never worked
properly.

We now store the length and use that (when it is different from -1)
to locate the end of the protocol data in the tvbuff. An extra wrinkle
is that sometimes the length is set after the field value is created.
This is the most common case as the majority of protocols have a
variable length and dissection generally proceeds with a TVB subset from
the current layer (with offset zero) through all remaining layers to the
end of the captured length. For that reason we must use an expedient to allow
changing the protocol length of an existing protocol fvalue, whenever
proto_item_set_len() is called.

Fixes #17772.
2022-05-23 23:04:07 +01:00
João Valverde 92c1519dfe dfilter: Add float multiplication/division 2022-04-18 17:09:05 +01:00
João Valverde eb2a9889c3 dfilter: Add abs() function
Add an absolute value function for ftypes.
2022-04-18 17:09:00 +01:00
João Valverde 03e41d4950 ftypes: Fix a macro argument 2022-04-12 09:41:58 +01:00
João Valverde cc5726b63f dfilter: Remove leading colon special meaning
Instead of saying a leading colon will make any token a literal
value, say it is part of the syntax of bytes arrays. This is
useful to write bytes without a separator, and other potentially
ambiguous formats.

The restriction in meaning to bytes and simple numeric values
should make the rules for handling a leading colon (specifically
ommiting it or not) saner without much loss of functionality.
2022-04-07 00:16:07 +01:00
João Valverde 8108e67de7 dfilter: Fix memory leak with leading colon
When retrying fvalue_from_literal() we were leaking the error
message string.

Refactor the code to avoid the retry. This assumes the only
valid use of a leading ':' with a literal is for an IPv6 address.

Bytes with leading ':' are supported but the colon is skipped,
so the parser doesn't see it.

Fixes df0fc8b517.
2022-04-06 18:09:12 +01:00
João Valverde 70582b84f6 dfilter: Allow parsing binary number as a byte array of len 1
Before:

    Filter: eth[0] == 0b00110011

    Instructions:
    00000 READ_TREE		eth -> reg#0
    00001 IF_FALSE_GOTO	4
    00002 MK_RANGE		reg#0[reg#1] -> 0:1
    00003 ANY_EQ		reg#1 == 0b:00:11:00:11 <FT_BYTES>
    00004 RETURN

After:

    Filter: eth[0] == 0b00110011

    Instructions:
    00000 READ_TREE		eth -> reg#0
    00001 IF_FALSE_GOTO	4
    00002 MK_RANGE		reg#0[reg#1] -> 0:1
    00003 ANY_EQ		reg#1 == 33 <FT_BYTES>
    00004 RETURN
2022-04-04 02:02:58 +00:00
João Valverde a81617fda5 Fix build on CentOS 7
CentOS 7 has an old version of GCC that lacks support for C11
macro generics.
2022-03-31 19:48:48 +00:00
João Valverde 8bc214b5bb dfilter: Add remaining arithmetic integer ops 2022-03-31 16:49:42 +01:00
João Valverde 2a9cb588aa dfilter: Add binary arithmetic (add/subtract)
Add support for display filter binary addition and subtraction.

The grammar is intentionally kept simple for now. The use case
is to add a constant to a protocol field, or (maybe) add two
fields in an expression.

We use signed arithmetic with unsigned numbers, checking for
overflow and casting where necessary to do the conversion.
We could legitimately opt to use traditional modular arithmetic
instead (like C) and if it turns out that that is more useful for
some reason we may want to in the future.

Fixes #15504.
2022-03-31 11:27:34 +01:00
João Valverde 9ab2837637 dfilter: Add fvalue duplicate method 2022-03-30 14:05:22 +01:00
João Valverde b9b45a4a8f dfilter: Add ftypes pseudofields
This adds a _ws.ftypes namespace with protocol fields with all
the existing field types.

Currently this is only useful to debug the display filter compiler,
without having to find a real protocol field with the desired type.

Later it may find other uses.
2022-03-28 15:42:32 +01:00
João Valverde ac0a69636b dfilter: Add support for unary arithmetic
This change implements a unary minus operator.

Filter: tcp.window_size_scalefactor == -tcp.dstport

Instructions:
00000 READ_TREE		tcp.window_size_scalefactor -> reg#0
00001 IF_FALSE_GOTO	6
00002 READ_TREE		tcp.dstport -> reg#1
00003 IF_FALSE_GOTO	6
00004 MK_MINUS		-reg#1 -> reg#2
00005 ANY_EQ		reg#0 == reg#2
00006 RETURN

It is supported for integer types, floats and relative time values.
The unsigned integer types are promoted to a 32 bit signed integer.

Unary plus is implemented as a no-op. The plus sign is simply ignored.

Constant arithmetic expressions are computed during compilation.

Overflow with constants is a compile time error. Overflow with
variables is a run time error and silently ignored. Only a debug
message will be printed to the console.

Related to #15504.
2022-03-28 11:20:41 +00:00
João Valverde 3ac17381a6 ftypes: Fix IPv6 bitwise_and buffer overrun
*** CID 1503219:  Memory - illegal accesses  (OVERRUN)
/builds/wireshark/wireshark/epan/ftypes/ftype-ipv6.c: 142 in bitwise_and()
136
137     	prefix = MIN(a->prefix, b->prefix);	/* MIN() like in IPv4 */
138     	prefix = MIN(prefix, 128);		/* sanitize, max prefix is 128 */
139
140     	dst->value.ipv6 = fv_a->value.ipv6;
141     	while (prefix >= 8) {
>>>     CID 1503219:  Memory - illegal accesses  (OVERRUN)
>>>     Overrunning array "bitmasks" of 9 bytes at byte offset 127 using index "prefix" (which evaluates to 127).
142     		dst->value.ipv6.addr.bytes[pos] &= b->addr.bytes[pos] & bitmasks[prefix];
143
144     		prefix -= 8;
145     		pos++;
146     	}
147
2022-03-25 09:13:47 +00:00
João Valverde 0335ebdc3a dfilter: ftype_is_true -> ftype_is_zero 2022-03-23 11:04:41 +00:00
João Valverde 16729be2c1 dfilter: Add bitwise masking of bits
Add support for masking of bits. Before the bitwise operator
could only test bits, it did not support clearing bits.

This allows testing if any combination of bits are set/unset
more naturally with a single test. Previously this was only
possible by combining several bitwise predicates.

Bitwise is implemented as a test node, even though it is not.
Maybe the test node should be renamed to something else.

Fixes #17246.
2022-03-22 12:58:04 +00:00
João Valverde 5f13127a94 ftypes: Remove unnecessary macro 2022-03-16 19:28:41 +00:00
João Valverde 72751919b2 ftypes: Remove shared boolean from fvalue struct
This shared variable hidden behind a macro does not provide any
efficiency gains and just obscures the code. Move the boolean to
the fvalue protocol struct, where it belongs.
2022-03-16 19:25:45 +00:00
João Valverde df0fc8b517 dfilter: Try to be more flexible with leading colons
For an expression starting with a colon (a literal) try to parse
the value with and without colon. This avoids excluding some
valid representations like the IPv6 address "::1".
2022-03-05 11:10:54 +00:00
João Valverde c4f9d8abda dfilter: Rename "unparsed" to "literal"
A literal value is a value that cannot be interpreted as a
registered protocol. An unparsed value can be a literal or
an identifier (protocol/field) according to context and the
current disambiguation rules.

Strictly literal here is to be understood to  mean "numeric
literal, including numeric arrays, but not strings or character
constants".
2022-03-05 11:10:54 +00:00
João Valverde 1278e36152 dfilter: Add more debug code 2022-02-27 23:35:57 +00:00
João Valverde ef31431aeb dfilter: Add a true/false boolean representation
Minor code cleanup.
2022-02-23 23:37:47 +00:00
João Valverde 70d516368b Fix EditorConfig settings 2022-02-23 23:37:47 +00:00
João Valverde 9cc3e7e1bb dfilter: Add support for binary literal constants
Example: 0b1001, 0B111000, etc.
2022-02-23 22:27:59 +00:00
Guy Harris ec0aaf1811 ftype-time: check for NULL from gmtime() and localtime().
On Windows, they return NULL for times prior to the Epoch.
2022-01-04 15:35:18 -08:00
João Valverde 8501dc48dd dfilter: Accept byte arrays without separators
This relaxes the display filter syntax to accept byte arrays without
separators. An expression such as the following becomes valid:

    quic.dcid == b1f0b7cbe0897974

Previously it had to be written as:

    quic.dcid == b1:f0:b7:cb:e0:89:79:74

Partially fixes #17818.
2022-01-03 16:27:16 +00:00
João Valverde dd9ac15ff2 dfilter: Require separators with ISO 8601 time
Require date/time separators when entering a time value, e,g:
    2014-07-04 12:34:56.789+00:00

Separators in the timezone offset are an exception, they are
never mandatory.

This excludes ISO basic format to avoid inputs that could
be entirely numbers indistinguishable from Epoch time, in case
we want to support that in the future.
2022-01-02 10:44:01 +00:00
João Valverde e724a4baf6 dfilter: Use ISO8601 as the default time format
Change from a default custom time representation to ISO8601.
All the existing formats are still supported for backward-
compatibility.

Before:

  Filter: frame.time == "2011-07-04 12:34:56"

  Constants:
  00000 PUT_FVALUE	"Jul  4, 2011 12:34:56.000000000" <FT_ABSOLUTE_TIME> -> reg#1
  (...)

After:

  Filter: frame.time == "2011-07-04 12:34:56"

  Constants:
  00000 PUT_FVALUE	"2011-07-04 12:34:56+0100" <FT_ABSOLUTE_TIME> -> reg#1
  (...)
2021-12-31 15:01:41 +00:00
João Valverde 0047ca961f dfilter: Add support for entering time in UTC
Add the option to enter a filter with an absolute time
value in UTC. Otherwise the value is interpreted in
local time.

The syntax used is an "UTC" suffix, for example:

    frame.time == "Dec 31, 2002 13:55:31.3 UTC"

This also changes the behavior of "Apply Selected as filter".
Fields using a local time display type will use local time
and fields using UTC display type will be applied using UTC.

Fixes #13268.
2021-12-30 17:53:09 +00:00
João Valverde 64572a11f9 dfilter: Use better error messages for absolute times 2021-12-29 02:25:38 +00:00