diff options
author | Guy Harris <guy@alum.mit.edu> | 2018-05-26 18:42:41 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2018-05-27 01:43:27 +0000 |
commit | 5b30d5c7675fd03a420257c334808549eddc6e7e (patch) | |
tree | e4622039f3a5da1e3690cd1416199e1b5a9e99c2 /epan/dissectors/packet-turnchannel.c | |
parent | 53a373693ccc55b6475264bd8d1fc611930d1c0f (diff) |
Have a dissector table for SSL/TLS/DTLS ALPN protocol IDs.
Have dissectors register with their protocol ID string in that table,
rather than having a table in epan/dissectors/packet-ssl-utils.c that
has to be updated for new protocols.
Have a table of protocol ID string prefixes, to handle the case of
protocols such as SPDY and HTTP2 drafts, where multiple protocol IDs are
used for different versions.
Change-Id: I363d04895a88e779fbbca7dc8e1f31aa1970a31a
Reviewed-on: https://code.wireshark.org/review/27836
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/dissectors/packet-turnchannel.c')
-rw-r--r-- | epan/dissectors/packet-turnchannel.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/epan/dissectors/packet-turnchannel.c b/epan/dissectors/packet-turnchannel.c index 339db978f3..e3c2f364f4 100644 --- a/epan/dissectors/packet-turnchannel.c +++ b/epan/dissectors/packet-turnchannel.c @@ -202,6 +202,13 @@ proto_reg_handoff_turnchannel(void) dissector_add_for_decode_as_with_preference("tcp.port", turnchannel_tcp_handle); dissector_add_for_decode_as_with_preference("udp.port", turnchannel_udp_handle); + /* + * SSL/TLS and DTLS Application-Layer Protocol Negotiation (ALPN) + * protocol ID. + */ + dissector_add_string("ssl.handshake.extensions_alpn_str", "stun.turn", turnchannel_tcp_handle); + dissector_add_string("dtls.handshake.extensions_alpn_str", "stun.turn", turnchannel_udp_handle); + /* TURN negotiation is handled through STUN2 dissector (packet-stun.c), so only it should be able to determine if a packet is a TURN packet */ heur_dissector_add("stun", dissect_turnchannel_heur, "TURN Channel over STUN", "turnchannel_stun", proto_turnchannel, HEURISTIC_ENABLE); |