aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-sipfrag.c
diff options
context:
space:
mode:
authormartinm <martinm@f5534014-38df-0310-8fa8-9805f1628bb7>2006-08-07 17:10:59 +0000
committermartinm <martinm@f5534014-38df-0310-8fa8-9805f1628bb7>2006-08-07 17:10:59 +0000
commit8f8b0597eb8790755fbd617b49c019f792f9c85b (patch)
treefc509ab37295a195db1cc14f1f637ab49d0cf90f /epan/dissectors/packet-sipfrag.c
parentceddd626d4a3f1cd289191ca3852789ae12b3d5f (diff)
Tidy up comments, var names, remove pedantic warnings
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@18849 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-sipfrag.c')
-rw-r--r--epan/dissectors/packet-sipfrag.c28
1 files changed, 13 insertions, 15 deletions
diff --git a/epan/dissectors/packet-sipfrag.c b/epan/dissectors/packet-sipfrag.c
index 9ce488eabd..0837c959b6 100644
--- a/epan/dissectors/packet-sipfrag.c
+++ b/epan/dissectors/packet-sipfrag.c
@@ -31,26 +31,26 @@
#include <epan/packet.h>
/*
- * TODO:
- * Doesn't currently dissect the lines of the message.
- * Need to refactor SIP dissector and make its functionality available here
+ * Doesn't do a detailed dissection of the lines of the message, just treat as text.
*/
/* Initialize the protocol and registered fields. */
static int proto_sipfrag = -1;
-static int hf_line = -1;
+static int hf_sipfrag_line = -1;
/* Protocol subtree. */
static int ett_sipfrag = -1;
+void proto_reg_handoff_sipfrag(void);
+static void dissect_sipfrag(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
+
/* Main dissection function. */
-static void
-dissect_sipfrag(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static void dissect_sipfrag(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- proto_tree *sipfrag_tree;
- proto_item *ti;
+ proto_tree *sipfrag_tree;
+ proto_item *ti;
gint offset = 0;
gint next_offset;
int linelen;
@@ -79,8 +79,8 @@ dissect_sipfrag(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* For now, add all lines as unparsed strings */
/* Extract & add the string. */
- string = tvb_get_ephemeral_string(tvb, offset, linelen);
- proto_tree_add_string_format(sipfrag_tree, hf_line,
+ string = (char*)tvb_get_ephemeral_string(tvb, offset, linelen);
+ proto_tree_add_string_format(sipfrag_tree, hf_sipfrag_line,
tvb, offset,
linelen, string,
"%s", string);
@@ -101,12 +101,11 @@ dissect_sipfrag(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
}
-void
-proto_register_sipfrag(void)
+void proto_register_sipfrag(void)
{
static hf_register_info hf[] =
{
- { &hf_line,
+ { &hf_sipfrag_line,
{ "Line",
"sipfrag.line",FT_STRING, BASE_NONE, NULL, 0x0, "Line", HFILL
}
@@ -127,8 +126,7 @@ proto_register_sipfrag(void)
register_dissector("sipfrag", dissect_sipfrag, proto_sipfrag);
}
-void
-proto_reg_handoff_sipfrag(void)
+void proto_reg_handoff_sipfrag(void)
{
dissector_handle_t sipfrag_handle = find_dissector("sipfrag");
dissector_add_string("media_type", "message/sipfrag", sipfrag_handle);