diff options
Diffstat (limited to 'epan/dissectors/packet-spdy.c')
-rw-r--r-- | epan/dissectors/packet-spdy.c | 126 |
1 files changed, 63 insertions, 63 deletions
diff --git a/epan/dissectors/packet-spdy.c b/epan/dissectors/packet-spdy.c index 058124c993..254a630844 100644 --- a/epan/dissectors/packet-spdy.c +++ b/epan/dissectors/packet-spdy.c @@ -28,7 +28,7 @@ #include <epan/tap.h> #include "packet-tcp.h" #include "packet-tls.h" -#include "packet-http.h" +#include "packet-media-type.h" #ifdef HAVE_ZLIB #define ZLIB_CONST @@ -166,7 +166,7 @@ typedef struct _spdy_data_frame_t { } spdy_data_frame_t; typedef struct _spdy_stream_info_t { - http_type_t message_type; + media_container_type_t container_type; gchar *content_type; gchar *content_type_parameters; gchar *content_encoding; @@ -177,56 +177,56 @@ typedef struct _spdy_stream_info_t { /* Handles for metadata population. */ -static int spdy_tap = -1; -static int spdy_eo_tap = -1; - -static int proto_spdy = -1; -static int hf_spdy_data = -1; -static int hf_spdy_control_bit = -1; -static int hf_spdy_version = -1; -static int hf_spdy_type = -1; -static int hf_spdy_flags = -1; -static int hf_spdy_flags_fin = -1; -static int hf_spdy_flags_unidirectional = -1; -static int hf_spdy_flags_clear_settings = -1; -static int hf_spdy_flags_persist_value = -1; -static int hf_spdy_flags_persisted = -1; -static int hf_spdy_length = -1; -static int hf_spdy_header_block = -1; -static int hf_spdy_header = -1; -static int hf_spdy_header_name = -1; -static int hf_spdy_header_value = -1; -static int hf_spdy_streamid = -1; -static int hf_spdy_associated_streamid = -1; -static int hf_spdy_priority = -1; -static int hf_spdy_unused = -1; -static int hf_spdy_slot = -1; -static int hf_spdy_num_headers = -1; -static int hf_spdy_rst_stream_status = -1; -static int hf_spdy_num_settings = -1; -static int hf_spdy_setting = -1; -static int hf_spdy_setting_id = -1; -static int hf_spdy_setting_value = -1; -static int hf_spdy_ping_id = -1; -static int hf_spdy_goaway_last_good_stream_id = -1; -static int hf_spdy_goaway_status = -1; -static int hf_spdy_window_update_delta = -1; - -static gint ett_spdy = -1; -static gint ett_spdy_flags = -1; -static gint ett_spdy_header_block = -1; -static gint ett_spdy_header = -1; -static gint ett_spdy_setting = -1; - -static gint ett_spdy_encoded_entity = -1; - -static expert_field ei_spdy_inflation_failed = EI_INIT; -static expert_field ei_spdy_mal_frame_data = EI_INIT; -static expert_field ei_spdy_mal_setting_frame = EI_INIT; -static expert_field ei_spdy_invalid_rst_stream = EI_INIT; -static expert_field ei_spdy_invalid_go_away = EI_INIT; -static expert_field ei_spdy_invalid_frame_type = EI_INIT; -static expert_field ei_spdy_reassembly_info = EI_INIT; +static int spdy_tap; +static int spdy_eo_tap; + +static int proto_spdy; +static int hf_spdy_data; +static int hf_spdy_control_bit; +static int hf_spdy_version; +static int hf_spdy_type; +static int hf_spdy_flags; +static int hf_spdy_flags_fin; +static int hf_spdy_flags_unidirectional; +static int hf_spdy_flags_clear_settings; +static int hf_spdy_flags_persist_value; +static int hf_spdy_flags_persisted; +static int hf_spdy_length; +static int hf_spdy_header_block; +static int hf_spdy_header; +static int hf_spdy_header_name; +static int hf_spdy_header_value; +static int hf_spdy_streamid; +static int hf_spdy_associated_streamid; +static int hf_spdy_priority; +static int hf_spdy_unused; +static int hf_spdy_slot; +static int hf_spdy_num_headers; +static int hf_spdy_rst_stream_status; +static int hf_spdy_num_settings; +static int hf_spdy_setting; +static int hf_spdy_setting_id; +static int hf_spdy_setting_value; +static int hf_spdy_ping_id; +static int hf_spdy_goaway_last_good_stream_id; +static int hf_spdy_goaway_status; +static int hf_spdy_window_update_delta; + +static gint ett_spdy; +static gint ett_spdy_flags; +static gint ett_spdy_header_block; +static gint ett_spdy_header; +static gint ett_spdy_setting; + +static gint ett_spdy_encoded_entity; + +static expert_field ei_spdy_inflation_failed; +static expert_field ei_spdy_mal_frame_data; +static expert_field ei_spdy_mal_setting_frame; +static expert_field ei_spdy_invalid_rst_stream; +static expert_field ei_spdy_invalid_go_away; +static expert_field ei_spdy_invalid_frame_type; +static expert_field ei_spdy_reassembly_info; static dissector_handle_t media_handle; static dissector_handle_t spdy_handle; @@ -432,7 +432,7 @@ static const char spdy_dictionary[] = { * streams to avoid memory leaks. * XXX: can we be more aggressive and call this sooner for finished streams? */ -static gboolean inflate_end_cb (wmem_allocator_t *allocator _U_, +static bool inflate_end_cb (wmem_allocator_t *allocator _U_, wmem_cb_event_t event _U_, void *user_data) { inflateEnd((z_streamp)user_data); @@ -504,7 +504,7 @@ static spdy_conv_t * get_or_create_spdy_conversation_data(packet_info *pinfo) { */ static void spdy_save_stream_info(spdy_conv_t *conv_data, guint32 stream_id, - http_type_t message_type, + media_container_type_t container_type, gchar *content_type, gchar *content_type_params, gchar *content_encoding) { @@ -515,7 +515,7 @@ static void spdy_save_stream_info(spdy_conv_t *conv_data, } si = wmem_new(wmem_file_scope(), spdy_stream_info_t); - si->message_type = message_type; + si->container_type = container_type; si->content_type = content_type; si->content_type_parameters = content_type_params; si->content_encoding = content_encoding; @@ -717,7 +717,7 @@ static int dissect_spdy_data_payload(tvbuff_t *tvb, dissector_handle_t handle; guint num_data_frames; gboolean dissected; - http_message_info_t message_info; + media_content_info_t content_info; /* Add frame description. */ proto_item_append_text(spdy_proto, ", Stream: %d, Length: %d", @@ -904,14 +904,14 @@ static int dissect_spdy_data_payload(tvbuff_t *tvb, handle = dissector_get_string_handle(media_type_subdissector_table, si->content_type); } - message_info.type = si->message_type; - message_info.media_str = media_str; - message_info.data = NULL; + content_info.type = si->container_type; + content_info.media_str = media_str; + content_info.data = NULL; if (handle != NULL) { /* * We have a subdissector - call it. */ - dissected = call_dissector_with_data(handle, data_tvb, pinfo, spdy_tree, &message_info); + dissected = call_dissector_with_data(handle, data_tvb, pinfo, spdy_tree, &content_info); } else { dissected = FALSE; } @@ -921,7 +921,7 @@ static int dissect_spdy_data_payload(tvbuff_t *tvb, * Calling the default media handle if there is a content-type that * wasn't handled above. */ - call_dissector_with_data(media_handle, next_tvb, pinfo, spdy_tree, &message_info); + call_dissector_with_data(media_handle, next_tvb, pinfo, spdy_tree, &content_info); } else { /* Call the default data dissector */ call_data_dissector(next_tvb, pinfo, spdy_tree); @@ -1327,7 +1327,7 @@ static int dissect_spdy_header_payload( if (content_type != NULL && !pinfo->fd->visited) { gchar *content_type_params = spdy_parse_content_type(content_type); spdy_save_stream_info(conv_data, stream_id, - (hdr_status == NULL) ? HTTP_REQUEST : HTTP_RESPONSE, + (hdr_status == NULL) ? MEDIA_CONTAINER_HTTP_REQUEST : MEDIA_CONTAINER_HTTP_RESPONSE, content_type, content_type_params, content_encoding); } @@ -1734,7 +1734,7 @@ void proto_register_spdy(void) } }, { &hf_spdy_flags_unidirectional, - { "Unidirectional", "spdy.flags.fin", + { "Unidirectional", "spdy.flags.unidirectional", FT_BOOLEAN, 8, TFS(&tfs_set_notset), SPDY_FLAG_UNIDIRECTIONAL, NULL, HFILL |