aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-fcp.c
AgeCommit message (Collapse)AuthorFilesLines
2017-11-07fcp: create conversation if it doesn't exist.Dario Lombardo1-4/+3
Change-Id: I0bcc17900a9379d9f9d1828b834c2116e1199bf6 Ping-Bug: 14168 Reviewed-on: https://code.wireshark.org/review/24277 Petri-Dish: Richard Sharpe <realrichardsharpe@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-10-28Convert to using find_conversation_pinfo where appropriateMichael Mann1-3/+1
This makes it easier to identify the simpler/common conversations Change-Id: I7094f23e49156ee27f5f72c8e130308470f3e462 Reviewed-on: https://code.wireshark.org/review/24145 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-01-10Rename tvb_new_subset() to tvb_new_subset_length_caplen().Guy Harris1-2/+2
This emphasizes that there is no such thing as *the* routine to construct a subset tvbuff; you need to choose one of tvb_new_subset_remaining() (if you want a new tvbuff that contains everything past a certain point in an existing tvbuff), tvb_new_subset_length() (if you want a subset that contains everything past a certain point, for some number of bytes, in an existing tvbuff), and tvb_new_subset_length_caplen() (for all other cases). Many of the calls to tvb_new_subset_length_caplen() should really be calling one of the other routines; that's the next step. (This also makes it easier to find the calls that need fixing.) Change-Id: Ieb3d676d8cda535451c119487d7cd3b559221f2b Reviewed-on: https://code.wireshark.org/review/19597 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-04-25fcp: fix 'conversation' was marked unused but was used ↵Alexis La Goutte1-1/+1
[-Werror,-Wused-but-marked-unused] Change-Id: I7ae05ed186cfd1df639c9c453e4b5fa5c02972d7 Reviewed-on: https://code.wireshark.org/review/15087 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-03-20Create call_data_dissector() to call data dissector.Michael Mann1-6/+2
This saves many dissectors the need to find the data dissector and store a handle to it. There were also some that were finding it, but not using it. For others this was the only reason for their handoff function, so it could be eliminated. Change-Id: I5d3f951ee1daa3d30c060d21bd12bbc881a8027b Reviewed-on: https://code.wireshark.org/review/14530 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-01-25Move the proto data stuff out of frame_data.[ch].Guy Harris1-0/+1
It's not tied to the frame_data structure any more, so it belongs by itself. Clean up some #includes while we're at it; in particular, frame_data.h doesn't use anything related to tvbuffs, so don't have it gratuitiously include tvbuff.h. Change-Id: Ic32922d4a3840bac47007c5d4c546b8842245e0c Reviewed-on: https://code.wireshark.org/review/13518 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-24Add the packet number to the packet_info structure, and use it.Guy Harris1-7/+7
That removes most of the uses of the frame number field in the frame_data structure. Change-Id: Ie22e4533e87f8360d7c0a61ca6ffb796cc233f22 Reviewed-on: https://code.wireshark.org/review/13509 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-23Add more fields to packet_info structure and use them.Guy Harris1-5/+5
Add fields for the absolute time stamp (and another field for a presence flag for the absolute time stamp) and the packet encapsulation for the packet. This lets us remove the field for the packet encapsulation in the frame_data structure; do so. Change-Id: Ifb910a9a192414e2a53086f3f7b97f39ed36aa39 Reviewed-on: https://code.wireshark.org/review/13499 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-09new_create_dissector_handle -> create_dissector_handle for dissector directory.Michael Mann1-1/+1
Some of the ASN.1 dissectors still generate a new_create_dissector_handle from the tool itself, so leave those for now. Change-Id: Ic6e5803b1444d7ac24070949f5fd557909a5641f Reviewed-on: https://code.wireshark.org/review/12484 Petri-Dish: Anders Broman <a.broman58@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-06-23Remove more deprecated tvb_length callsEvan Huus1-6/+6
Change-Id: Ie40a195db622ebfb096fa5088c5467a1385e69bf Reviewed-on: https://code.wireshark.org/review/9062 Reviewed-by: Evan Huus <eapache@gmail.com>
2015-04-18Convert proto_tree_add_boolean to ↵Michael Mann1-113/+39
proto_tree_add_bitmask_[value|value_with_flags|list] Part 1 of a few Change-Id: I413f23dfa92da5488ca8a7f62ca0738b25004635 Reviewed-on: https://code.wireshark.org/review/8117 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-12-23Deleting unneccessary #includes from dissectors.Martin Mathieson1-1/+0
Second batch (packet-eth.c -> packet-icmpv6.d). Will look at cleaning up and committing script afterwards. Change-Id: I14295758b81a59115d8c88899f166cc3d5d17594 Reviewed-on: https://code.wireshark.org/review/6013 Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2014-12-21Cleanup use of #includes in non-generated epan/dissector/*.cBill Meier1-3/+0
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-08-08Eliminate proto_tree_add_text from some dissectors.Michael Mann1-20/+12
Change-Id: I6f1710a093fc548c718defa9b40ab68877ede977 Reviewed-on: https://code.wireshark.org/review/3470 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-26convert to proto_tree_add_subtree[_format]Michael Mann1-12/+8
Change-Id: I525ac2aae2bdbfd5f3a2f3b35f1bf10dde053f66 Reviewed-on: https://code.wireshark.org/review/2667 Tested-by: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-19Revert "Fixup: tvb_* -> tvb_captured"Michael Mann1-6/+6
https://www.wireshark.org/lists/wireshark-dev/201406/msg00131.html This reverts commit 246fe2ca4c67d8c98caa84e2f57694f6322e2f96. Change-Id: Ib24bae0198c13a84bd7f731bf4af921212109a8f Reviewed-on: https://code.wireshark.org/review/2430 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-18Fixup: tvb_* -> tvb_capturedDario Lombardo1-6/+6
Change-Id: I9209c1271967405c34c1b6fa43e1726a4d3a5a3f Reviewed-on: https://code.wireshark.org/review/2377 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-09Add Modelines infoAlexis La Goutte1-0/+13
Change-Id: If3e77cbdfdeab75766984b10b3356b8343100602 Reviewed-on: https://code.wireshark.org/review/2065 Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-09Fix Dead Store (Dead assignement/Dead increment) warning found by ClangAlexis La Goutte1-4/+1
Change-Id: I08f4860a97d8406fef878887887b6537bf7600ee Reviewed-on: https://code.wireshark.org/review/2063 Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-07tvb_new_subset -> tvb_new_subset_length when length parameters are equal.Michael Mann1-1/+1
tvb_new_subset -> tvb_new_subset_remaining it appears that's what the intention is. Change-Id: I2334bbf3f10475b3c22391392fc8b6864454de2d Reviewed-on: https://code.wireshark.org/review/1999 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-04-29Add casts to satisfy buildbotEvan Huus1-3/+3
I'm really not sure why it's complaining about a cast *up* from a guint16 to a guint... Change-Id: Ie24ae0ea2361b54ed255773a0fc86250a240b55a Reviewed-on: https://code.wireshark.org/review/1431 Reviewed-by: Evan Huus <eapache@gmail.com>
2014-04-29Convert a few dissectors with simple request/response tracking from ↵Pascal Quantin1-5/+5
red/black tree to hash map Update the readme file accordingly Change-Id: I056d1ab1f77df641b83fa9b3618b6c25d66e1a83 Reviewed-on: https://code.wireshark.org/review/1420 Reviewed-by: Evan Huus <eapache@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-04Remove all $Id$ from top of fileAlexis La Goutte1-2/+0
(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-03Move value_string defs from .h file; create/use extended value_string; Other ↵Bill Meier1-2/+2
minor changes. - Multiple value string arrays were defined in packet-fcels.h (which was included in two differnt .c files). Only one of the arrays was actually used in two different .c files. All the value_string arrays (and most of the #defines) moved to packet-fcels.c. - Other: Use -1 instead of tvb_length() for the length param of several proto_tree_add...() calls. Add editor modelines. Change-Id: Idc642caf1c8d62b658147a234d5560b8f2fd0630 Reviewed-on: https://code.wireshark.org/review/479 Reviewed-by: Bill Meier <wmeier@newsguy.com> Tested-by: Bill Meier <wmeier@newsguy.com>
2013-12-15Fix [-Wmissing-prototypes]Jakub Zawadzki1-0/+3
svn path=/trunk/; revision=54135
2013-12-12Get rid of a dissector table that has never been used.Guy Harris1-21/+0
Get rid of a field that was hidden, always set to 0, and not obviously used anywhere. svn path=/trunk/; revision=53994
2013-12-10Reject the packet if data is NULL.Chris Maynard1-1/+6
svn path=/trunk/; revision=53899
2013-11-28Bugfix Negative Fibre Channel scsi_time value. Bug 3209 ↵Michael Mann1-29/+92
(https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3209) The solution was to move the itlq_nexus_t structure handling from the FC dissector to the FCS dissector since it's actually the one with the LUN field. OXID+LUN makes a unique exchange at FC layer so track that separately. Also needed some additional OXID->LUN mapping at the FC layer to keep LUN correctly persistent. Not backporting because this was partially made possible by r53569, which won't be backported. svn path=/trunk/; revision=53620
2013-11-25mark unused parameterMartin Kaiser1-1/+1
svn path=/trunk/; revision=53571
2013-11-25Remove Fibre Channel specific fields from packet_info and just have the ↵Michael Mann1-9/+7
fc_hdr or fc_data_t structure passed between all necessary dissectors. svn path=/trunk/; revision=53569
2013-11-23Create the ability to have packet scoped "proto" data. Bug 9470 ↵Michael Mann1-3/+3
(https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9470) I'm not sold on the name or module the proto_data functions live in, but I believe the function arguments are solid and gives us the most flexibility for the future. And search/replace of a function name is easy enough to do. The big driving force for getting this in sooner rather than later is the saved memory on ethernet packets (and IP packets soon), that used to have file_scope() proto data when all it needed was packet_scope() data (technically packet_info->pool scoped), strictly for Decode As. All dissectors that use p_add_proto_data() only for Decode As functionality have been converted to using packet_scope(). All other dissectors were converted to using file_scope() which was the original scope for "proto" data. svn path=/trunk/; revision=53520
2013-10-21Pass fc_hdr "private data" into subdissectors instead of using ↵Michael Mann1-6/+6
pinfo->private_data. svn path=/trunk/; revision=52729
2013-08-31Convert another 10 dissectors to wmem.Evan Huus1-11/+11
svn path=/trunk/; revision=51612
2013-07-03Fix some Dead Store (Dead assignement/Dead increment) Warning found by ClangAlexis La Goutte1-2/+4
svn path=/trunk/; revision=50357
2013-06-14Remove check_col() and the occasional tree.Michael Mann1-10/+4
svn path=/trunk/; revision=49920
2013-05-12Add the posibillity to use a key for per-packet-data.Anders Broman1-3/+3
svn path=/trunk/; revision=49259
2013-03-19From beroset:Anders Broman1-7/+7
remove C++ incompatibilities https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 svn path=/trunk/; revision=48412
2013-01-31Comment out unused hf[] entries & etc.Bill Meier1-4/+8
(found by checkhf) svn path=/trunk/; revision=47389
2012-12-08Fix some compiler warnings under gcc.Evan Huus1-11/+22
svn path=/trunk/; revision=46466
2012-12-08Bugfix FCP lun request/response tracking.Michael Mann1-30/+67
This works towards bug 3209 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3209) by at least satisfying the layer under SCSI. All of the dissectors that feed into SCSI seem to have similar "lun tracking" issues, so I think a more general solution may be needed to fix the bug "right" #BACKPORT svn path=/trunk/; revision=46464
2012-09-20We always HAVE_CONFIG_H so don't bother checking whether we have it or not.Jeff Morriss1-3/+1
svn path=/trunk/; revision=45017
2012-06-28Update FSF address - part II.Jakub Zawadzki1-1/+1
svn path=/trunk/; revision=43538
2012-05-04AFAICT sys/types.h & netinet/in.h #includes are not needed for these files.Bill Meier1-8/+0
(Let's see if any of the buildbots give any errors). Also: remove trailing whitespace on lines. svn path=/trunk/; revision=42429
2012-05-03General cleanup to include:Bill Meier1-386/+481
- remove unneeded includes; - remove "boilerplate" comments; - reformat hf[] entries; - reformat long lines; - unneeded use of check_col(); - whitespace fixes. svn path=/trunk/; revision=42402
2011-10-10 Convert 'encoding' parameter of certain proto_tree_add_item() calls in ↵Bill Meier1-2/+2
non-autogenerated epan/dissectors: Specifically: Replace FALSE|0 and TRUE|1 by ENC_BIG_ENDIAN|ENC_LITTLE_ENDIAN as the encoding parameter for proto_tree_add_item() calls which directly reference an item in hf[] which has a type of: FT_BOOLEAN FT_IPv4 FT_EUI64 FT_GUID FT_UINT_STRING Also: For type FT_ITv6 use ENC_NA. (This was missed in SVN #39260) svn path=/trunk/; revision=39328
2011-10-06Convert 'encoding' parameter of certain proto_tree_add_item() calls in ↵Bill Meier1-18/+18
non-autogenerated epan/dissectors: Specifically: Replace FALSE|0 and TRUE|1 by ENC_BIG_ENDIAN|ENC_LITTLE_ENDIAN as the encoding parameter for proto_tree_add_item() calls which directly reference an item in hf[] which has a type of: FT_UINT8 FT_UINT16 FT_UINT24 FT_UINT32 FT_UINT64 FT_INT8 FT_INT16 FT_INT24 FT_INT32 FT_INT64 FT_FLOAT FT_DOUBLE svn path=/trunk/; revision=39288
2011-10-05Use ENC_NA as encoding for proto_tree_add_item() calls which directly ↵Bill Meier1-1/+1
reference an hf item with types in hf[] of: FT_NONE FT_BYTES FT_IPV6 FT_IPXNET FT_OID svn path=/trunk/; revision=39261
2011-06-19Fix gcc 4.6 "set but not used [-Wunused-but-set-variable]" warnings.Bill Meier1-7/+1
svn path=/trunk/; revision=37716
2010-12-20Rename the routines that handle dissector tables with unsigned integerGuy Harris1-1/+1
keys to have _uint in their names, to match the routines that handle dissector tables with string keys. (Using _port can confuse people into thinking they're intended solely for use with TCP/UDP/etc. ports when, in fact, they work better for things such as Ethernet types, where the binding of particular values to particular protocols are a lot stronger.) svn path=/trunk/; revision=35224
2010-04-06#include <string.h> not needed.Bill Meier1-1/+0
svn path=/trunk/; revision=32410