diff options
author | João Valverde <j@v6e.pt> | 2021-12-07 15:02:00 +0000 |
---|---|---|
committer | João Valverde <j@v6e.pt> | 2022-03-28 15:42:32 +0100 |
commit | b9b45a4a8f6239ab23c1cec1ab79952ec0498647 (patch) | |
tree | 10d3d53cdbfb94e6b0730771d24b7914d70b1ab4 /epan/ftypes/ftype-ipv4.c | |
parent | f54bad026fd36cc26cde5c5e42a843700ad1629e (diff) |
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.
Diffstat (limited to 'epan/ftypes/ftype-ipv4.c')
-rw-r--r-- | epan/ftypes/ftype-ipv4.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/epan/ftypes/ftype-ipv4.c b/epan/ftypes/ftype-ipv4.c index fe032cf7f4..86ac78428f 100644 --- a/epan/ftypes/ftype-ipv4.c +++ b/epan/ftypes/ftype-ipv4.c @@ -178,6 +178,22 @@ ftype_register_ipv4(void) ftype_register(FT_IPv4, &ipv4_type); } +void +ftype_register_pseudofields_ipv4(int proto) +{ + static int hf_ft_ipv4; + + static hf_register_info hf_ftypes[] = { + { &hf_ft_ipv4, + { "FT_IPv4", "_ws.ftypes.ipv4", + FT_IPv4, BASE_NONE, NULL, 0x00, + NULL, HFILL } + }, + }; + + proto_register_field_array(proto, hf_ftypes, array_length(hf_ftypes)); +} + /* * Editor modelines - https://www.wireshark.org/tools/modelines.html * |