Commit Graph

96 Commits

Author SHA1 Message Date
Ronnie Sahlberg bedacc2bc2 scsi osd updates
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-30 09:34:58 +00:00
Ronnie Sahlberg 62290c9cc5 add an extra_data pointer to the itlq structure where specific 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-30 04:10:28 +00:00
Ronnie Sahlberg deef583ae5 scsi opcode 0x7f is variable length so dont clamp the cdb length to 16 bytes
svn path=/trunk/; revision=19373
2006-09-30 01:01:57 +00:00
Ronnie Sahlberg 59d9a1b9c2 add a missing heuristic to acept a NOP_IN packet and correct a broken 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-09-29 11:12:18 +00:00
Ronnie Sahlberg 8ce8e719e0 rename some structures and defines from the se_tree to the emem_tree prefix
svn path=/trunk/; revision=18894
2006-08-14 08:29:29 +00:00
Ronnie Sahlberg 797bb2d5d7 for iscsi traces where there is a lot of packetloss the dissector frequently 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-06-20 13:16:50 +00:00
Ronnie Sahlberg feab79e328 change a whole bunch of ethereal into wireshark
svn path=/trunk/; revision=18196
2006-05-21 04:49:01 +00:00
Ronnie Sahlberg acbaf3fe1f change the signature for dissect_scsi_snsinfo() to take itlq and itl structures
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-24 08:16:18 +00:00
Ronnie Sahlberg e776696d14 the scsi transports (fc/fcp and iscsi) now track both itl and itlq
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-22 02:16:52 +00:00
Ronnie Sahlberg 73e65216bc remover the lun parameter from dissect_scsi_cdb/payload since this is now 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-21 22:00:38 +00:00
Ronnie Sahlberg 60e65f4869 updates to get the fc and scsi dissectors
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-21 11:08:24 +00:00
Ronnie Sahlberg 2b2f2e3f03 rename hte itlq structures to itlq
svn path=/trunk/; revision=17922
2006-04-20 09:43:56 +00:00
Ronnie Sahlberg a72d39bb05 rename the fc_exchange_data structure to the more appropriate itlq_nexus_t
svn path=/trunk/; revision=17921
2006-04-20 09:16:09 +00:00
Ronnie Sahlberg 9481eac669 make dissect_scsi_rsp() take an exchange structure as parameter instead of 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-07 10:15:15 +00:00
Ronnie Sahlberg 2fbe952694 change iscsi to track transaction data in a fc_exchange_data structure 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-06 11:05:18 +00:00
Ronnie Sahlberg 26bbda330d remove the hashtables for pdu tracking and replace with an se_tree
indexed by itt


svn path=/trunk/; revision=17832
2006-04-06 10:41:49 +00:00
Ronnie Sahlberg ab6c16c365 attach the iscsi_session to the conversation instead of using a hashtable to 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-06 09:47:31 +00:00
Ronnie Sahlberg 2536bbc863 get rid of a field we are not using
svn path=/trunk/; revision=17830
2006-04-06 09:16:10 +00:00
Jaap Keuter 5db299677d Fix for bug 783 from Didier Gautheron
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
2006-03-02 20:44:13 +00:00
Ulf Lamping 6f43fbb2f0 EVERYTHING IN THE BUILDBOT IS GOING TO BE RED!!! Sorry!
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-24 21:31:56 +00:00
Ronnie Sahlberg 4a3a614fd9 more gmemchunk -> se_alloc() improvements
svn path=/trunk/; revision=15321
2005-08-12 23:00:01 +00:00
Ronnie Sahlberg 1f0993e47e Fix for bug 342
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-08-11 10:08:45 +00:00
Anders Broman 9c99a261f0 From Maynard, Chris :
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-26 09:52:06 +00:00
Guy Harris 9cb86fda9c Squelch various signed vs. unsigned warnings by:
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-07-09 00:53:17 +00:00
Ulf Lamping fdb5b1af02 just to get things straight: a dissector should *never* do any g_assert() calls!
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-06-10 18:28:22 +00:00
Ronnie Sahlberg aa7157462c remove offset and len from the signature of dissect_scsi_payload()
svn path=/trunk/; revision=14473
2005-05-29 03:18:53 +00:00
Ronnie Sahlberg e66ff913ff make all callers of dissect_scsi_cdb() first create a new subset tvb
change the signature for dissect_scsi_cdb since we no longer need to pass offset over.



svn path=/trunk/; revision=14472
2005-05-29 02:55:12 +00:00
Ronnie Sahlberg fc9688991f create a subset tvb before calling off to the SCSI dissector
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-29 02:30:49 +00:00
Ronnie Sahlberg ae9968883e update iscsi so that when we have ImmediateData we also call SCSI to decode the
payload (DATAOUT)  and not just the scsi CDB.



