sctp: Improve exporting PDUs
authorVasil Velichkov <vvvelichkov@gmail.com>
Thu, 2 Aug 2018 19:30:44 +0000 (22:30 +0300)
committerAnders Broman <a.broman58@gmail.com>
Sun, 5 Aug 2018 08:10:46 +0000 (08:10 +0000)
commitac27dc1f5c9438eacf0cb79722610e332a815b64
tree03b4600d264e730a0e1b447f3106630669907427
parent82454b82c577ffdcc87fb66b03a41cd793a668af
sctp: Improve exporting PDUs

Export the PDUs in the following cases:

- When sctp.ulp_dissection is FALSE
  Not having to dissect the upper layers greatly improve exporting speed.
  Previously no PDUs were exported becuase without dissection the upper
  layer name was not available. Now in this case the exported_pdu.tag is
  set to sctp.ppi or sctp.port table and the corresponding ppi or port
  is also set in the exported_pdu.this_table_val.
- When the upper layer can't be dissected but at least one of the
  payload_proto_id, destport or srcport is not 0

Refactor and move the common parts in a dedicated functions.

Change-Id: Ie5073a5c7603e11c4a5703118fd81ac25bd924e9
Reviewed-on: https://code.wireshark.org/review/28933
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
epan/dissectors/packet-sctp.c