aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-icap.c
diff options
context:
space:
mode:
authorAndersBroman <anders.broman@ericsson.com>2014-06-18 21:37:32 +0200
committerAnders Broman <a.broman58@gmail.com>2014-06-18 19:39:27 +0000
commit681d82309a581f706995bd76f0db6d98da75b008 (patch)
tree6c762db550acbbb40a9b56a7bbd0f43161e8af0c /epan/dissectors/packet-icap.c
parent72078cfc91834f08272e433c66e886686140a20c (diff)
The data is actually http, call the http disector for it.
Change-Id: I58f63d79bc7f1838dd24a8dcd3e9c528648bdebd Reviewed-on: https://code.wireshark.org/review/2407 Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-icap.c')
-rw-r--r--epan/dissectors/packet-icap.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/epan/dissectors/packet-icap.c b/epan/dissectors/packet-icap.c
index 6393270476..5e47a5f225 100644
--- a/epan/dissectors/packet-icap.c
+++ b/epan/dissectors/packet-icap.c
@@ -53,6 +53,7 @@ static int hf_icap_options = -1;
static gint ett_icap = -1;
static dissector_handle_t data_handle;
+static dissector_handle_t http_handle;
#define TCP_PORT_ICAP 1344
static int is_icap_message(const guchar *data, int linelen, icap_type_t *type);
@@ -62,6 +63,7 @@ dissect_icap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree *icap_tree = NULL;
proto_item *ti = NULL;
proto_item *hidden_item;
+ tvbuff_t *new_tvb;
gint offset = 0;
const guchar *line;
gint next_offset;
@@ -248,9 +250,11 @@ is_icap_header:
}
datalen = tvb_captured_length_remaining(tvb, offset);
- if (datalen > 0) {
- call_dissector(data_handle,
- tvb_new_subset_remaining(tvb, offset), pinfo, icap_tree);
+ if (datalen > 0) {
+ if(http_handle){
+ new_tvb = tvb_new_subset_remaining(tvb, offset);
+ call_dissector(http_handle, new_tvb, pinfo, icap_tree);
+ }
}
}
@@ -326,7 +330,9 @@ proto_reg_handoff_icap(void)
{
dissector_handle_t icap_handle;
- data_handle = find_dissector("data");
+ data_handle = find_dissector("data");
+ http_handle = find_dissector("http");
+
icap_handle = create_dissector_handle(dissect_icap, proto_icap);
dissector_add_uint("tcp.port", TCP_PORT_ICAP, icap_handle);
}