Open-Markets-Initiative / wireshark-lua

Source generated cross platform Wireshark dissectors
GNU General Public License v3.0
188 stars 63 forks source link

Eurex ETI dissection error #42

Closed joedoyle closed 1 year ago

joedoyle commented 1 year ago

Screenshot from 2023-02-10 16-20-43

zipped pcap: eti.zip

Reading the counts of the various repeating groups before increasing length fixes the issue:

size_of.order_exec_response = function(buffer, offset)
  local index = 0

  index = index + size_of.message_header_out_comp(buffer, offset + index)

  index = index + size_of.response_header_me_comp(buffer, offset + index)

  index = index + size_of.order_id

  index = index + size_of.cl_ord_id

  index = index + size_of.orig_cl_ord_id

  index = index + size_of.security_id

  index = index + size_of.exec_id

  index = index + size_of.trd_reg_ts_entry_time

  index = index + size_of.trd_reg_ts_time_priority

  index = index + size_of.leaves_qty

  index = index + size_of.cum_qty

  index = index + size_of.cxl_qty

  index = index + size_of.market_segment_id

  index = index + size_of.no_leg_execs

  index = index + size_of.exec_restatement_reason

  index = index + size_of.side

  index = index + size_of.product_complex

  index = index + size_of.ord_status

  index = index + size_of.exec_type

  index = index + size_of.triggered

  index = index + size_of.crossed_indicator

  index = index + size_of.transaction_delay_indicator

  index = index + size_of.no_fills

  index = index + size_of.no_order_events

  index = index + size_of.pad_7

  -- Calculate field size from count
  local fills_grp_comp_count = buffer(offset + index - 9, 1):le_uint()

  -- Calculate field size from count
  local instrmnt_leg_exec_grp_comp_count = buffer(offset + index - 52, 2):le_uint()

  -- Calculate field size from count
  local order_event_grp_comp_count = buffer(offset + index - 72, 1):le_uint()

  index = index + fills_grp_comp_count * 32

  index = index + instrmnt_leg_exec_grp_comp_count * 32

  index = index + order_event_grp_comp_count * 24

  return index
end
Open-Markets-Initiative commented 1 year ago

Thanks for bringing this to our attention. It is unfortunately a design error that the sizes are calculated before the dissection. Once I find a block of time I will update the model and regenerate.

However, the current issue is that the eti models do not bind and calculate the group counts correctly. I updated the xml loader and regenerated. Please see commit: 5115ec6a48f6c8eb5aac59f7b04fabcc5eb9b163

Let us know if there are any other issues. Thanks for the pcap.