Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: Re: [Wireshark-dev] Thinking of some changes to packet-scsi.c ...

From: ronnie sahlberg <ronniesahlberg@xxxxxxxxx>
Date: Sun, 5 Dec 2010 10:46:43 +1100
Yeah

The scsi dissector does need some tlc
to clean up and to harmonize the dissection according to the latest
versions of the standard.

For handling flags,
you may want to look at some examples such as

...
   static const int *aca_fields[] = {
        &hf_scsi_inq_aerc,	/* obsolete in spc3 and forward */
            &hf_scsi_inq_trmtsk,	/* obsolete in spc2 and forward */
            &hf_scsi_inq_normaca,
            &hf_scsi_inq_hisup,
            &hf_scsi_inq_rdf,
            NULL
    };
...
        /* aca flags */
        proto_tree_add_bitmask(tree, tvb_v, offset_v,
hf_scsi_inq_acaflags, ett_scsi_inq_acaflags, aca_fields, FALSE);
        offset_v+=1

which can simplify creating/dissecting bitfields.



this would be a reasonable summer of code project for a student,
go through all of spc/sbc/ssc/smc/mmc and update wireshark accordingly.
at the same time, and to have something to generate data to test with,
they could at the same time
enhance dbench.samba.org and its iscsi backend to be able to generate such i/o.



regards
ronnie sahlberg

On Sun, Dec 5, 2010 at 9:45 AM, Richard Sharpe
<realrichardsharpe@xxxxxxxxx> wrote:
> On Sat, Dec 4, 2010 at 6:29 AM, Chris Maynard <Chris.Maynard@xxxxxxxxx> wrote:
>> Richard Sharpe <realrichardsharpe@...> writes:
>>
>>> If there are any suggestions for other changes, let me know.
>>
>> Hi Richard.  It looks like there are other bit-oriented fields besides
>> hf_scsi_control that could benefit from this as well: hf_scsi_inquiry_flags,
>> hf_scsi_modesel_flags, ...
>>
>> There also seem to be a lot of proto_tree_add_text() calls (I count 186 of
>> them).  I haven't looked at them all, but I suspect most would be better added
>> using proto_tree_add_item() so those fields could be filterable as well.
>>
>> I saw that you posted a patch on Thursday.  Could you open up a bug report and
>> submit the patch(es) there instead?  I think it will make it easier to track and
>> the patches won't get lost.  Thanks.
>>
>
> I created bug https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5466
> for this since it has nothing to do with iSCSI...
>
> The patch I first posted needs reworking so I will not attach it yet.
>
> I will attach patches as I get make changes.
>
> --
> Regards,
> Richard Sharpe
> ___________________________________________________________________________
> Sent via:    Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
> Archives:    http://www.wireshark.org/lists/wireshark-dev
> Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
>             mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe
>