Commit Graph

243 Commits

Author SHA1 Message Date
Michael Mann 6de6f7f0f8 Further refactor SRT stats.
Create "common" SRT tap data collection intended for all GUIs.   Refactor/merge functionality of existing dissectors that have SRT support (AFP, DCERPC, Diameter, FC, GTP, LDAP, NCP, RPC, SCIS, SMB, and SMB2) for both TShark and GTK.

SMB and DCERPC "tap packet filtering" were different between TShark and GTK, so I went with GTK filter logic.
CAMEL "tap packet filtering" was different between TShark and GTK, so GTK filtering logic was pushed to the dissector and the TShark tap was left alone.

Change-Id: I7d6eaad0673fe628ef337f9165d7ed94f4a5e1cc
Reviewed-on: https://code.wireshark.org/review/8894
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-06-21 03:35:13 +00:00
Alexis La Goutte 3cc1178bbf SCSI: There are identical sub-expressions 'tvb_reported_length_remaining(tvb, offset)' to the left and to the right of the '!=' operator found by PVS Studio (V501)
Change-Id: Iaf7ea99e983d3b42dedf2620250dec0f3d68f937
Reviewed-on: https://code.wireshark.org/review/8790
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-06-06 14:06:39 +00:00
Alexis La Goutte 78c0aa320c SCSI: Fix Dead Store (Dead assignement/Dead increment) warning found by Clang
Change-Id: Ie71203081f807401d3eee5601a1885e9a311f81e
Reviewed-on: https://code.wireshark.org/review/8698
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-05-30 08:04:11 +00:00
Anish Bhatt b610db61da Update scsi lun id dissector, add support to handle all 4 addressing
methods

Bug 11078

Change-Id: I7a9ff07d83b4bb5f5512c04d71aa7f1d3baa0edd
Reviewed-on: https://code.wireshark.org/review/8181
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-05-29 05:22:15 +00:00
Anish Bhatt 751989629a Replace deprecated tvb_length* apis
Change-Id: Ia23a6cbc61dfaf65002ce63160e87877963a3cca
Reviewed-on: https://code.wireshark.org/review/8643
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-05-26 10:22:33 +00:00
Michael Mann 71c02b20eb Create FT_FCWWN field type.
Also, convert the "string" hf_ entries that used tvb_fcwwn_to_str as a string to use proto_tree_add_item with FT_FCWWN type.

Change-Id: I4ca77870499fd8239584a70874998b5d194a7167
Reviewed-on: https://code.wireshark.org/review/6036
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-12-28 20:05:29 +00:00
Martin Mathieson adb81f335d Deleting unnecessary #includes from dissectors.
Fifth batch (packet-rtp.c -> end).

Will look at cleaning up and committing script afterwards.

Change-Id: I8ed61dc941d98d3f7259a9d1f74e214eb7b4bfa2
Reviewed-on: https://code.wireshark.org/review/6052
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2014-12-25 22:43:20 +00:00
Bill Meier b5d7b7ab6e Cleanup use of #includes in non-generated epan/dissector/*.c
Specifically:
- Set packet.h to be the first wireshark #include after
   config.h and "system" #includes.
   packet.h added as an #include in some cases when missing.
- Remove some #includes included (directly/indirectly) in
   packet.h. E.g., glib.h.
   (Done only for those files including packet.h).
- As needed, move "system" #includes to be after config.h and
   before wireshark #includes.
- Rework various #include file specifications for consistency.
- Misc.

Change-Id: Ifaa1a14b50b69fbad38ea4838a49dfe595c54c95
Reviewed-on: https://code.wireshark.org/review/5923
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-12-21 05:46:22 +00:00
Bill Meier f412c9a01a Use ENC_BIG_ENDIAN when fetching FT_U?INT8 fields ...
(for some dissectors which fetch all other integral fields using
   ENC_BIG_ENDIAN).

