diff options
author | Michael Mann <mmann78@netscape.net> | 2015-11-09 23:01:28 -0500 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2015-11-13 17:44:24 +0000 |
commit | 01f7356f85d33567a25e722e6488addd72ff64d4 (patch) | |
tree | 2d8623b57706cc924f76293f0f5b6ce8d83124ab /epan/dissectors/packet-ax25-nol3.c | |
parent | b776707af540d7431e815818e21ea1efac326d9f (diff) |
register_dissector -> new_register_dissector
Picking off "easy" dissectors that only have one or two exit points at most.
Change-Id: I3d5e576b796556ef070bb36d8b55da0b175dcba8
Reviewed-on: https://code.wireshark.org/review/11805
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-ax25-nol3.c')
-rw-r--r-- | epan/dissectors/packet-ax25-nol3.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/epan/dissectors/packet-ax25-nol3.c b/epan/dissectors/packet-ax25-nol3.c index 50dad15c19..21b6f8310e 100644 --- a/epan/dissectors/packet-ax25-nol3.c +++ b/epan/dissectors/packet-ax25-nol3.c @@ -78,8 +78,8 @@ static gint ett_dx = -1; /* Code to actually dissect the packets */ -static void -dissect_dx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) +static int +dissect_dx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* data _U_) { proto_item *ti; proto_tree *dx_tree; @@ -104,6 +104,8 @@ dissect_dx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) proto_tree_add_item( dx_tree, hf_dx_report, tvb, offset, data_len, ENC_ASCII|ENC_NA ); } + + return tvb_captured_length(tvb); } static gboolean @@ -208,7 +210,7 @@ dissect_ax25_nol3(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree ) if ( tvb_get_guint8( tvb, offset ) == 'D' && tvb_get_guint8( tvb, offset + 1 ) == 'X' ) { dissected = TRUE; - dissect_dx( next_tvb, pinfo, ax25_nol3_tree ); + dissect_dx( next_tvb, pinfo, ax25_nol3_tree, NULL ); } } if ( ! dissected ) @@ -272,7 +274,7 @@ proto_register_ax25_nol3(void) proto_dx = proto_register_protocol("DX cluster", "DX", "dx"); /* Register the dissector */ - register_dissector( "dx", dissect_dx, proto_dx); + new_register_dissector( "dx", dissect_dx, proto_dx); /* Register the header fields */ proto_register_field_array( proto_dx, hf_dx, array_length( hf_dx ) ); |