Wireshark-commits: [Wireshark-commits] master 268841f: Combine Decode As and port preferences for t

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Sat, 8 Oct 2016 02:45:14 +0000 (UTC)
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=268841f3e00b7cf0f16c81dd2b3b952172130b8b
Submitter: Michael Mann (mmann78@xxxxxxxxxxxx)
Changed: branch: master
Repository: wireshark

Commits:

268841f by Michael Mann (mmann78@xxxxxxxxxxxx):

    Combine Decode As and port preferences for tcp.port dissector table.
    
    This patch introduces new APIs to allow dissectors to have a preference for
    a (TCP) port, but the underlying data is actually part of Decode As functionality.
    For now the APIs are intentionally separate from the regular APIs that register a
    dissector within a dissector table.  It may be possible to eventually combine the
    two so that all dissectors that register with a dissector table have an opportunity
    to "automatically" have a preference to adjust the "table value" through the
    preferences dialog.
    
    The tcp.port dissector table was used as the guinea pig.  This will eventually be
    expanded to other dissector tables as well (most notably UDP ports).  Some
    dissectors that "shared" a TCP/UDP port preference were also converted. It also
    removed the need for some preference callback functions (mostly when the callback
    function was the proto_reg_handoff function) so there is cleanup around that.
    
    Dissectors that has a port preference whose default was 0 were switched to using
    the dissector_add_for_decode_as_with_preference API rather than dissector_add_uint_with_preference
    
    Also added comments for TCP ports used that aren't IANA registered.
    
    Change-Id: I99604f95d426ad345f4b494598d94178b886eb67
    Reviewed-on: https://code.wireshark.org/review/17724
    Reviewed-by: Michael Mann <mmann78@xxxxxxxxxxxx>
    

Actions performed:

    from  11d3224   s7comm: use ws_stroi function.
    adds  268841f   Combine Decode As and port preferences for tcp.port dissector table.


