aboutsummaryrefslogtreecommitdiffstats
path: root/test/lua
diff options
context:
space:
mode:
authorMartin Kaiser <wireshark@kaiser.cx>2019-07-06 15:27:20 +0200
committerMartin Kaiser <wireshark@kaiser.cx>2019-07-22 15:45:27 +0000
commit429082dd71a00e7eb67efb6c8c20d0b95c532da1 (patch)
treedc86115c9439cc6c17874ce1d66e40f19c3c41bf /test/lua
parentcc152014362fa584cfff97cc99afa5822b99af74 (diff)
wslua: pinfo: make p2p_dir accessible to lua dissectors
Some dissectors populate pinfo->p2p_dir with a packet's direction (incoming / outgoing). Make this info available to lua dissectors. Add a simple test for Pinfo's new p2p_dir attribute to the wslua test suite. It checks that p2p_dir is unknown for dhcp packets. (The dhcp dissector does not set p2p_dir). Change-Id: I8cc39a11cff840d10ef7fa94d30cbac8bf9b533f Reviewed-on: https://code.wireshark.org/review/33935 Reviewed-by: Peter Wu <peter@lekensteyn.nl> Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Diffstat (limited to 'test/lua')
-rw-r--r--test/lua/pinfo.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/lua/pinfo.lua b/test/lua/pinfo.lua
index 4cc9f0b95d..9b8e47d67e 100644
--- a/test/lua/pinfo.lua
+++ b/test/lua/pinfo.lua
@@ -210,6 +210,8 @@ again, these *should* pass, but Pinfo silently allows it!
test("Pinfo.desegment_len-get-1",pinfo.desegment_len == 0)
test("Pinfo.desegment_offset-get-1",pinfo.desegment_offset == 0)
+ test("pinfo.p2p_dir", pinfo.p2p_dir == P2P_DIR_UNKNOWN)
+
if pinfo.number == 1 then
test("Pinfo.rel_ts-get-1",pinfo.rel_ts == 0)
test("Pinfo.delta_ts-get-1",pinfo.delta_ts == 0)