Change-Id: Ic18e3172aad76af12b12d6732c88497be22aed56
Reviewed-on: https://code.wireshark.org/review/5748
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-12-13 18:45:56 +00:00
Yaniv Kaul 5b360a9671 SCSI: type and scope fields are ignored in some SCSI persistent reserve service actions
Bug: 10727
Change-Id: Id34f57b2a0b89867eec1b0a13db2eba037835804
Reviewed-on: https://code.wireshark.org/review/5493
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-11-25 23:10:13 +00:00
Michael Mann e77261f659 Eliminate proto_tree_add_text from some dissectors.
Change-Id: Ib160211198ca02f7eacf29d04568628c11f208a5
Reviewed-on: https://code.wireshark.org/review/5407
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-11-20 16:09:09 +00:00
Bill Meier 18d72987cb Do encoding-arg changes (all benign)
For:
- FT_BYTES: Always use just ENC_NA
- integral/floating (other than FT_[U]INT8): Do ENC_NA --> ENC_BIG_ENDIAN

Also:
- FT_UINT... --> FT_UINT8 in a few cases (to match proto_tree_add_item...)
- Change one case of incorrect '||' to '|'

Change-Id: I427e0e61618ff8faf55691c8a695930f67d455b0
Reviewed-on: https://code.wireshark.org/review/4184
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-09-19 01:38:08 +00:00
Bill Meier b14bf98c06 Fix spelling: cant-->can't, wont-->won't, etc
Change-Id: I4497f1b8b6eab0e576d9dd31b732965f9a6679c6
Reviewed-on: https://code.wireshark.org/review/4124
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-09-16 13:51:51 +00:00
Ronnie Sahlberg 79d7e5d488 SCSI: fix dissection of ElementAddress... mode page for SMC devices
Change-Id: If16ad422ab851f538af309fbf7d567bd2a13cace
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
Reviewed-on: https://code.wireshark.org/review/4029
2014-09-08 01:15:37 +00:00
Michael Mann 6691293a65 convert to proto_tree_add_subtree[_format]
Change-Id: I8d66b1bc7dbdfee3d4bf6fd3b3c21c6323b66f44
Reviewed-on: https://code.wireshark.org/review/2946
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-07-09 00:25:04 +00:00
Michael Mann 14824e6adf Revert "Fixup: tvb_* -> tvb_captured"
https://www.wireshark.org/lists/wireshark-dev/201406/msg00131.html

This reverts commit 246fe2ca4c.

Change-Id: Ib24bae0198c13a84bd7f731bf4af921212109a8f
Reviewed-on: https://code.wireshark.org/review/2430
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-19 18:25:59 +00:00
Dario Lombardo 246fe2ca4c Fixup: tvb_* -> tvb_captured
Change-Id: I9209c1271967405c34c1b6fa43e1726a4d3a5a3f
Reviewed-on: https://code.wireshark.org/review/2377
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-18 14:14:58 +00:00
Bill Meier d51cac21b1 Fix "might be clobbered by 'longjmp' or 'vfork' [-Werror=clobbered]" warning from gcc 4.9
Rework code related to TRY_SCSI_CDB_ALLOC_LEN macro to simplify and clarify same.
Rename some vars to catch any incorrect usage.

Change-Id: Ibf9465c5ce7670aa1147e0c311c37e582ece427a
Reviewed-on: https://code.wireshark.org/review/1177
Reviewed-by: Bill Meier <wmeier@newsguy.com>
Tested-by: Bill Meier <wmeier@newsguy.com>
2014-04-17 00:16:52 +00:00
Yaniv Kaul f4de2a2dd1 packet-scsi.c minor changes - add WWN dissection and fix a typo
Change-Id: I0ef84e088988f1a40863ab54b722faace8bacc31
Reviewed-on: https://code.wireshark.org/review/592
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-11 05:27:41 +00:00
Alexis La Goutte 296591399f Remove all $Id$ from top of file
(Using sed : sed -i '/^ \* \$Id\$/,+1 d')

Fix manually some typo (in export_object_dicom.c and crc16-plain.c)

Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8
Reviewed-on: https://code.wireshark.org/review/497
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-04 14:27:33 +00:00
Alexis La Goutte c39b9e7db5 Fix Dead Store (Dead assignement/Dead increment) warning found by Clang
svn path=/trunk/; revision=54457
2013-12-26 09:54:31 +00:00
Alexis La Goutte 766d4438f2 Fix -Wunused-const-variable found by Clang
svn path=/trunk/; revision=54456
2013-12-26 09:54:22 +00:00
Alexis La Goutte 00fb8f078a From Yaniv Kaul via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9595
Small changes (mainly textual) to packet-scsi.c