Summary of changes:
 debian/libwireshark0.symbols                       |    1 +
 doc/README.dissector                               |   72 ++---
 doc/packet-PROTOABBREV.c                           |    2 +-
 epan/decode_as.c                                   |  309 +++++++++++++++++++
 epan/decode_as.h                                   |   41 +++
 epan/dissectors/asn1/c1222/packet-c1222-template.c |    2 +-
 epan/dissectors/asn1/cmp/packet-cmp-template.c     |   25 +-
 epan/dissectors/asn1/h245/packet-h245-template.c   |    2 +-
 epan/dissectors/asn1/h248/packet-h248-template.c   |   17 +-
 epan/dissectors/asn1/h501/packet-h501-template.c   |   11 +-
 epan/dissectors/asn1/idmp/packet-idmp-template.c   |   31 +-
 epan/dissectors/asn1/ilp/packet-ilp-template.c     |   31 +-
 .../asn1/kerberos/packet-kerberos-template.c       |    2 +-
 epan/dissectors/asn1/ldap/packet-ldap-template.c   |   26 +-
 epan/dissectors/asn1/sabp/packet-sabp-template.c   |    6 +-
 epan/dissectors/asn1/smrse/packet-smrse-template.c |    4 +-
 epan/dissectors/asn1/snmp/packet-snmp-template.c   |    7 +-
 epan/dissectors/asn1/t38/packet-t38-template.c     |   20 +-
 epan/dissectors/asn1/ulp/packet-ulp-template.c     |   15 +-
 epan/dissectors/packet-3com-njack.c                |    4 +-
 epan/dissectors/packet-9p.c                        |    2 +-
 epan/dissectors/packet-acap.c                      |    2 +-
 epan/dissectors/packet-adb.c                       |    2 +-
 epan/dissectors/packet-adb_cs.c                    |    2 +-
 epan/dissectors/packet-agentx.c                    |   32 +-
 epan/dissectors/packet-aim-oft.c                   |    2 +-
 epan/dissectors/packet-aim.c                       |    2 +-
 epan/dissectors/packet-ajp13.c                     |    3 +-
 epan/dissectors/packet-alljoyn.c                   |   19 +-
 epan/dissectors/packet-amqp.c                      |   27 +-
 epan/dissectors/packet-ancp.c                      |    2 +-
 epan/dissectors/packet-aol.c                       |    4 +-
 epan/dissectors/packet-asap.c                      |    2 +-
 epan/dissectors/packet-assa_r3.c                   |    7 +-
 epan/dissectors/packet-atmtcp.c                    |   28 +-
 epan/dissectors/packet-ax4000.c                    |    2 +-
 epan/dissectors/packet-banana.c                    |   19 +-
 epan/dissectors/packet-beep.c                      |   41 +--
 epan/dissectors/packet-ber.c                       |    2 +-
 epan/dissectors/packet-bfcp.c                      |   17 +-
 epan/dissectors/packet-bgp.c                       |    2 +-
 epan/dissectors/packet-bitcoin.c                   |    2 +-
 epan/dissectors/packet-bittorrent.c                |   15 +-
 epan/dissectors/packet-bmp.c                       |    2 +-
 epan/dissectors/packet-bzr.c                       |    2 +-
 epan/dissectors/packet-c1222.c                     |    2 +-
 epan/dissectors/packet-cast.c                      |    4 +-
 epan/dissectors/packet-chargen.c                   |    2 +-
 epan/dissectors/packet-cigi.c                      |    2 +-
 epan/dissectors/packet-cimd.c                      |    2 +-
 epan/dissectors/packet-classicstun.c               |    2 +-
 epan/dissectors/packet-cmp.c                       |   37 +--
 epan/dissectors/packet-cmpp.c                      |   10 +-
 epan/dissectors/packet-coap.c                      |    5 +-
 epan/dissectors/packet-cops.c                      |   34 +-
 epan/dissectors/packet-couchbase.c                 |   27 +-
 epan/dissectors/packet-cp2179.c                    |   25 +-
 epan/dissectors/packet-cql.c                       |    4 +-
 epan/dissectors/packet-ctdb.c                      |    2 +-
 epan/dissectors/packet-daytime.c                   |    2 +-
 epan/dissectors/packet-db-lsp.c                    |    2 +-
 epan/dissectors/packet-dbus.c                      |    2 +-
 epan/dissectors/packet-dcm.c                       |   37 +--
 epan/dissectors/packet-dhcp-failover.c             |   27 +-
 epan/dissectors/packet-dhcpv6.c                    |    2 +-
 epan/dissectors/packet-diameter.c                  |   14 +-
 epan/dissectors/packet-distcc.c                    |   37 +--
 epan/dissectors/packet-dji-uav.c                   |    5 +-
 epan/dissectors/packet-dlm3.c                      |   13 +-
 epan/dissectors/packet-dlsw.c                      |    2 +-
 epan/dissectors/packet-dnp.c                       |    2 +-
 epan/dissectors/packet-dns.c                       |   16 +-
 epan/dissectors/packet-dof.c                       |    4 +-
 epan/dissectors/packet-dsi.c                       |    4 +-
 epan/dissectors/packet-dtcp-ip.c                   |   26 +-
 epan/dissectors/packet-dtn.c                       |   15 +-
 epan/dissectors/packet-dtpt.c                      |   32 +-
 epan/dissectors/packet-echo.c                      |    2 +-
 epan/dissectors/packet-ecmp.c                      |    3 +-
 epan/dissectors/packet-edonkey.c                   |    5 +-
 epan/dissectors/packet-elasticsearch.c             |    4 +-
 epan/dissectors/packet-elcom.c                     |    4 +-
 epan/dissectors/packet-enip.c                      |    2 +-
 epan/dissectors/packet-enttec.c                    |   13 +-
 epan/dissectors/packet-epmd.c                      |    2 +-
 epan/dissectors/packet-erldp.c                     |    2 +-
 epan/dissectors/packet-etch.c                      |   19 +-
 epan/dissectors/packet-exec.c                      |    2 +-
 epan/dissectors/packet-fcgi.c                      |   29 +-
 epan/dissectors/packet-fcip.c                      |    2 +-
 epan/dissectors/packet-ff.c                        |    2 +-
 epan/dissectors/packet-finger.c                    |    2 +-
 epan/dissectors/packet-fix.c                       |   24 +-
 epan/dissectors/packet-forces.c                    |   16 +-
 epan/dissectors/packet-ftp.c                       |    4 +-
... 215 lines suppressed ...