diff options
author | Michael Mann <mmann78@netscape.net> | 2015-11-24 21:59:51 -0500 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2015-11-25 13:15:11 +0000 |
commit | dcfea6a06ddf7adeafc8613efe74310251201789 (patch) | |
tree | 04c70020bc89a90670634230a5be0560af7c9c3e /epan/dissectors/packet-ospf.c | |
parent | 479ab3bcdc8d79b27bfc99fcde073457f72126ac (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-ospf.c')
-rw-r--r-- | epan/dissectors/packet-ospf.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/epan/dissectors/packet-ospf.c b/epan/dissectors/packet-ospf.c index 29caa62b36..2f9f0904af 100644 --- a/epan/dissectors/packet-ospf.c +++ b/epan/dissectors/packet-ospf.c @@ -1038,8 +1038,8 @@ ospf_has_at_block(tvbuff_t *tvb, int offset, guint8 packet_type, guint8 version) return 0; } -static void -dissect_ospf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +static int +dissect_ospf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) { proto_tree *ospf_tree = NULL; proto_item *ti, *ti_sum, *hidden_item; @@ -1115,7 +1115,7 @@ dissect_ospf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* Quit at this point if it's an unknown OSPF version. */ if(version != OSPF_VERSION_2 && version != OSPF_VERSION_3) { - return; + return 12; } length = tvb_captured_length(tvb); @@ -1276,6 +1276,7 @@ dissect_ospf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) dissect_ospf_authentication_trailer(tvb, ospflen + crypto_len, ospf_tree); } + return tvb_captured_length(tvb); } static int @@ -3791,7 +3792,7 @@ proto_reg_handoff_ospf(void) { dissector_handle_t ospf_handle; - ospf_handle = create_dissector_handle(dissect_ospf, proto_ospf); + ospf_handle = new_create_dissector_handle(dissect_ospf, proto_ospf); dissector_add_uint("ip.proto", IP_PROTO_OSPF, ospf_handle); data_handle = find_dissector("data"); } |