This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

LUA: How can I read protocol pref tcp.desegment_tcp_streams?

0

Hi,

I'm adding some code to a LUA Wireshark postdissector script and I need to check if "Allow subdissector to reassemble TCP streams" is enabled in Preferences -> Protocols -> TCP

I have other areas of code where I create and later read preference values for my subdissector protocol, e.g.

transum.prefs.client_side = Pref.bool( "Client side trace", true, "Uncheck this if the trace was captured adjacent to the service" )
.
.
if transum.prefs.client_side and retran and stream_dir[s] == 0 then

This all works fine. I just can't figure out how to read compiled dissector preferences.

How can I read tcp.desegment_tcp_streams?

Thanks and regards...Paul

asked 06 Sep '14, 02:36

PaulOfford's gravatar image

PaulOfford
131283237
accept rate: 11%


One Answer:

1

There does not appear to be a way to read another dissector's preference from Lua.

But why do you want to? No other dissector reads this preference.

If you really want it, you could always submit an enhancement request (with a use case).

answered 08 Sep '14, 08:16

JeffMorriss's gravatar image

JeffMorriss ♦
6.2k572
accept rate: 27%

Yeah, I also don't think there's a way to read a pre-existing preference currently.

(08 Sep '14, 08:23) Hadriel

Thanks. That's a shame. The reason I need to read it is because I need different program logic if TCP subdissector reassembly is disabled.

Best regards...Paul

(14 Sep '14, 01:34) PaulOfford

It looks like someone opened a bug report for this. See bug 11479.

(18 Sep '15, 09:32) cmaynard ♦♦