diff options
author | David Perry <boolean263@protonmail.com> | 2021-04-29 07:23:21 -0400 |
---|---|---|
committer | Guy Harris <gharris@sonic.net> | 2021-07-07 18:40:24 +0000 |
commit | 73087d6fb486a61e8eb0886a02e6c6403534fa36 (patch) | |
tree | 2cee7a922a2225628103bb247818a8bb2db133b3 /test | |
parent | 20f38c06eab3f9a995468141cdfb14ec821a6503 (diff) |
Use wtap_blocks for packet comments
Mostly functioning proof of concept for #14329. This work is intended to
allow Wireshark to support multiple packet comments per packet.
Uses and expands upon the `wtap_block` API in `wiretap/wtap_opttypes.h`.
It attaches a `wtap_block` structure to `wtap_rec` in place of its
current `opt_comment` and `packet_verdict` members to hold OPT_COMMENT
and OPT_PKT_VERDICT option values.
Diffstat (limited to 'test')
-rw-r--r-- | test/lua/acme_file.lua | 1 | ||||
-rw-r--r-- | test/lua/globals_2.2.txt | 1 | ||||
-rw-r--r-- | test/suite_sharkd.py | 2 |
3 files changed, 1 insertions, 3 deletions
diff --git a/test/lua/acme_file.lua b/test/lua/acme_file.lua index 66d12d6c6d..f159ba2d45 100644 --- a/test/lua/acme_file.lua +++ b/test/lua/acme_file.lua @@ -666,7 +666,6 @@ function Packet:set_wslua_fields(frame) frame.flags = wtap_presence_flags.TS -- for timestamp if self.comment then frame.comment = self.comment - frame.flags = frame.flags + wtap_presence_flags.COMMENTS -- comment flag end return true end diff --git a/test/lua/globals_2.2.txt b/test/lua/globals_2.2.txt index 9f83d033c0..3ae1adba7c 100644 --- a/test/lua/globals_2.2.txt +++ b/test/lua/globals_2.2.txt @@ -1217,7 +1217,6 @@ }, ["wtap_presence_flags"] = { ["CAP_LEN"] = 2, - ["COMMENTS"] = 8, ["DROP_COUNT"] = 16, ["INTERFACE_ID"] = 4, ["PACK_FLAGS"] = 32, diff --git a/test/suite_sharkd.py b/test/suite_sharkd.py index b5348cdaf2..c89c30689b 100644 --- a/test/suite_sharkd.py +++ b/test/suite_sharkd.py @@ -438,7 +438,7 @@ class case_sharkd(subprocesstest.SubprocessTestCase): {"jsonrpc":"2.0","id":1,"result":{"status":"OK"}}, {"jsonrpc":"2.0","id":2,"error":{"code":-3002,"message":"Frame number is out of range"}}, {"jsonrpc":"2.0","id":3,"result":{"status":"OK"}}, - {"jsonrpc":"2.0","id":4,"result":{"comment":"foo\nbar","fol": MatchAny(list)}}, + {"jsonrpc":"2.0","id":4,"result":{"comment":["foo\nbar"],"fol": MatchAny(list)}}, )) def test_sharkd_req_setconf_bad(self, check_sharkd_session): |