URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=d90aa2139553bf31743f12c0a79de96089363acb
Submitter: Anders Broman (a.broman58@xxxxxxxxx)
Changed: branch: master
Repository: wireshark
Commits:
d90aa21 by Dylan Ulis (daulis0@xxxxxxxxx):
CIP: Pull out segment parsing to separate functions
dissect_cip_segment_single was huge and too hard to read and update.
This change pulls out segment parsing into individual functions to make
it easier to read, and will help with upcoming changes.
There are no functional changes. I verified that the packet parsing is
identical before and after using feature_cip_all_segments.pcap from
Bug: 12049
Main changes:
1. Pulled out the following code into separate functions:
dissect_segment_port
dissect_segment_safety
dissect_segment_data_simple
dissect_segment_ansi_extended_symbol
dissect_segment_logical_service_id
dissect_segment_logical_special
dissect_segment_network
2. In dissect_cip_segment_single, no need to explictly check for zero
segment_len in many cases because the function will already return
zero in those cases.
Change-Id: Id437bb34dc665ac37f428b8fdab0c89c454ad25e
Reviewed-on: https://code.wireshark.org/review/27845
Petri-Dish: Anders Broman <a.broman58@xxxxxxxxx>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@xxxxxxxxx>
Actions performed:
from 20db0ca ICMPv6: fix wrong tree for some bitmask field
adds d90aa21 CIP: Pull out segment parsing to separate functions
Summary of changes:
epan/dissectors/packet-cip.c | 1131 ++++++++++++++++++++++--------------------
1 file changed, 580 insertions(+), 551 deletions(-)