aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-fcp.c
AgeCommit message (Collapse)AuthorFilesLines
2010-04-06#include <string.h> not needed.wmeier1-1/+0
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@32410 f5534014-38df-0310-8fa8-9805f1628bb7
2010-04-03Remove unneeded #include <stdio.h>wmeier1-1/+0
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@32367 f5534014-38df-0310-8fa8-9805f1628bb7
2010-01-13From Didier Gautheron:etxrab1-21/+7
check_col.diff Remove redundant calls to check_col() if it guards only one columns function with one parameter after the column type. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4394 git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@31519 f5534014-38df-0310-8fa8-9805f1628bb7
2009-10-17From Joe Eykholt:jake1-8/+85
It would be nice to have dissection of the Fibre-Channel FCP "Sequence retransmission request" (SRR) request. This is like an FC ELS request, but it has FC type FCP, so it's a little strange. It seemed like the best place to put it is in packet-fcp.c but a slight hook is needed in packet-fc.c to recognize that packet-fcp is the correct dissector. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@30587 f5534014-38df-0310-8fa8-9805f1628bb7
2009-08-09Don't guard col_set_str (COL_PROTOCOL) with col_checkkrj1-2/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@29340 f5534014-38df-0310-8fa8-9805f1628bb7
2009-06-18From Kovarththanan Rajaratnam via bug 3548:stig1-37/+37
(1) Trailing/leading spaces are removed from 'name's/'blurb's (2) Duplicate 'blurb's are replaced with NULL (3) Empty ("") 'blurb's are replaced with NULL (4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME, FT_PROTOCOL, FT_STRING and FT_STRINGZ field types (5) Only allow non-zero value for 'display' if 'bitmask' is non-zero git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@28770 f5534014-38df-0310-8fa8-9805f1628bb7
2008-08-25#include <prefs.h> not req'dwmeier1-1/+0
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@26089 f5534014-38df-0310-8fa8-9805f1628bb7
2008-06-10From Joe Eykholt:jake1-3/+3
The Fibre-channel FCP dissector shows the wrong byte as the response info response code byte. The byte with offset 2 in the FCP frame is shown instead of byte 3 inside the response info. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@25439 f5534014-38df-0310-8fa8-9805f1628bb7
2008-05-15Fix some of the Errors/warnings detected by checkapi.wmeier1-67/+71
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@25305 f5534014-38df-0310-8fa8-9805f1628bb7
2007-11-08Apply yet another set of the optimization patches:etxrab1-1/+1
-set_str2add_str_val_to_str git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@23406 f5534014-38df-0310-8fa8-9805f1628bb7
2007-02-19Continuing the tradition: squelch some compiler warnings ....wmeier1-2/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@20866 f5534014-38df-0310-8fa8-9805f1628bb7
2006-10-25Squelch Coverity CID 220. Fix up whitespace.gerald1-20/+22
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@19682 f5534014-38df-0310-8fa8-9805f1628bb7
2006-10-13pass the relative data offset of data in/out pdu's to the scsi data in/out ↵sahlberg1-1/+1
dissector (dissect_scsi_payload) so that we can later add reassembly of data pdu's and also (if reassembly is disabled) only dissect the initial (offset==0) data pdu. dissect_scsi_payload() does not yet use this parameter. now that we have both data offset and expected data length/bidir expected data length and also the read/write flags availabe we have what we need to reassemble data in/out pdus (modulo overflow/underflow but those are so rare we can worry about them later). ndmp: ndmp conceptually always has a data in and a data out phase and never fragment the data into smaller pdu's os that dissector always report offset as 0. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@19511 f5534014-38df-0310-8fa8-9805f1628bb7
2006-10-12wireshark does not yet consume enough memory for me to be happysahlberg1-0/+1
pass conversation form the transports up to the scsi layer add tracking of conversation specific info to scsi osd add tracking of conversation+lun specific info to scsi osd for scsi osd add tracking of PARTITIONS and display in which frame they were created/removed git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@19505 f5534014-38df-0310-8fa8-9805f1628bb7
2006-10-11add a task_flags bitmap and two lengths (data and bidirectional data)sahlberg1-1/+27
so that the two scsi transports FCP and ISCSI can provide the expected data transfer lengths to SCSI to allow SCSI reassembly. NDMP does not really need these hints since for NDMP (and also iscsi-lite) there is conceptually always both data in and data out phases and there is never any fragmentation. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@19493 f5534014-38df-0310-8fa8-9805f1628bb7
2006-10-11move the ITL and the ITLQ structure to packet-scsi.h where it belongssahlberg1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@19492 f5534014-38df-0310-8fa8-9805f1628bb7
2006-08-14rename some structures and defines from the se_tree to the emem_tree prefixsahlberg1-2/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@18894 f5534014-38df-0310-8fa8-9805f1628bb7
2006-05-21change a whole bunch of ethereal into wiresharksahlberg1-3/+3
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@18196 f5534014-38df-0310-8fa8-9805f1628bb7
2006-04-24change the signature for dissect_scsi_snsinfo() to take itlq and itl structuressahlberg1-1/+1
update the comment in packet-scsi.c to reflect that it is the transport now that is responsible to track itl and itlq data make scsi tapable git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17974 f5534014-38df-0310-8fa8-9805f1628bb7
2006-04-22the scsi transports (fc/fcp and iscsi) now track both itl and itlqsahlberg1-17/+1
structures for scsi. we no longer need the scsi_task_id structure passed by pinfo->private_data so get rid of it. we no longer need the (broken by design) scsi_task_data hash table since this has been replaced byt hte itl and itlq structures and tracking git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17952 f5534014-38df-0310-8fa8-9805f1628bb7
2006-04-21remover the lun parameter from dissect_scsi_cdb/payload since this is now ↵sahlberg1-2/+2
part of the exchange data in itlq remove the two fields opcode and devtype from the scsi_task_data structure since these are also part of the itlq and itl structures git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17949 f5534014-38df-0310-8fa8-9805f1628bb7
2006-04-21updates to get the fc and scsi dissectorssahlberg1-29/+34
and get rid of some breakage in the design let the scsi transport keep track of itl (initiator, target, lun) matching and let it pass a itl structure to scsi that is persistent across packets. let scsi use this itl structure to track device type for a specific itl instead of the (must have been) broken hashtable. update both iscsi and fc to track the itl structure for scsi and schange the scsi signature to accept itl as a parameter. more to come. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17942 f5534014-38df-0310-8fa8-9805f1628bb7
2006-04-20rename hte itlq structures to itlqsahlberg1-10/+10
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17922 f5534014-38df-0310-8fa8-9805f1628bb7
2006-04-07make dissect_scsi_rsp() take an exchange structure as parameter instead of ↵sahlberg1-1/+1
just a lun. this finally allows us to have scsi.time for scsi transactions but we need to cleanup and refactor the other three scsi entrypoints before we should implement scsi srt to make the other three also take an exchange data structure as parameter from their transports (and get rid of the pinfo->private_data ) git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17838 f5534014-38df-0310-8fa8-9805f1628bb7
2006-04-06use the fc exchange structure to track LUN values from fcp command all the ↵sahlberg1-149/+17
way through to the response and get rid of the broken hashtable used for the same purpose previously. some additional cleanups. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17827 f5534014-38df-0310-8fa8-9805f1628bb7
2006-04-06use the fc exchange data to track fcp response timessahlberg1-3/+35
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17826 f5534014-38df-0310-8fa8-9805f1628bb7
2006-04-06remove another field from a structure that we never use.sahlberg1-22/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17824 f5534014-38df-0310-8fa8-9805f1628bb7
2006-04-06remove a field we no longer use in this dissector from the conversation ↵sahlberg1-3/+0
structure. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17823 f5534014-38df-0310-8fa8-9805f1628bb7
2006-04-06move conversation tracking out from the type specific subdissectors and ↵sahlberg1-48/+41
track them in the main entry point for the protocol dissector instead. this is semi-temporary though since FCP will always sit ontop of FC which also tracks the same conversations so there is no need to do a redundant conversation tracking in fcp itself. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17822 f5534014-38df-0310-8fa8-9805f1628bb7
2006-04-05from previous commitsahlberg1-5/+5
dont dereference cdata null pointer git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17814 f5534014-38df-0310-8fa8-9805f1628bb7
2006-04-05create the protocol tree in the main function and not down in the individual ↵sahlberg1-72/+55
helper functions git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17813 f5534014-38df-0310-8fa8-9805f1628bb7
2006-04-05remove some crapsahlberg1-40/+5
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17812 f5534014-38df-0310-8fa8-9805f1628bb7
2006-04-05imake fcp responses that do carry a scsi response codesahlberg1-0/+3
call the scsi response dissector as well (so that eventually we can do things like SRT for SCSI) it doesnt work yet since fcp is using some incredibly broken logic to track state between frames. the cdata stuff can just not ever work exscept for single scan tethereal dissection. is there noone at all looking at these protocols wioth ethereal? has noone noticed it is completely broken yet? sigh, soon i think i will be able to add the originally estimated trivial to implement SCSI SRT git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17811 f5534014-38df-0310-8fa8-9805f1628bb7
2006-04-05add dissection of the fcp response bidir read residual fieldsahlberg1-0/+13
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17807 f5534014-38df-0310-8fa8-9805f1628bb7
2006-04-04refactoring of the fcp response dissectorsahlberg1-23/+173
add missing flags to the dissection and during refactoring fix several things that just can not have worked previously. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17805 f5534014-38df-0310-8fa8-9805f1628bb7
2006-02-23The task management flags in FCP are very useful to display since they ↵sahlberg1-23/+30
convey that something real bad has happened. Therefore put them and fence them at the start of the Info column git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17393 f5534014-38df-0310-8fa8-9805f1628bb7
2005-09-24prettify the previous patchsahlberg1-48/+113
remove the remaining strcpy() from this dissector and make it decode the bitmap PROPERLY. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15995 f5534014-38df-0310-8fa8-9805f1628bb7
2005-09-24refactor the "dissector" for task management flags to dissect the bits properlysahlberg1-52/+130
and get rid of the silly strcpy() stuff. there is a HUGE number of these kinds of very ugly bitmap dissection in all the fibre channel related dissectors and all need to be converted to proer dissection. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15994 f5534014-38df-0310-8fa8-9805f1628bb7
2005-09-17Move a pile of protocol-related headers from the top-level sourceguy1-1/+1
directory to the epan directory. Some of them should perhaps ultimately be moved to epan/dissectors, if they pertain only to stuff exported by a particular dissector. Fix Gerald's e-mail address in files we're moving. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15844 f5534014-38df-0310-8fa8-9805f1628bb7
2005-08-24EVERYTHING IN THE BUILDBOT IS GOING TO BE RED!!! Sorry! ulfl1-10/+9
I've done more than a day to change the timestamp resolution from microseconds to nanoseconds. As I really don't want to loose those changes, I'm going to check in the changes I've done so far. Hopefully someone else will give me a helping hand with the things left ... What's done: I've changed the timestamp resolution from usec to nsec in almost any place in the sources. I've changed parts of the implementation in nstime.s/.h and a lot of places elsewhere. As I don't understand the editcap source (well, I'm maybe just too tired right now), hopefully someone else might be able to fix this soon. Doing all those changes, we get native nanosecond timestamp resolution in Ethereal. After fixing all the remaining issues, I'll take a look how to display this in a convenient way... As I've also changed the wiretap timestamp resolution from usec to nsec we might want to change the wiretap version number... git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15520 f5534014-38df-0310-8fa8-9805f1628bb7
2005-08-12more gmemchunk -> se_alloc() improvementssahlberg1-20/+5
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15321 f5534014-38df-0310-8fa8-9805f1628bb7
2005-08-08various code cleanup:ulfl1-4/+0
-use g_snprintf instead of sprintf and snprintf -use g_strdup_printf where appropriate -remove #include "snprintf.h" (as only g_snprintf should be used) -replace some more alloc/realloc/calloc/free with their glib pendants git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15264 f5534014-38df-0310-8fa8-9805f1628bb7
2005-07-26iFCP uses one dedicated TCP session per fc-endpoint pair.sahlberg1-1/+3
The FC D_id and S_id fields in teh FC frame encapsulated inside iFCP unfortunately has "undefined" (semi-random) values so we can not use th S_/D_id matching in FC when transported atop iFCP. Change iFCP to call a new fc_ifcp handler instead of the fc handler. Add a new handler to FC specific to iFCP. Only set the pinfo->src/dst fields to the S_id/D_id fields IFF the FC frame was NOT transported ontop of iFCP. Othervise we just use the TCP/IP values that are already stored there. Some Hosts use RelativeOffset fields for FC. We can only dissect the RelOff field with offset 0. Change FC to only call the FCP subdissector if offset==0 when relative offsets are used. Some hosts when using relative offsets do not specify a proper value for rxid in teh commands instead htey lkeave it as 0xffff Change the FCP conversation matching to ignore RXID when searching for a conversation. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15076 f5534014-38df-0310-8fa8-9805f1628bb7
2005-07-25From Ronnie: Offset checking/handling fix.gerald1-31/+29
Fix up whitespace and newlines. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15072 f5534014-38df-0310-8fa8-9805f1628bb7
2005-05-29remove offset and len from the signature of dissect_scsi_payload()sahlberg1-2/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@14473 f5534014-38df-0310-8fa8-9805f1628bb7
2005-05-29make all callers of dissect_scsi_cdb() first create a new subset tvbsahlberg1-2/+12
change the signature for dissect_scsi_cdb since we no longer need to pass offset over. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@14472 f5534014-38df-0310-8fa8-9805f1628bb7
2005-03-26Get rid of boilerplate.guy1-42/+35
Use "tvb_ensure_bytes_exist()" to check for some invalid lengths. Add some comments about possible problems in the code. Get rid of an unnecessary length check (the length is the sum of a small constant and a value extracted from a single byte, so the sum won't overflow). For a FCP_RSP, make the top-level protocol tree item run to the end of the tvbuff and then set its length when we finish dissecting it (if we throw an exception and don't get around to setting the length, that means that we hit the end of the tvbuff before we hit the end of the item). Add some checks to catch too-large length fields. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@13917 f5534014-38df-0310-8fa8-9805f1628bb7
2005-03-25Add checks to make sure the packet length hasn't overflowed in a couple ofgerald1-0/+14
places. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@13899 f5534014-38df-0310-8fa8-9805f1628bb7
2005-03-09removed some MSVC compiler warnings, mostly I've casted "downsized function ↵ulfl1-2/+2
parameters" git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@13684 f5534014-38df-0310-8fa8-9805f1628bb7
2005-02-17pass lun (and status) to scsi subdissector so we can filtersahlberg1-37/+45
on scsi.lun and prettify the summary line a bit. ndmp still needs some work to track luns between commands and fcp needs verification it works for volumesetaddressing. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@13420 f5534014-38df-0310-8fa8-9805f1628bb7