diff options
author | Peter Wu <peter@lekensteyn.nl> | 2015-12-12 00:47:15 +0100 |
---|---|---|
committer | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2015-12-13 07:18:21 +0000 |
commit | 252486e967bcd84ebb96aa747be54752092e9f98 (patch) | |
tree | 6f611c51c4dd14d3f4163422b51b183b6106344c /epan/dissectors/packet-telnet.c | |
parent | 510f7d1f05a43ee391c7a3c3c34eeaca0e78b97f (diff) |
telnet: add more options, including START_TLS
Basic support of the option, no decryption support.
Change-Id: I2556954dcb8b0e79d0e2ac9f3101ae0c423bcd36
Ping-Bug: 11874
Reviewed-on: https://code.wireshark.org/review/12548
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-telnet.c')
-rw-r--r-- | epan/dissectors/packet-telnet.c | 52 |
1 files changed, 51 insertions, 1 deletions
diff --git a/epan/dissectors/packet-telnet.c b/epan/dissectors/packet-telnet.c index fe662cf35d..42d0daf987 100644 --- a/epan/dissectors/packet-telnet.c +++ b/epan/dissectors/packet-telnet.c @@ -88,6 +88,8 @@ static int hf_tn3270_request = -1; static int hf_tn3270_regime_subopt_value = -1; static int hf_tn3270_regime_cmd = -1; +static int hf_telnet_starttls = -1; + static gint ett_telnet = -1; static gint ett_telnet_cmd = -1; static gint ett_telnet_subopt = -1; @@ -127,6 +129,7 @@ static gint ett_xauth_subopt = -1; static gint ett_charset_subopt = -1; static gint ett_rsp_subopt = -1; static gint ett_comport_subopt = -1; +static gint ett_starttls_subopt = -1; static expert_field ei_telnet_suboption_length = EI_INIT; static expert_field ei_telnet_invalid_subcommand = EI_INIT; @@ -448,6 +451,13 @@ dissect_tn3270e_subopt(packet_info *pinfo _U_, const char *optname _U_, tvbuff_t } +static void +dissect_starttls_subopt(packet_info *pinfo _U_, const char *optname _U_, tvbuff_t *tvb, int offset, + int len _U_, proto_tree *tree, proto_item *item _U_) +{ + proto_tree_add_item(tree, hf_telnet_starttls, tvb, offset, 1, ENC_BIG_ENDIAN); +} + static const value_string telnet_outmark_subopt_cmd_vals[] = { { 6, "ACK" }, { 21, "NAK" }, @@ -1516,6 +1526,41 @@ static tn_opt options[] = { VARIABLE_LENGTH, 1, dissect_comport_subopt + }, + { + "Suppress Local Echo", /* draft-rfced-exp-atmar-00 */ + NULL, + NO_LENGTH, + 0, + NULL + }, + { + "Start TLS", /* draft-ietf-tn3270e-telnet-tls-06 */ + &ett_starttls_subopt, + FIXED_LENGTH, + 1, + dissect_starttls_subopt + }, + { + "KERMIT", /* RFC 2840 */ + NULL, + VARIABLE_LENGTH, + 1, + NULL /* XXX - stub */ + }, + { + "SEND-URL", /* draft-croft-telnet-url-trans-00 */ + NULL, + VARIABLE_LENGTH, + 1, + NULL /* XXX - stub */ + }, + { + "FORWARD_X", /* draft-altman-telnet-fwdx-03 */ + NULL, + VARIABLE_LENGTH, + 1, + NULL /* XXX - stub */ } }; @@ -2039,6 +2084,10 @@ proto_register_telnet(void) { "Cmd", "telnet.regime_cmd", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL } }, + { &hf_telnet_starttls, + { "Follows", "telnet.starttls", FT_UINT8, BASE_DEC, + NULL, 0, NULL, HFILL } + }, }; static gint *ett[] = { &ett_telnet, @@ -2079,7 +2128,8 @@ proto_register_telnet(void) &ett_xauth_subopt, &ett_charset_subopt, &ett_rsp_subopt, - &ett_comport_subopt + &ett_comport_subopt, + &ett_starttls_subopt, }; static ei_register_info ei[] = { |