Wireshark-commits: [Wireshark-commits] master d809297: NFS: add dissect_nfs4_bitmap function
From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Fri, 18 Oct 2019 11:45:00 +0000
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=d809297ebf6026c2e3ceb306007a5260f19df916 Submitter: "Alexis La Goutte <alexis.lagoutte@xxxxxxxxx>" Changed: branch: master Repository: wireshark Commits: d809297 by Jorge Mora (jmora1300@xxxxxxxxx): NFS: add dissect_nfs4_bitmap function Add generic function to dissect the bitmap4 struct and optionally its corresponding opaque data. The behavior is customized by setting the nfs4_bitmap_info_t struct given as argument. The items are displayed when their corresponding hf_* labels are given (not set to NULL). The type argument if set to NFS4_BITMAP_MASK only the bitmap is dissected and displayed as a list of attribute names. Otherwise if set to NFS4_BITMAP_VALUES the bitmap is dissected including their respective values. The function dissect_nfs4_fattrs was modified to use dissect_nfs4_bitmap instead and all functionality which dissects the value of each attribute was moved to a separate function dissect_nfs4_fattr_value. All functionality from dissect_nfs4_fattrs is given in the new function dissect_nfs4_bitmap, but it also includes additional functionality: - Gracefully handle a bitmap attribute which does not have a dissector and a warning is displayed. - If there is a problem dissecting one of the bitmap attribute values then do not attempt to dissect any more values and a warning is given explaining why the values were not dissected. In this case at least the rest of the attributes names are displayed. - If any error is found dissecting the values then all bytes left undissected are just consumed so the rest of the NFS packet is correctly dissected. - Add subtree if the name is given, all bitmap data will be under this main tree. - Show mask label when the number of bitmap masks is 0 and the type is to display only the bitmap mask. Use function dissect_nfs4_bitmap instead to process the state protect bitmaps. Also, use correct labels "spo_must_enforce" and "spo_must_allow" instead of using the generic label "operation mask" for both bitmap masks. Finally, display the operation masks including the list of operation names in each mask. Use function dissect_nfs4_bitmap instead to process the hints mask in IO_ADVISE. Use function dissect_nfs4_bitmap instead to process the notify mask in GETDEVICEINFO. Bug: 16107 Change-Id: Ic470fd003bbc18feeadbd5d2cd0aa56329682bd6 Reviewed-on: https://code.wireshark.org/review/34714 Petri-Dish: Alexis La Goutte <alexis.lagoutte@xxxxxxxxx> Tested-by: Petri Dish Buildbot Reviewed-by: Alexis La Goutte <alexis.lagoutte@xxxxxxxxx> Actions performed: from 2c5f89a CMake: Add abillity to add custom taps. add d809297 NFS: add dissect_nfs4_bitmap function Summary of changes: epan/dissectors/packet-nfs.c | 1077 ++++++++++++++++++++++-------------------- 1 file changed, 558 insertions(+), 519 deletions(-)
- Prev by Date: [Wireshark-commits] master 2c5f89a: CMake: Add abillity to add custom taps.
- Next by Date: [Wireshark-commits] master-3.0 ab97de8: SRT: Fixed misnamed field srt.bufavail
- Previous by thread: [Wireshark-commits] master 2c5f89a: CMake: Add abillity to add custom taps.
- Next by thread: [Wireshark-commits] master-3.0 ab97de8: SRT: Fixed misnamed field srt.bufavail
- Index(es):