@@ -225,20 +225,15 @@ end
225225asx_asxsecurities_ntp_itch_v1_05 .conversation = {}
226226
227227-- Get/create our protocol's data record on the current packet's conversation
228+ -- Module-level flow cache keyed by 4-tuple (this tshark build does not expose pinfo.conversation as a reader)
229+ asx_asxsecurities_ntp_itch_v1_05 .conversation .flows = {}
230+
228231asx_asxsecurities_ntp_itch_v1_05 .conversation .data = function (packet )
229- local conversation = packet .conversation
230- io.stderr :write (string.format (" [asx.conversation.data] frame=%d conv=%s type=%s\n " , packet .number , tostring (conversation ), type (conversation )))
231- local ok , data = pcall (function () return conversation [omi_asx_asxsecurities_ntp_itch_v1_05 ] end )
232- if not ok then
233- io.stderr :write (string.format (" [asx.conversation.data] index FAILED: %s\n " , tostring (data )))
234- return { second = { last = nil , frames = {} } }
235- end
232+ local key = string.format (" %s|%s|%s|%s" , tostring (packet .src ), packet .src_port , tostring (packet .dst ), packet .dst_port )
233+ local data = asx_asxsecurities_ntp_itch_v1_05 .conversation .flows [key ]
236234 if data == nil then
237235 data = { second = { last = nil , frames = {} } }
238- local ok2 , err = pcall (function () conversation [omi_asx_asxsecurities_ntp_itch_v1_05 ] = data end )
239- if not ok2 then
240- io.stderr :write (string.format (" [asx.conversation.data] assign FAILED: %s\n " , tostring (err )))
241- end
236+ asx_asxsecurities_ntp_itch_v1_05 .conversation .flows [key ] = data
242237 end
243238 return data
244239end
@@ -5217,6 +5212,7 @@ end
52175212function omi_asx_asxsecurities_ntp_itch_v1_05 .init ()
52185213 asx_asxsecurities_ntp_itch_v1_05 .second .current = nil
52195214 asx_asxsecurities_ntp_itch_v1_05 .conversation .current = nil
5215+ asx_asxsecurities_ntp_itch_v1_05 .conversation .flows = {}
52205216end
52215217
52225218-- Dissector for Asx AsxSecurities Ntp Itch 1.05
0 commit comments