diff options
author | Stig Bjørlykke <stig@bjorlykke.org> | 2020-10-21 12:38:15 +0200 |
---|---|---|
committer | Wireshark GitLab Utility <gerald+gitlab-utility@wireshark.org> | 2020-10-22 14:18:58 +0000 |
commit | 10e6cb5f37624284c5c8d5729adb3e68a4bb0750 (patch) | |
tree | b2412281febd0fc1b6dc00d304a5323968883587 | |
parent | 158f67e344e934da2db4a3dc1b76fcec5551ee37 (diff) |
wslua: Make pinfo.p2p_dir writable
Make pinfo.p2p_dir writeble from Lua to be able to set the direction
for sub-dissectors.
-rw-r--r-- | epan/wslua/wslua_pinfo.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/epan/wslua/wslua_pinfo.c b/epan/wslua/wslua_pinfo.c index 17ed4ea04b..b27f492988 100644 --- a/epan/wslua/wslua_pinfo.c +++ b/epan/wslua/wslua_pinfo.c @@ -292,8 +292,9 @@ PINFO_ADDRESS_SETTER(src); PINFO_ADDRESS_GETTER(dst); PINFO_ADDRESS_SETTER(dst); -/* WSLUA_ATTRIBUTE Pinfo_p2p_dir RO direction of this Packet. (incoming / outgoing) */ +/* WSLUA_ATTRIBUTE Pinfo_p2p_dir RW direction of this Packet. (incoming / outgoing) */ PINFO_NUMBER_GETTER(p2p_dir); +PINFO_NUMBER_SETTER(p2p_dir,int); /* WSLUA_ATTRIBUTE Pinfo_match RO Port/Data we are matching. */ static int Pinfo_get_match(lua_State *L) { @@ -459,7 +460,7 @@ WSLUA_ATTRIBUTES Pinfo_attributes[] = { WSLUA_ATTRIBUTE_ROREG(Pinfo,match_uint), WSLUA_ATTRIBUTE_ROREG(Pinfo,match_string), WSLUA_ATTRIBUTE_WOREG(Pinfo,conversation), - WSLUA_ATTRIBUTE_ROREG(Pinfo,p2p_dir), + WSLUA_ATTRIBUTE_RWREG(Pinfo,p2p_dir), { NULL, NULL, NULL } }; |