diff options
author | João Valverde <joao.valverde@tecnico.ulisboa.pt> | 2017-09-01 01:25:53 +0100 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2017-09-01 03:29:39 +0000 |
commit | f16f6a3ef28754408548ff4ae1669856aec172b4 (patch) | |
tree | b22051b7f095f8bf435c7fe8d30246733f1a8e9f /epan/dissectors/packet-tcp.c | |
parent | 5870352d8f388347750d8445a80be92e0fab6504 (diff) |
Avoid use of global protocol variables
Change-Id: I006d872a83649e72a6c83abac68cbae064457162
Reviewed-on: https://code.wireshark.org/review/23346
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-tcp.c')
-rw-r--r-- | epan/dissectors/packet-tcp.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/epan/dissectors/packet-tcp.c b/epan/dissectors/packet-tcp.c index a34fa040e2..3dba79ca93 100644 --- a/epan/dissectors/packet-tcp.c +++ b/epan/dissectors/packet-tcp.c @@ -117,6 +117,9 @@ enum mptcp_dsn_conversion { static gint tcp_default_window_scaling = (gint)WindowScaling_NotKnown; static int proto_tcp = -1; +static int proto_ip = -1; +static int proto_icmp = -1; + static int proto_tcp_option_nop = -1; static int proto_tcp_option_eol = -1; static int proto_tcp_option_timestamp = -1; @@ -7570,6 +7573,9 @@ proto_reg_handoff_tcp(void) mptcp_tap = register_tap("mptcp"); exported_pdu_tap = find_tap_id(EXPORT_PDU_TAP_NAME_LAYER_4); + + proto_ip = proto_get_id_by_filter_name("ip"); + proto_icmp = proto_get_id_by_filter_name("icmp"); } /* |