The attached patch fixes small issues in SCSI dissection:
1. Extends the meaning of some fields (for example, the mysterious 'LBPME' becomes 'LBPME (logical block provisioning management enabled) / TPE'
2. Adds another ASC value which is important to me - 'Thin Provisioning Soft Threshold Reached' . Added comment where to get all of them (at  http://www.t10.org/lists/asc-alph.txt or http://www.t10.org/lists/asc-num.txt)
3. Fixes a small typo: scsi.extcopy.dest_lba is 'Destination LBA', not 'Source LBA' (silly copy-paste mistake).

svn path=/trunk/; revision=54455
2013-12-26 09:54:12 +00:00
Bill Meier eecbfd1f3b Reove _U_ from some function parameters ...
svn path=/trunk/; revision=54386
2013-12-23 15:35:07 +00:00
Martin Mathieson f687bd18da Change types to try to avoid warnings.
svn path=/trunk/; revision=54385
2013-12-23 15:25:05 +00:00
Alexis La Goutte 5742802a73 From Yaniv Kaul via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9551
Dissect SCSI XCOPY and RECEIVE COPY Parameters commands

From me :
Fix encoding-args
Fix trailing whitespace

svn path=/trunk/; revision=54381
2013-12-23 13:45:07 +00:00
Bill Meier 1de89438f2 Create/use a number of extended value-strings;
Remove or comment out dups from several value-string arrays;
 Sort a number of value-string arrays;
Reformat many hf[] entries;
Remove some unneeded initializers;
Add editor-modelines;
Use consistent indentation;
Reformat whitespace.

svn path=/trunk/; revision=53968
2013-12-12 19:26:55 +00:00
Anders Broman 2939977a4b - Make local functions static.
- Forward declaration of register functions.

svn path=/trunk/; revision=53942
2013-12-11 20:04:37 +00:00
Bill Meier 9874da2fcb #if 0 numerous "unused const variables" (mostly value-string-arrays);
Also; fix a few "set but not used" warnings.

svn path=/trunk/; revision=52780
2013-10-23 06:29:11 +00:00
Bill Meier 2ac134b3c5 whitespace fixes; mostly: remove trailing blanks
svn path=/trunk/; revision=52591
2013-10-13 19:56:52 +00:00
Jörg Mayer f737cea032 emem -> wmem
svn path=/trunk/; revision=52038
2013-09-14 14:33:04 +00:00
Evan Huus 21d9e011d0 From Yaniv Kaul via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9040
Small fixes and enhancements to SCSI INQUIRY results.

svn path=/trunk/; revision=51362
2013-08-15 02:23:53 +00:00
Anders Broman 4daf984804 From Yaniv Kaul:
small addition to SCSI dissection (media rotation speed analysis)

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9030

svn path=/trunk/; revision=51330
2013-08-13 05:19:48 +00:00
Jeff Morriss 77ff8f6d59 Remove a couple of set-but-no-longer-used variables.
svn path=/trunk/; revision=51225
2013-08-08 18:03:29 +00:00
Michael Mann 30e199e2a1 Use convert_proto_tree_add_text.pl to make many more fields filterable.
Someone may want to check that the display filter naming scheme is consistent, I at least tried to make it consistent with the new filters created.
May want to also add subtrees for the bit flags that used to be grouped in a single proto_tree_add_text.

svn path=/trunk/; revision=51223
2013-08-08 17:25:03 +00:00
Anders Broman 907e735f60 From Javier Godoy:
Dissect SCSI OSD attribute identification sense data descriptor.

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8971

svn path=/trunk/; revision=51179
2013-08-07 04:28:35 +00:00
Michael Mann 86472b67df SCSI dissector does not parse PERSISTENT RESERVE commands correctly. Bug 9012 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9012).
From Bart Van Assche.

Changes:
- Add REGISTER AND MOVE and REPLACE LOST RESERVATION service actions.
- Decode the PARAMETER LIST LENGTH field correctly - this is a four
  byte field instead of a two byte field.
- For the REGISTER AND MOVE service action, add support for decoding
  the RELATIVE TARGET PORT IDENTIFIER, TRANSPORT ID LENGTH and
  TransportID fields.
- Fix parsing of the SERVICE ACTION field - this field is five bits
  wide instead of four.
- Move the definition of the "scsi.persresv.control.unreg" field just
  below the other REGISTER AND MOVE service action parameter list fields.

See also http://www.t10.org/cgi-bin/ac.pl?t=f&f=spc4r36h.pdf.

- Only display persistent reservation information in a PERSISTENT
  RESERVE IN response if the ALLOCATION LENGTH field in the request
  was not zero.
- Correct the offset of the (SPC-2) SCOPE-SPECIFIC ADDRESS field.
  This field starts at offset 16 and not at offset 8.
- Correct the offsets of the SCOPE and TYPE fields. These fields
  are both contained in the byte at offset 21.
- Correct the base of the TRANSPORTID LENGTH field from BASE_HEX
  into BASE_NONE since this is the base required by non-numeric types.

For more information, see also:
* http://www.t10.org/cgi-bin/ac.pl?t=f&f=spc4r36h.pdf
* http://www.t10.org/cgi-bin/ac.pl?t=f&f=spc2r20.pdf

svn path=/trunk/; revision=51152
2013-08-05 15:55:10 +00:00
Alexis La Goutte 99d0205c93 From Javier Godoy via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8963
packet-scsi.c add asc/ascq code 2C:0A

Add ASC/ASCQ code 2C:0Ah "PARTITION OR COLLECTION CONTAINS USER OBJECTS" (SPC-4

svn path=/trunk/; revision=50828
2013-07-23 10:37:01 +00:00
Alexis La Goutte d7095ca214 From Javier Godoy via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8965
Packet-scsi.c: fix subtree reference: ett_sense_osd_completed

The field hf_scsi_sns_osd_object_completed should be dissected under ett_sense_osd_completed instead of ett_sense_osd_not_initiated
(It was a copy-paste error in attachment 10967 from bug 8790)

svn path=/trunk/; revision=50827
2013-07-23 10:36:52 +00:00
Jakub Zawadzki a18172147f Remove fragment_data, add fragment_head, fragment_item - for now alias it to the same structure.
This is begin of work to split fragment head and fragments items.

svn path=/trunk/; revision=50708
2013-07-17 21:12:24 +00:00
Alexis La Goutte d9b440a07a Fix typo (Missing CR)
svn path=/trunk/; revision=50342
2013-07-03 16:42:00 +00:00
Alexis La Goutte 1a364db097 Fix warning from fix-encoding-args
epan/dissectors/packet-scsi.c:  FT_BYTES:         proto_tree_add_item(tree, hf_scsi_report_opcodes_cdb_usage_data,                            tvb_v, offset_v+4, length, [[ENC_BIG_ENDIAN]-->[ENC_NA]]);

svn path=/trunk/; revision=50246
2013-06-29 22:01:13 +00:00
Alexis La Goutte e0343b57c3 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=50235
2013-06-29 21:59:25 +00:00
Michael Mann dfa2156e30 Remove check_col() and the occasional tree.
svn path=/trunk/; revision=49923
2013-06-14 02:50:46 +00:00
Jeff Morriss 5fa16b2008 From Javier Godoy via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8794 :
Display the value of unknown sense descriptor codes in the tree item.
Also fix the length of the subtree.

svn path=/trunk/; revision=49916
2013-06-13 13:51:19 +00:00
Martin Kaiser 346117c265 From Javier Godoy
dissect SCSI OSD error identification sense data descriptor 

from me
- TABs -> spaces
- fix compiler errors about unused return values
- don't use another subtree within the descriptor payload

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8790

svn path=/trunk/; revision=49901
2013-06-12 14:20:36 +00:00
Anders Broman ddd78fbd78 From Javier Godoy:
dissect SCSI field pointer sense key specific information

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8789

svn path=/trunk/; revision=49895
2013-06-12 05:15:45 +00:00
Martin Kaiser 5b38f1d6e4 TABs -> spaces
add editor modelines

svn path=/trunk/; revision=49891
2013-06-11 21:33:48 +00:00
Martin Kaiser 6f6e265cf3 From Javier Godoy
dissect SCSI descriptor format sense data

from me
- replace TABs with spaces
- delete unused variable "flags"
- set format string for proto_tree_add_text()
- use val_to_str_const()

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8786

svn path=/trunk/; revision=49890
2013-06-11 21:22:58 +00:00
Anders Broman 3f896af42c From Javier Godoy:
update SCSI version descriptors defined in SPC-4 revision 36g (scsi_verdesc_val).

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8784

svn path=/trunk/; revision=49877
2013-06-11 05:06:36 +00:00