diff options
author | Patricia Lindner <lindnerp@ohio.edu> | 2022-08-23 17:51:39 -0400 |
---|---|---|
committer | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2022-10-03 20:02:43 +0000 |
commit | ddf0d3551693d8f6f57664f758171e6d0fa8ca13 (patch) | |
tree | bd082342c33826dd2d7fd353e60a6fa2bd95b56b /epan/dissectors/packet-bpsec.c | |
parent | 58cb2d6857219c7c55e3f1444b17eb9ed645ad13 (diff) |
BPv7: Enhance block data and payload data handling
This change improves sequence analysis and subdissector interfaces, adds
payload Decode As support for DTN and IPN services, and add heuristic
dissection for BTSD.
Diffstat (limited to 'epan/dissectors/packet-bpsec.c')
-rw-r--r-- | epan/dissectors/packet-bpsec.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/epan/dissectors/packet-bpsec.c b/epan/dissectors/packet-bpsec.c index ff6fc60981..b416d6953c 100644 --- a/epan/dissectors/packet-bpsec.c +++ b/epan/dissectors/packet-bpsec.c @@ -316,7 +316,9 @@ static int dissect_block_asb(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree } const gint offset_value = offset; - wscbor_skip_next_item(wmem_packet_scope(), tvb, &offset); + if (!wscbor_skip_next_item(wmem_packet_scope(), tvb, &offset)) { + return 0; + } tvbuff_t *tvb_value = tvb_new_subset_length(tvb, offset_value, offset - offset_value); dissector_handle_t value_dissect = NULL; @@ -375,7 +377,9 @@ static int dissect_block_asb(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree } const gint offset_value = offset; - wscbor_skip_next_item(wmem_packet_scope(), tvb, &offset); + if (!wscbor_skip_next_item(wmem_packet_scope(), tvb, &offset)) { + return 0; + } tvbuff_t *tvb_value = tvb_new_subset_length(tvb, offset_value, offset - offset_value); dissector_handle_t value_dissect = NULL; @@ -498,14 +502,14 @@ void proto_reg_handoff_bpsec(void) { /* Packaged extensions */ { guint64 *key = g_new(guint64, 1); - *key = 11; - dissector_handle_t hdl = create_dissector_handle(dissect_block_bib, proto_bpsec); + *key = BP_BLOCKTYPE_BIB; + dissector_handle_t hdl = create_dissector_handle_with_name(dissect_block_bib, proto_bpsec, "Block Integrity Block"); dissector_add_custom_table_handle("bpv7.block_type", key, hdl); } { guint64 *key = g_new(guint64, 1); - *key = 12; - dissector_handle_t hdl = create_dissector_handle(dissect_block_bcb, proto_bpsec); + *key = BP_BLOCKTYPE_BCB; + dissector_handle_t hdl = create_dissector_handle_with_name(dissect_block_bcb, proto_bpsec, "Block Confidentiality Block"); dissector_add_custom_table_handle("bpv7.block_type", key, hdl); } |