FC: fix dissection when packets are captured with Fibre Channel FC-2 encapsulation type

This is broken since ga9dd765

Bug: 10751
Change-Id: Id4f282d9e0104bfa2314e2348aedf31233a671bd
Reviewed-on: https://code.wireshark.org/review/5594
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
This commit is contained in:
Pascal Quantin 2014-12-03 20:48:08 +01:00 committed by Alexis La Goutte
parent 0a30f6878d
commit c86d1d2dd1
1 changed files with 14 additions and 1 deletions

View File

@ -1292,6 +1292,18 @@ dissect_fc (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
return tvb_length(tvb);
}
static int
dissect_fc_wtap (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
fc_data_t fc_data;
fc_data.ethertype = ETHERTYPE_UNK;
fc_data.sof_eof = 0;
dissect_fc_helper (tvb, pinfo, tree, FALSE, &fc_data);
return tvb_length(tvb);
}
static int
dissect_fc_ifcp (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
{
@ -1643,7 +1655,8 @@ proto_register_fc(void)
void
proto_reg_handoff_fc (void)
{
dissector_add_uint("wtap_encap", WTAP_ENCAP_FIBRE_CHANNEL_FC2, fc_handle);
dissector_add_uint("wtap_encap", WTAP_ENCAP_FIBRE_CHANNEL_FC2,
new_create_dissector_handle(dissect_fc_wtap, proto_fc));
dissector_add_uint("wtap_encap", WTAP_ENCAP_FIBRE_CHANNEL_FC2_WITH_FRAME_DELIMS, fcsof_handle);