diff options
author | Pascal Quantin <pascal.quantin@gmail.com> | 2014-02-07 12:40:09 +0100 |
---|---|---|
committer | Pascal Quantin <pascal.quantin@gmail.com> | 2014-02-07 12:51:33 +0000 |
commit | 04959a0c057d8d828d660392ff880699464f8634 (patch) | |
tree | 153ba77ce2bbf165877dc2471f070694f955b21f /epan/dissectors/packet-ssh.c | |
parent | a7b15672477df3e87385fbef60dc72952925310e (diff) |
Register SSH dissector by name
Change-Id: Ia9ad45ce9196486129897cd616707d622778e9dd
Reviewed-on: https://code.wireshark.org/review/137
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-ssh.c')
-rw-r--r-- | epan/dissectors/packet-ssh.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/epan/dissectors/packet-ssh.c b/epan/dissectors/packet-ssh.c index e478825e6d..df7e3de9cd 100644 --- a/epan/dissectors/packet-ssh.c +++ b/epan/dissectors/packet-ssh.c @@ -177,6 +177,8 @@ static expert_field ei_ssh_packet_length = EI_INIT; static gboolean ssh_desegment = TRUE; +static dissector_handle_t ssh_handle; + #define TCP_PORT_SSH 22 #define SCTP_PORT_SSH 22 @@ -1370,15 +1372,13 @@ proto_register_ssh(void) "Whether the SSH dissector should reassemble SSH buffers spanning multiple TCP segments. " "To use this option, you must also enable \"Allow subdissectors to reassemble TCP streams\" in the TCP protocol settings.", &ssh_desegment); + + ssh_handle = register_dissector("ssh", dissect_ssh, proto_ssh); } void proto_reg_handoff_ssh(void) { - dissector_handle_t ssh_handle; - - ssh_handle = create_dissector_handle(dissect_ssh, proto_ssh); - dissector_add_uint("tcp.port", TCP_PORT_SSH, ssh_handle); dissector_add_uint("sctp.port", SCTP_PORT_SSH, ssh_handle); dissector_add_uint("sctp.ppi", SSH_PAYLOAD_PROTOCOL_ID, ssh_handle); |