aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-cups.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2015-11-24 21:59:51 -0500
committerMichael Mann <mmann78@netscape.net>2015-11-25 13:15:11 +0000
commitdcfea6a06ddf7adeafc8613efe74310251201789 (patch)
tree04c70020bc89a90670634230a5be0560af7c9c3e /epan/dissectors/packet-cups.c
parent479ab3bcdc8d79b27bfc99fcde073457f72126ac (diff)
create_dissector_handle -> new_create_dissector_handle
This finalizes the transformation for dissectors. Change-Id: Ie5986b72bb69a6e8779ca3f5e20a80357c9e6fea Reviewed-on: https://code.wireshark.org/review/12122 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-cups.c')
-rw-r--r--epan/dissectors/packet-cups.c28
1 files changed, 15 insertions, 13 deletions
diff --git a/epan/dissectors/packet-cups.c b/epan/dissectors/packet-cups.c
index ad6ab5892f..e0f86b291d 100644
--- a/epan/dissectors/packet-cups.c
+++ b/epan/dissectors/packet-cups.c
@@ -120,8 +120,8 @@ static const guint8* get_unquoted_string(tvbuff_t *tvb, gint offset,
/**********************************************************************/
-static void
-dissect_cups(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static int
+dissect_cups(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
proto_tree *cups_tree = NULL;
proto_tree *ptype_subtree = NULL;
@@ -169,7 +169,7 @@ dissect_cups(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
offset = next_offset;
if (!skip_space(tvb, offset, &next_offset))
- return; /* end of packet */
+ return offset; /* end of packet */
offset = next_offset;
state = get_hex_uint(tvb, offset, &next_offset);
@@ -180,12 +180,12 @@ dissect_cups(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
offset = next_offset;
if (!skip_space(tvb, offset, &next_offset))
- return; /* end of packet */
+ return offset; /* end of packet */
offset = next_offset;
str = get_unquoted_string(tvb, offset, &next_offset, &len);
if (str == NULL)
- return; /* separator/terminator not found */
+ return offset; /* separator/terminator not found */
proto_tree_add_string(cups_tree, hf_cups_uri, tvb, offset, len, str);
col_add_fstr(pinfo->cinfo, COL_INFO, "%.*s (%s)",
@@ -193,36 +193,38 @@ dissect_cups(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
offset = next_offset;
if (!cups_tree)
- return;
+ return offset;
if (!skip_space(tvb, offset, &next_offset))
- return; /* end of packet */
+ return offset; /* end of packet */
offset = next_offset;
str = get_quoted_string(tvb, offset, &next_offset, &len);
if (str == NULL)
- return; /* separator/terminator not found */
+ return offset; /* separator/terminator not found */
proto_tree_add_string(cups_tree, hf_cups_location, tvb, offset+1, len, str);
offset = next_offset;
if (!skip_space(tvb, offset, &next_offset))
- return; /* end of packet */
+ return offset; /* end of packet */
offset = next_offset;
str = get_quoted_string(tvb, offset, &next_offset, &len);
if (str == NULL)
- return; /* separator/terminator not found */
+ return offset; /* separator/terminator not found */
proto_tree_add_string(cups_tree, hf_cups_information, tvb, offset+1, len, str);
offset = next_offset;
if (!skip_space(tvb, offset, &next_offset))
- return; /* end of packet */
+ return offset; /* end of packet */
offset = next_offset;
str = get_quoted_string(tvb, offset, &next_offset, &len);
if (str == NULL)
- return; /* separator/terminator not found */
+ return offset; /* separator/terminator not found */
proto_tree_add_string(cups_tree, hf_cups_make_model, tvb, offset+1, len, str);
+
+ return next_offset;
}
static guint
@@ -402,7 +404,7 @@ proto_reg_handoff_cups(void)
{
dissector_handle_t cups_handle;
- cups_handle = create_dissector_handle(dissect_cups, proto_cups);
+ cups_handle = new_create_dissector_handle(dissect_cups, proto_cups);
dissector_add_uint("udp.port", UDP_PORT_CUPS, cups_handle);
}