diff options
author | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2018-09-18 21:31:56 +0200 |
---|---|---|
committer | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2018-09-19 05:45:51 +0000 |
commit | baa096a2a0d0583e2cc4f762a2d4cccd307dcf43 (patch) | |
tree | b5d46777f555fa66b834d91260e9f44f189e0100 /epan | |
parent | 6501231a3c35e6843fb130cfa294637466307460 (diff) |
QUIC: Add new initial_max_stream_* TP (draft -14)
Split initial_max_stream_data (0) into
* initial_max_stream_data_bidi_local (0),
* initial_max_stream_data_bidi_remote (10),
* initial_max_stream_data_uni (11)
Change-Id: I4ab7785059391f91703c9cdee9fcd111ad7e88a6
Ping-Bug: 13881
Reviewed-on: https://code.wireshark.org/review/29722
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Diffstat (limited to 'epan')
-rw-r--r-- | epan/dissectors/packet-ssl-utils.c | 26 | ||||
-rw-r--r-- | epan/dissectors/packet-ssl-utils.h | 44 |
2 files changed, 50 insertions, 20 deletions
diff --git a/epan/dissectors/packet-ssl-utils.c b/epan/dissectors/packet-ssl-utils.c index 075df6d37a..268bc856c9 100644 --- a/epan/dissectors/packet-ssl-utils.c +++ b/epan/dissectors/packet-ssl-utils.c @@ -1347,7 +1347,7 @@ static const ssl_alpn_prefix_match_protocol_t ssl_alpn_prefix_match_protocols[] }; const value_string quic_transport_parameter_id[] = { - { SSL_HND_QUIC_TP_INITIAL_MAX_STREAM_DATA, "initial_max_stream_data" }, + { SSL_HND_QUIC_TP_INITIAL_MAX_STREAM_DATA_BIDI_LOCAL, "initial_max_stream_data_bidi_local" }, { SSL_HND_QUIC_TP_INITIAL_MAX_DATA, "initial_max_data" }, { SSL_HND_QUIC_TP_INITIAL_MAX_BIDI_STREAMS, "initial_max_bidi_streams" }, { SSL_HND_QUIC_TP_IDLE_TIMEOUT, "idle_timeout" }, @@ -1357,6 +1357,8 @@ const value_string quic_transport_parameter_id[] = { { SSL_HND_QUIC_TP_ACK_DELAY_EXPONENT, "ack_delay_exponent" }, { SSL_HND_QUIC_TP_INITIAL_MAX_UNI_STREAMS, "initial_max_uni_streams" }, { SSL_HND_QUIC_TP_DISABLE_MIGRATION, "disable_migration" }, + { SSL_HND_QUIC_TP_INITIAL_MAX_STREAM_DATA_BIDI_REMOTE, "initial_max_stream_data_bidi_remote" }, + { SSL_HND_QUIC_TP_INITIAL_MAX_STREAM_DATA_UNI, "initial_max_stream_data_uni" }, { 0, NULL } }; @@ -6519,10 +6521,10 @@ ssl_dissect_hnd_hello_ext_quic_transport_parameters(ssl_common_dissect_t *hf, tv { guint32 quic_length, parameter_length, supported_versions_length, next_offset; - /* https://tools.ietf.org/html/draft-ietf-quic-transport-12#section-6.4 + /* https://tools.ietf.org/html/draft-ietf-quic-transport-14#section-6.6 * uint32 QuicVersion; * enum { - * initial_max_stream_data(0), + * initial_max_stream_data_bidi_local(0), * initial_max_data(1), * initial_max_bidi_streams(2), * idle_timeout(3), @@ -6532,6 +6534,8 @@ ssl_dissect_hnd_hello_ext_quic_transport_parameters(ssl_common_dissect_t *hf, tv * ack_delay_exponent(7), * initial_max_uni_streams(8), * disable_migration(9), + * initial_max_stream_data_bidi_remote(10), + * initial_max_stream_data_uni(11), * (65535) * } TransportParameterId; * @@ -6625,8 +6629,8 @@ ssl_dissect_hnd_hello_ext_quic_transport_parameters(ssl_common_dissect_t *hf, tv tvb, offset, parameter_length, ENC_NA); switch (parameter_type) { - case SSL_HND_QUIC_TP_INITIAL_MAX_STREAM_DATA: - proto_tree_add_item(parameter_tree, hf->hf.hs_ext_quictp_parameter_initial_max_stream_data, + case SSL_HND_QUIC_TP_INITIAL_MAX_STREAM_DATA_BIDI_LOCAL: + proto_tree_add_item(parameter_tree, hf->hf.hs_ext_quictp_parameter_initial_max_stream_data_bidi_local, tvb, offset, 4, ENC_BIG_ENDIAN); proto_item_append_text(parameter_tree, " %u", tvb_get_ntohl(tvb, offset)); offset += 4; @@ -6721,6 +6725,18 @@ ssl_dissect_hnd_hello_ext_quic_transport_parameters(ssl_common_dissect_t *hf, tv case SSL_HND_QUIC_TP_DISABLE_MIGRATION: /* No Payload */ break; + case SSL_HND_QUIC_TP_INITIAL_MAX_STREAM_DATA_BIDI_REMOTE: + proto_tree_add_item(parameter_tree, hf->hf.hs_ext_quictp_parameter_initial_max_stream_data_bidi_remote, + tvb, offset, 4, ENC_BIG_ENDIAN); + proto_item_append_text(parameter_tree, " %u", tvb_get_ntohl(tvb, offset)); + offset += 4; + break; + case SSL_HND_QUIC_TP_INITIAL_MAX_STREAM_DATA_UNI: + proto_tree_add_item(parameter_tree, hf->hf.hs_ext_quictp_parameter_initial_max_stream_data_uni, + tvb, offset, 4, ENC_BIG_ENDIAN); + proto_item_append_text(parameter_tree, " %u", tvb_get_ntohl(tvb, offset)); + offset += 4; + break; default: offset += parameter_length; /*TODO display expert info about unknown ? */ diff --git a/epan/dissectors/packet-ssl-utils.h b/epan/dissectors/packet-ssl-utils.h index cfd01ceb99..2922fcbdcc 100644 --- a/epan/dissectors/packet-ssl-utils.h +++ b/epan/dissectors/packet-ssl-utils.h @@ -146,16 +146,18 @@ typedef enum { #define SSL_HND_CERT_STATUS_TYPE_OCSP_MULTI 2 #define SSL_HND_CERT_TYPE_RAW_PUBLIC_KEY 2 -#define SSL_HND_QUIC_TP_INITIAL_MAX_STREAM_DATA 0 -#define SSL_HND_QUIC_TP_INITIAL_MAX_DATA 1 -#define SSL_HND_QUIC_TP_INITIAL_MAX_BIDI_STREAMS 2 -#define SSL_HND_QUIC_TP_IDLE_TIMEOUT 3 -#define SSL_HND_QUIC_TP_PREFERRED_ADDRESS 4 -#define SSL_HND_QUIC_TP_MAX_PACKET_SIZE 5 -#define SSL_HND_QUIC_TP_STATELESS_RESET_TOKEN 6 -#define SSL_HND_QUIC_TP_ACK_DELAY_EXPONENT 7 -#define SSL_HND_QUIC_TP_INITIAL_MAX_UNI_STREAMS 8 -#define SSL_HND_QUIC_TP_DISABLE_MIGRATION 9 +#define SSL_HND_QUIC_TP_INITIAL_MAX_STREAM_DATA_BIDI_LOCAL 0 +#define SSL_HND_QUIC_TP_INITIAL_MAX_DATA 1 +#define SSL_HND_QUIC_TP_INITIAL_MAX_BIDI_STREAMS 2 +#define SSL_HND_QUIC_TP_IDLE_TIMEOUT 3 +#define SSL_HND_QUIC_TP_PREFERRED_ADDRESS 4 +#define SSL_HND_QUIC_TP_MAX_PACKET_SIZE 5 +#define SSL_HND_QUIC_TP_STATELESS_RESET_TOKEN 6 +#define SSL_HND_QUIC_TP_ACK_DELAY_EXPONENT 7 +#define SSL_HND_QUIC_TP_INITIAL_MAX_UNI_STREAMS 8 +#define SSL_HND_QUIC_TP_DISABLE_MIGRATION 9 +#define SSL_HND_QUIC_TP_INITIAL_MAX_STREAM_DATA_BIDI_REMOTE 10 +#define SSL_HND_QUIC_TP_INITIAL_MAX_STREAM_DATA_UNI 11 /* * Lookup tables @@ -844,7 +846,7 @@ typedef struct ssl_common_dissect { gint hs_ext_quictp_parameter_type; gint hs_ext_quictp_parameter_len; gint hs_ext_quictp_parameter_value; - gint hs_ext_quictp_parameter_initial_max_stream_data; + gint hs_ext_quictp_parameter_initial_max_stream_data_bidi_local; gint hs_ext_quictp_parameter_initial_max_data; gint hs_ext_quictp_parameter_initial_max_bidi_streams; gint hs_ext_quictp_parameter_idle_timeout; @@ -860,6 +862,8 @@ typedef struct ssl_common_dissect { gint hs_ext_quictp_parameter_stateless_reset_token; gint hs_ext_quictp_parameter_ack_delay_exponent; gint hs_ext_quictp_parameter_initial_max_uni_streams; + gint hs_ext_quictp_parameter_initial_max_stream_data_bidi_remote; + gint hs_ext_quictp_parameter_initial_max_stream_data_uni; /* do not forget to update SSL_COMMON_LIST_T and SSL_COMMON_HF_LIST! */ } hf; @@ -1076,7 +1080,7 @@ ssl_common_dissect_t name = { \ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, \ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, \ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, \ - -1, -1, -1, -1, -1, -1, \ + -1, -1, -1, -1, -1, -1, -1, -1, \ }, \ /* ett */ { \ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, \ @@ -1842,10 +1846,10 @@ ssl_common_dissect_t name = { \ FT_BYTES, BASE_NONE, NULL, 0x00, \ NULL, HFILL } \ }, \ - { & name .hf.hs_ext_quictp_parameter_initial_max_stream_data, \ - { "initial_max_stream_data", prefix ".quic.parameter.initial_max_stream_data", \ + { & name .hf.hs_ext_quictp_parameter_initial_max_stream_data_bidi_local, \ + { "initial_max_stream_data_bidi_local", prefix ".quic.parameter.initial_max_stream_data_bidi_local", \ FT_UINT32, BASE_DEC, NULL, 0x00, \ - "Contains the initial value for the maximum data that can be sent on any newly created stream", HFILL } \ + "Initial stream maximum data for bidirectional, locally-initiated streams", HFILL } \ }, \ { & name .hf.hs_ext_quictp_parameter_initial_max_data, \ { "initial_max_data", prefix ".quic.parameter.initial_max_data", \ @@ -1921,6 +1925,16 @@ ssl_common_dissect_t name = { \ { "initial_max_uni_streams", prefix ".quic.parameter.initial_max_uni_streams", \ FT_UINT16, BASE_DEC, NULL, 0x00, \ "Initial maximum number of application-owned unidirectional streams", HFILL } \ + }, \ + { & name .hf.hs_ext_quictp_parameter_initial_max_stream_data_bidi_remote, \ + { "initial_max_stream_data_bidi_remote", prefix ".quic.parameter.initial_max_stream_data_bidi_remote", \ + FT_UINT32, BASE_DEC, NULL, 0x00, \ + "Initial stream maximum data for bidirectional, peer-initiated streams", HFILL } \ + }, \ + { & name .hf.hs_ext_quictp_parameter_initial_max_stream_data_uni, \ + { "initial_max_stream_data_uni", prefix ".quic.parameter.initial_max_stream_data_uni", \ + FT_UINT32, BASE_DEC, NULL, 0x00, \ + "Initial stream maximum data for unidirectional streams parameter", HFILL } \ } /* }}} */ |