diff options
author | Michael Tuexen <tuexen@wireshark.org> | 2016-04-12 23:07:48 +0200 |
---|---|---|
committer | Michael Tüxen <tuexen@wireshark.org> | 2016-04-12 22:04:01 +0000 |
commit | 03a4754b789f2509f9dc81597377935c9d8ea084 (patch) | |
tree | 5e70db72f8430233a9850bca8ff567029d611779 /epan | |
parent | 1b0a6ff5ab3c84f3822eecab0c72668b88ce7cd9 (diff) | |
download | wireshark-03a4754b789f2509f9dc81597377935c9d8ea084.tar.gz |
Add support for HTTP/SCTP.
Initially use SCTP port 80, which has been assigned by IANA
for HTTP/SCTP.
Change-Id: I0f153371b68a15485f8c43e77cbffee8055775b4
Reviewed-on: https://code.wireshark.org/review/14895
Petri-Dish: Michael Tüxen <tuexen@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Tüxen <tuexen@wireshark.org>
Diffstat (limited to 'epan')
-rw-r--r-- | epan/dissectors/packet-http.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/epan/dissectors/packet-http.c b/epan/dissectors/packet-http.c index 1caf49f63b..de8e4cdd37 100644 --- a/epan/dissectors/packet-http.c +++ b/epan/dissectors/packet-http.c @@ -277,6 +277,7 @@ static gboolean http_decompress_body = FALSE; */ #define TCP_DEFAULT_RANGE "80,3128,3132,5985,8080,8088,11371,1900,2869,2710" +#define SCTP_DEFAULT_RANGE "80" #define SSL_DEFAULT_RANGE "443" #define UPGRADE_WEBSOCKET 1 @@ -284,9 +285,11 @@ static gboolean http_decompress_body = FALSE; #define UPGRADE_SSTP 3 static range_t *global_http_tcp_range = NULL; +static range_t *global_http_sctp_range = NULL; static range_t *global_http_ssl_range = NULL; static range_t *http_tcp_range = NULL; +static range_t *http_sctp_range = NULL; static range_t *http_ssl_range = NULL; typedef void (*ReqRespDissector)(tvbuff_t*, proto_tree*, int, const guchar*, @@ -3133,6 +3136,11 @@ static void reinit_http(void) { http_tcp_range = range_copy(global_http_tcp_range); dissector_add_uint_range("tcp.port", http_tcp_range, http_handle); + dissector_delete_uint_range("sctp.port", http_sctp_range, http_handle); + g_free(http_sctp_range); + http_sctp_range = range_copy(global_http_sctp_range); + dissector_add_uint_range("sctp.port", http_sctp_range, http_handle); + range_foreach(http_ssl_range, range_delete_http_ssl_callback); g_free(http_ssl_range); http_ssl_range = range_copy(global_http_ssl_range); @@ -3471,6 +3479,12 @@ proto_register_http(void) "TCP Ports range", &global_http_tcp_range, 65535); + range_convert_str(&global_http_sctp_range, SCTP_DEFAULT_RANGE, 65535); + http_sctp_range = range_empty(); + prefs_register_range_preference(http_module, "sctp.port", "SCTP Ports", + "SCTP Ports range", + &global_http_sctp_range, 65535); + range_convert_str(&global_http_ssl_range, SSL_DEFAULT_RANGE, 65535); http_ssl_range = range_empty(); prefs_register_range_preference(http_module, "ssl.port", "SSL/TLS Ports", |