static int hf_http_transfer_encoding = -1;
static int hf_http_content_length = -1;
static int hf_http_media = -1;
+static int hf_http_host = -1;
static int hf_http_request_uri = -1;
static dissector_handle_t http_handle;
proto_item* pi = proto_tree_add_item(tree,proto_http,tvb,0,-1,FALSE);
proto_tree* pt = proto_item_add_subtree(pi,ett_http);
- tpg = tpg_start(pt,tvb,0,-1,msgdata);
+ tpg = tpg_start(pt,tvb,0,-1,http_tpg_data.wanted_http_sp, msgdata);
if (( reqresp = TPG_GET(tpg,http_tpg_data.wanted_http_req_resp) )) {
tvbparse_elem_t* hdr;
- while(( hdr = TPG_GET(tpg,http_tpg_data.wanted_http_header) )) ;
+ while(( hdr = TPG_GET(tpg,http_tpg_data.wanted_http_header) ))
+ ;
if ( TPG_GET(tpg,http_tpg_data.wanted_http_crlf) ) {
pi = proto_tree_add_boolean(pt,hf_http_is_response,tvb,0,0,msgdata->is_response);
pt = proto_item_add_subtree(pi,ett_http);
+
if (msgdata->is_response) {
proto_tree_add_uint(pt,hf_http_response_code,tvb,0,0,msgdata->response_code);
proto_tree_add_uint(pt,hf_http_content_length,tvb,0,0,msgdata->content_length);
if (msgdata->media) proto_tree_add_string(pt,hf_http_media,tvb,0,0,msgdata->media);
} else {
if (msgdata->request_method) proto_tree_add_string(pt,hf_http_request_method,tvb,0,0,msgdata->request_method);
+ if (msgdata->http_host) proto_tree_add_string(pt,hf_http_host,tvb,0,0,msgdata->http_host);
if (msgdata->request_uri) proto_tree_add_string(pt,hf_http_request_uri,tvb,0,0,msgdata->request_uri);
}
{ &hf_http_transfer_encoding, { "=Transfer-Encoding", "hyttp.info.transfer_encoding", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
{ &hf_http_content_length, { "=Content-Length", "hyttp.info.content_length", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
{ &hf_http_request_uri, { "=Request URI", "hyttp.info.uri", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
- { &hf_http_media, { "=Media", "hyttp.info.media", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }}
+ { &hf_http_media, { "=Media", "hyttp.info.media", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
+ { &hf_http_host, { "=Host", "hyttp.info.host", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }}
};
gint *ett[] = {