aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-iscsi.c
AgeCommit message (Collapse)AuthorFilesLines
2007-03-28Remove almost all of the casts I committed recently and in place ofStephen Fisher1-3/+3
them, add -Wno-pointer-sign to CFLAGS when gcc will accept it. svn path=/trunk/; revision=21253
2007-03-27Fix about 100 simple to fix warnings from gcc 4.0 in epan/dissectors Stephen Fisher1-3/+3
svn path=/trunk/; revision=21233
2007-03-23fix a lot more warningsUlf Lamping1-2/+2
svn path=/trunk/; revision=21142
2007-01-23if DataSegmentLength is non zero for iscsi async messages the data segment ↵Ronnie Sahlberg1-5/+36
contains scsi sense information potentially followed by iscsi event data. this is used by a target to tell an initiator (among other things) that the lun configuration has changed and now is a good time to rescan the target for lun changes. svn path=/trunk/; revision=20531
2006-12-07strengthen the heuristics for iscsi commandis assuming that the last 6 ↵Ronnie Sahlberg1-0/+4
bytes of the 8 byte LUN blob are always 0. svn path=/trunk/; revision=20058
2006-10-13pass the relative data offset of data in/out pdu's to the scsi data in/out ↵Ronnie Sahlberg1-2/+9
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. svn path=/trunk/; revision=19511
2006-10-12wireshark does not yet consume enough memory for me to be happyRonnie Sahlberg1-2/+3
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 svn path=/trunk/; revision=19505
2006-10-11add a task_flags bitmap and two lengths (data and bidirectional data)Ronnie Sahlberg1-0/+12
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. svn path=/trunk/; revision=19493
2006-10-11move the ITL and the ITLQ structure to packet-scsi.h where it belongsRonnie Sahlberg1-1/+0
svn path=/trunk/; revision=19492
2006-10-08scsi: unusual scsi protocols can request multiple AHS fields for iscsi so ↵Ronnie Sahlberg1-22/+68
decode the AHS properly instead of assuming at most one field is present scsi-osd add dissection of LIST data pdus and CREATE cdb svn path=/trunk/; revision=19449
2006-09-30fix for header digest detection being broken when AHS is used.Ronnie Sahlberg1-4/+6
we simply forgot to account for the AHS when testing to calculate the crc svn path=/trunk/; revision=19389
2006-09-30the ahs length inside the AHS for an extended cdb includes the reserved byte ↵Ronnie Sahlberg1-4/+4
before the start of cdb data account for this extra reserved byte in the ahs length so that the reconstructed cdb has the correct length and does not contain one extra byte at the end svn path=/trunk/; revision=19387
2006-09-30scsi osd updatesRonnie Sahlberg1-5/+53
iscsi: when iscsi transfers a cdb that is alrger than 16 bytes, the first 16 bytes are transferred in the normal place in the header and ther remainder of the cdb is transported inside the AHS. reassemble these cdb into a proper tvb before passing it to the scsi dissector svn path=/trunk/; revision=19376
2006-09-30add an extra_data pointer to the itlq structure where specific ↵Ronnie Sahlberg1-0/+1
commandsets/cdbs can hang additional data that are unique to that commandset/cdb make the scsi osd service action and getsetattributetype use this facility furhter enhancements to scsi osd svn path=/trunk/; revision=19374
2006-09-30scsi opcode 0x7f is variable length so dont clamp the cdb length to 16 bytesRonnie Sahlberg1-4/+11
svn path=/trunk/; revision=19373
2006-09-29add a missing heuristic to acept a NOP_IN packet and correct a broken ↵Ronnie Sahlberg1-4/+18
heuristic that would refuse all NOP_OUT pdus as non-iscsi it is absolutely amazing that none of the iscsi implementors and users of wireshark had noticed this breakage and reported it. they apparently do not use wireshark. svn path=/trunk/; revision=19362
2006-08-14rename some structures and defines from the se_tree to the emem_tree prefixRonnie Sahlberg1-4/+4
svn path=/trunk/; revision=18894
2006-06-20for iscsi traces where there is a lot of packetloss the dissector frequently ↵Ronnie Sahlberg1-5/+511
gets out of sync and the weak heuristics often cause wireshark to mistake some segment containing read/write data to be iscsi. make the heuristics to check that a packet really is iscsi much stronger svn path=/trunk/; revision=18523
2006-05-21change a whole bunch of ethereal into wiresharkRonnie Sahlberg1-3/+3
svn path=/trunk/; revision=18196
2006-04-24change the signature for dissect_scsi_snsinfo() to take itlq and itl structuresRonnie Sahlberg1-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 svn path=/trunk/; revision=17974
2006-04-22the scsi transports (fc/fcp and iscsi) now track both itl and itlqRonnie Sahlberg1-15/+2
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 svn path=/trunk/; revision=17952
2006-04-21remover the lun parameter from dissect_scsi_cdb/payload since this is now ↵Ronnie Sahlberg1-3/+3
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 svn path=/trunk/; revision=17949
2006-04-21updates to get the fc and scsi dissectorsRonnie Sahlberg1-9/+26
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. svn path=/trunk/; revision=17942
2006-04-20rename hte itlq structures to itlqRonnie Sahlberg1-30/+30
svn path=/trunk/; revision=17922
2006-04-20rename the fc_exchange_data structure to the more appropriate itlq_nexus_tRonnie Sahlberg1-1/+1
svn path=/trunk/; revision=17921
2006-04-07make dissect_scsi_rsp() take an exchange structure as parameter instead of ↵Ronnie Sahlberg1-95/+88
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 ) svn path=/trunk/; revision=17838
2006-04-06change iscsi to track transaction data in a fc_exchange_data structure ↵Ronnie Sahlberg1-29/+29
just as the fc / fcp transport does. while reusing this structure for multi-purpose would make it berret suited to move the struct from packet-fc.h to packet-scsi.h we would have to include packet-scsi.h for everyone that includes packet-fc.h and that are a few dependencies. (would have to include it even in packet-llc.c) so leave it as a fc structure for now. svn path=/trunk/; revision=17833
2006-04-06remove the hashtables for pdu tracking and replace with an se_treeRonnie Sahlberg1-162/+17
indexed by itt svn path=/trunk/; revision=17832
2006-04-06attach the iscsi_session to the conversation instead of using a hashtable to ↵Ronnie Sahlberg1-49/+19
map conversation to iscsi_session. use the pointer to iscsi_Session as conversation index for the exchange tracking for now, it works just as well and will be replaced with better exchange tracking shortly anyway svn path=/trunk/; revision=17831
2006-04-06get rid of a field we are not usingRonnie Sahlberg1-1/+0
svn path=/trunk/; revision=17830
2006-03-02Fix for bug 783 from Didier GautheronJaap Keuter1-1/+1
I know nothing about iscsi , but try the attached patch. It fix the wrong desegmentation and the ethereal bug isn't triggered anymore. svn path=/trunk/; revision=17445
2005-08-24EVERYTHING IN THE BUILDBOT IS GOING TO BE RED!!! Sorry! Ulf Lamping1-16/+3
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... svn path=/trunk/; revision=15520
2005-08-12more gmemchunk -> se_alloc() improvementsRonnie Sahlberg1-22/+4
svn path=/trunk/; revision=15321
2005-08-11Fix for bug 342Ronnie Sahlberg1-0/+9
If we encounter a frame we have already seen (i.e. visited==1) but we can not fing the ISCSI command inside the _matched table, this just means there were no response pdu nor any data pdu with the S bit set. So, then just pick the cdata structure up from the _unmatched table instead. The SCSI CDB dissector really really want a real CDATA structure passed to it. svn path=/trunk/; revision=15291
2005-07-26From Maynard, Chris :Anders Broman1-1/+1
The attached patches, generated via svn diff , correct various compiler & lint warnings, among them: lemon.c(2582) : warning C4090: '=' : different 'const' qualifiers packet-ber.c(212) : warning C4018: '<=' : signed/unsigned mismatch packet-ber.c(228) : warning C4018: '>=' : signed/unsigned mismatch packet-bootp.c(2112) : warning C4018: '<' : signed/unsigned mismatch packet-iscsi.c(801) : warning C4018: '>=' : signed/unsigned mismatch svn path=/trunk/; revision=15085
2005-07-09Squelch various signed vs. unsigned warnings by:Guy Harris1-1/+1
making pointers to byte data be "guint8 *" rather than "char *", and making buffers holding byte data arrays of "guint8" rather than arrays of "char"; making pointers to text strings "char *" rather than "guchar *"; appropriately casting pointers (cast to "guint8 *" when passing to routines expecting "guint8 *" or when assigning to "guint8 *"); making port-number preferences "guint"; making enum preferences "gint"; making hf_ variables "int". Clean up white space. svn path=/trunk/; revision=14884
2005-06-10just to get things straight: a dissector should *never* do any g_assert() calls!Ulf Lamping1-1/+1
in a simple approach, I've replaced all g_assert() and g_assert_not_reached() calls by their exception throwing counterparts DISSECTOR_ASSERT() and DISSECTOR_ASSERT_NOT_REACHED() this will replace application crash by showing a dissector bug, which is the desired behaviour there were some g_assert calls in the protocol registering functions, which might not be acting as expected now, but to be able to simply search for g_assert in the future I've replaced that calls too one g_assert remained, the one when someone throws an unknown exception "into" packet_frame.c, but IMHO this one should remain. svn path=/trunk/; revision=14608
2005-05-29remove offset and len from the signature of dissect_scsi_payload()Ronnie Sahlberg1-4/+2
svn path=/trunk/; revision=14473
2005-05-29make all callers of dissect_scsi_cdb() first create a new subset tvbRonnie Sahlberg1-2/+1
change the signature for dissect_scsi_cdb since we no longer need to pass offset over. svn path=/trunk/; revision=14472
2005-05-29create a subset tvb before calling off to the SCSI dissectorRonnie Sahlberg1-10/+47
so that the right part of the hexpane is highlighted when one clicks on an nondissected data line svn path=/trunk/; revision=14471
2005-05-29update iscsi so that when we have ImmediateData we also call SCSI to decode the Ronnie Sahlberg1-0/+15
payload (DATAOUT) and not just the scsi CDB. svn path=/trunk/; revision=14469
2005-04-30once we know a conversation is iscsi, use conversation_set_dissector()Ronnie Sahlberg1-2/+8
so that we block any heuristic dissectors from attempring and mistaking this conversation from being it. In particular: DCERPC often mistakes iscsi DataOut PDUs for being DCERPC. svn path=/trunk/; revision=14243
2005-03-18only show the Status field in a DataIn PDU if the S bit is set.Ronnie Sahlberg1-1/+3
svn path=/trunk/; revision=13798
2005-03-17iscsi LUNs were reported incorrectly for SCSI Command PDUs when they were ↵Ronnie Sahlberg1-22/+23
not matched with a response. Read the LUN value into a local variable always and use that to pass to the scsi dissector since we can always use this value from the iscsi heade for COMMAND pdus (but not data/in/out) svn path=/trunk/; revision=13791
2005-03-09removed some MSVC compiler warnings, mostly I've casted "downsized function ↵Ulf Lamping1-4/+4
parameters" svn path=/trunk/; revision=13684
2005-03-01If errorrecoverylevel==0 is used and the A bit is clear in a DataIn PDU Ronnie Sahlberg1-22/+28
the iscsi layer will not hold the LUN value (it is reserved) so we need to remember if from the initial Command PDU. make the LUN reporting work for errorrecoverylevel==0 targets svn path=/trunk/; revision=13563
2005-02-17pass lun (and status) to scsi subdissector so we can filterRonnie Sahlberg1-5/+26
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. svn path=/trunk/; revision=13420
2005-02-02From Jon Ringle:Anders Broman1-2/+2
1) Added a setup_frame parameter to conversation_t 2) Used the conversation_t next to maintain a list of conversations with the same src/dest tuple but different setup_frame number. 3) Changed the signature of find_conversation() and conversation_new() to pass in the frame number. 4) Adjusted packet-sdp to select RTP conversation if both m=audio and m=image are present, and T.38 conversation if only m=image is present. I expect that RTP/T.38 dissecting to be better, but I don't have a way to generate T.38 packets. svn path=/trunk/; revision=13243
2005-01-29only add 4 bytes to the pdu length IFF header digest/crc32 is actually used.Ronnie Sahlberg1-3/+25
svn path=/trunk/; revision=13193
2004-09-27Move prefs.c and prefs.h into the epan subdirectory.Guy Harris1-1/+1
svn path=/trunk/; revision=12115