aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-imf.c
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2011-10-18 16:06:17 +0000
committerStig Bjørlykke <stig@bjorlykke.org>2011-10-18 16:06:17 +0000
commitcc182a8badab645d270929c968f505b8f16344f7 (patch)
tree37f63ebed749a92df612bcc6c9e06f533bd3063c /epan/dissectors/packet-imf.c
parent424463e083b505eee67830f70183c457c313ed7c (diff)
Added support for User-Agent.
Fixed finding line end for content type parameters. svn path=/trunk/; revision=39459
Diffstat (limited to 'epan/dissectors/packet-imf.c')
-rw-r--r--epan/dissectors/packet-imf.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/epan/dissectors/packet-imf.c b/epan/dissectors/packet-imf.c
index 0ee922b153..7753ea1b49 100644
--- a/epan/dissectors/packet-imf.c
+++ b/epan/dissectors/packet-imf.c
@@ -63,6 +63,7 @@ static int hf_imf_in_reply_to = -1;
static int hf_imf_references = -1;
static int hf_imf_subject = -1;
static int hf_imf_comments = -1;
+static int hf_imf_user_agent = -1;
static int hf_imf_keywords = -1;
static int hf_imf_resent_date = -1;
static int hf_imf_resent_from = -1;
@@ -180,6 +181,7 @@ static struct imf_field imf_fields[] = {
{"references", &hf_imf_references, NO_SUBDISSECTION, FALSE}, /* msg-id */
{"subject", &hf_imf_subject, NO_SUBDISSECTION, TRUE}, /* unstructured */
{"comments", &hf_imf_comments, NO_SUBDISSECTION, FALSE}, /* unstructured */
+ {"user-agent", &hf_imf_user_agent, NO_SUBDISSECTION, FALSE}, /* unstructured */
{"keywords", &hf_imf_keywords, NULL, FALSE}, /* phrase_list */
{"resent-date", &hf_imf_resent_date, NO_SUBDISSECTION, FALSE},
{"resent-from", &hf_imf_resent_from, dissect_imf_mailbox_list, FALSE},
@@ -603,7 +605,7 @@ dissect_imf_content_type(tvbuff_t *tvb, int offset, int length, proto_item *item
/* This string will be automatically freed */
(*type) = tvb_get_ephemeral_string(tvb, offset, len);
}
- len = length - (first_colon + 1 - offset);
+ len = tvb_find_line_end(tvb, first_colon + 1, length, NULL, FALSE);
proto_tree_add_item(ct_tree, hf_imf_content_type_parameters, tvb, first_colon + 1, len, ENC_ASCII|ENC_NA);
if(parameters) {
/* This string will be automatically freed */
@@ -962,6 +964,9 @@ proto_register_imf(void)
{ &hf_imf_comments,
{ "Comments", "imf.comments", FT_STRING, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
+ { &hf_imf_user_agent,
+ { "User-Agent", "imf.user_agent", FT_STRING, BASE_NONE, NULL, 0x0,
+ NULL, HFILL }},
{ &hf_imf_keywords,
{ "Keywords", "imf.keywords", FT_STRING, BASE_NONE, NULL, 0x0,
NULL, HFILL }},