aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/tpg/packet-http.c
diff options
context:
space:
mode:
authorLuis Ontanon <luis.ontanon@gmail.com>2005-10-01 10:41:00 +0000
committerLuis Ontanon <luis.ontanon@gmail.com>2005-10-01 10:41:00 +0000
commit99104fe179bcbb0fbfbcf94fd7166c2af9e1c61b (patch)
tree211e2e8ac4b5a50abf0d69e4381a290723749593 /plugins/tpg/packet-http.c
parentaef8dd5c4c728c61fb8ea64c76e867823712267e (diff)
match changes to tpg infrastructure.
svn path=/trunk/; revision=16063
Diffstat (limited to 'plugins/tpg/packet-http.c')
-rw-r--r--plugins/tpg/packet-http.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/tpg/packet-http.c b/plugins/tpg/packet-http.c
index 9e01aadfd9..c37ea25235 100644
--- a/plugins/tpg/packet-http.c
+++ b/plugins/tpg/packet-http.c
@@ -21,6 +21,7 @@ static int hf_http_response_code = -1;
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;
@@ -43,6 +44,7 @@ static void dissect_http(tvbuff_t* tvb, packet_info* pinfo _U_, proto_tree* tree
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);
@@ -50,6 +52,7 @@ static void dissect_http(tvbuff_t* tvb, packet_info* pinfo _U_, proto_tree* tree
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);
}
@@ -71,7 +74,8 @@ static void proto_register_http(void) {
{ &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[] = {