svn path=/trunk/; revision=14469
2005-05-29 01:49:09 +00:00
Ronnie Sahlberg b19a303f3f once we know a conversation is iscsi, use conversation_set_dissector()
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-04-30 16:14:57 +00:00
Ronnie Sahlberg 27b1665acd only show the Status field in a DataIn PDU if the S bit is set.
svn path=/trunk/; revision=13798
2005-03-18 08:51:12 +00:00
Ronnie Sahlberg 5162c81d71 iscsi LUNs were reported incorrectly for SCSI Command PDUs when they were 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-17 10:18:18 +00:00
Ulf Lamping 2f73c1d242 removed some MSVC compiler warnings, mostly I've casted "downsized function parameters"
svn path=/trunk/; revision=13684
2005-03-09 23:00:21 +00:00
Ronnie Sahlberg 175815e0fe If errorrecoverylevel==0 is used and the A bit is clear in a DataIn PDU
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-03-01 10:09:53 +00:00
Ronnie Sahlberg 93e2089ed2 pass lun (and status) to scsi subdissector so we can filter
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-17 12:07:45 +00:00
Anders Broman 851ecd2ac4 From Jon Ringle:
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-02-02 20:07:03 +00:00
Ronnie Sahlberg 995a967894 only add 4 bytes to the pdu length IFF header digest/crc32 is actually used.
svn path=/trunk/; revision=13193
2005-01-29 04:44:40 +00:00
Guy Harris bbe7f89742 Move prefs.c and prefs.h into the epan subdirectory.
svn path=/trunk/; revision=12115
2004-09-27 22:55:15 +00:00
Ronnie Sahlberg 6de3544a52 Reintroduce the three previously removed iscsi header digest preference options as obsolete preferences so that users upgrading to later versions of ethereal will not get the warning output for unknown preferences printed to stdout.
svn path=/trunk/; revision=11851
2004-08-30 08:31:21 +00:00
Ronnie Sahlberg ccf7ed00b6 remove two preference options related to iscsi header digest
make ethereal attempt to automatically detect wether header digest is used or not for iscsi sessions.

This makes ethereal decode the packets properly EVEN for perfectly normal sessions where
the discovery session is performed with no digest but the normal login session negotiates digest.


the detected headerdigest setting is tcp session wide and thus it
it does not work for such initiators (if such exist) that resuse the same socketpair between the discovery and normal login sessions.



svn path=/trunk/; revision=11850
2004-08-29 04:12:35 +00:00
Ronnie Sahlberg d15ea23bd3 finalize refactoring of conversation handling.
what remains now is attaching autodetection of header digest to 
the session state structure.


svn path=/trunk/; revision=11849
2004-08-29 02:55:02 +00:00
Ronnie Sahlberg 9812797721 move the conversation find and create into dissect_iscsi() from dissect_iscsi_pdu() so it will be easier to add a session wide state structure to iscsi.
later this soon to be implemented structure (and not the conversation) will 
hold the information we need to track  wether
digests etc are in use or not.

this also allows some minor indentation cleanups as well.



svn path=/trunk/; revision=11848
2004-08-29 01:15:32 +00:00
Ronnie Sahlberg 6ab442bacf indentation change to make dissect_iscsi() easier to read
svn path=/trunk/; revision=11847
2004-08-28 23:54:16 +00:00
Ronnie Sahlberg b5daad6252 ISCSI Login Request and Login Response never contain any HeaderDigests
svn path=/trunk/; revision=11846
2004-08-28 23:12:16 +00:00
Ulf Lamping d530bd4e14 Prevent the word "desegmentation" at the GUI, but use reassembling at that places, as we also use "defragmentation" and "reassembling". Use reassembling as the general term for such actions.
I (hopefully) didn't changed any protocol fields or preference file names, but only the GUI labels appearing in the protocol display and the protocol preferences.

Also added a note to the protocol preferences (where appropriate), that you have to enable "Allow subdissectors to reassemble TCP streams" at the corresponding protocol settings for TCP reassembling to take effect.

If you encounter any mistakes I've made here, please let me know...

svn path=/trunk/; revision=11784
2004-08-21 09:02:52 +00:00
Gilbert Ramirez 669db206cb Move dissectors to epan/dissectors directory.
Also move ncp222.py, x11-fields, process-x11-fields.pl,
make-reg-dotc, and make-reg-dotc.py.

Adjust #include lines in files that include packet-*.h
files.

svn path=/trunk/; revision=11410
2004-07-18 18:06:47 +00:00