diff options
author | Michael Mann <mmann78@netscape.net> | 2015-11-22 22:59:08 -0500 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2015-11-23 13:09:55 +0000 |
commit | 2bbbb4879c3e0885fd971bd75ca88a183feb92f0 (patch) | |
tree | 9bbd51756fa6230f3555612e27863b316371ad38 /epan/dissectors/packet-lapsat.c | |
parent | 073cfb33ec84f12d7904f0e6ed2b0a5d049f4ded (diff) |
register_dissector -> new_register_dissector
Change-Id: Ic368dd8e83cf39e0c934da0ae2744778e2d54ce6
Reviewed-on: https://code.wireshark.org/review/12050
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-lapsat.c')
-rw-r--r-- | epan/dissectors/packet-lapsat.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/epan/dissectors/packet-lapsat.c b/epan/dissectors/packet-lapsat.c index 91fc71b409..2146c8f388 100644 --- a/epan/dissectors/packet-lapsat.c +++ b/epan/dissectors/packet-lapsat.c @@ -433,8 +433,8 @@ dissect_control(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int is_ return ctl; } -static void -dissect_lapsat(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +static int +dissect_lapsat(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* dissector_data _U_) { proto_tree *lapsat_tree, *addr_tree; proto_item *lapsat_ti, *addr_ti; @@ -445,7 +445,7 @@ dissect_lapsat(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* Check that there's enough data */ if (tvb_captured_length(tvb) < LAPSAT_HEADER_LEN) - return; + return 0; /* Set protocol column */ col_set_str(pinfo->cinfo, COL_PROTOCOL, "LAPSat"); @@ -503,7 +503,7 @@ dissect_lapsat(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) tvb_get_guint8(tvb, 3) : tvb_captured_length(tvb) - hlen; if (!plen) - return; /* No point in doing more if there is no payload */ + return 3; /* No point in doing more if there is no payload */ DISSECTOR_ASSERT((plen + hlen) <= tvb_captured_length(tvb)); @@ -574,6 +574,7 @@ dissect_lapsat(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if (!dissector_try_uint(lapsat_sapi_dissector_table, sapi, payload, pinfo, tree)) call_dissector(data_handle, payload, pinfo, tree); } + return tvb_captured_length(tvb); } void @@ -762,7 +763,7 @@ proto_register_lapsat(void) proto_register_field_array (proto_lapsat, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); - register_dissector("lapsat", dissect_lapsat, proto_lapsat); + new_register_dissector("lapsat", dissect_lapsat, proto_lapsat); lapsat_sapi_dissector_table = register_dissector_table("lapsat.sapi", "LAPSat SAPI", FT_UINT8, BASE_DEC, DISSECTOR_TABLE_NOT_ALLOW_DUPLICATE); |