Commit Graph

56 Commits

Author SHA1 Message Date
Bill Meier d2269ce7d5 Fix gcc 4.6 "set but not used [-Wunused-but-set-variable]" warnings.
svn path=/trunk/; revision=37716
2011-06-19 18:47:35 +00:00
Guy Harris a8bc4a0d13 Rename the routines that handle dissector tables with unsigned integer
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-12-20 05:35:29 +00:00
Bill Meier 055dd62063 #include <string.h> not needed.
svn path=/trunk/; revision=32410
2010-04-06 21:14:01 +00:00
Bill Meier 09764dd969 Remove unneeded #include <stdio.h>
svn path=/trunk/; revision=32367
2010-04-03 21:55:23 +00:00
Anders Broman 440c3f9261 From Didier Gautheron:
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

svn path=/trunk/; revision=31519
2010-01-13 20:32:01 +00:00
Jaap Keuter 80424e5ced From Joe Eykholt:
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.

svn path=/trunk/; revision=30587
2009-10-17 10:19:18 +00:00
Kovarththanan Rajaratnam e971354a54 Don't guard col_set_str (COL_PROTOCOL) with col_check
svn path=/trunk/; revision=29340
2009-08-09 06:26:46 +00:00
Stig Bjørlykke b228488bc0 From Kovarththanan Rajaratnam via bug 3548:
(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

svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
Bill Meier 77b81b391b #include <prefs.h> not req'd
svn path=/trunk/; revision=26089
2008-08-25 22:06:20 +00:00
Jaap Keuter 927cbeb37c From Joe Eykholt:
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.

svn path=/trunk/; revision=25439
2008-06-10 05:41:29 +00:00
Bill Meier 931cc922a1 Fix some of the Errors/warnings detected by checkapi.
svn path=/trunk/; revision=25305
2008-05-15 01:44:53 +00:00
Anders Broman 9d316093f6 Apply yet another set of the optimization patches:
-set_str2add_str_val_to_str

svn path=/trunk/; revision=23406
2007-11-08 22:49:03 +00:00
Bill Meier 103bf29730 Continuing the tradition: squelch some compiler warnings ....
svn path=/trunk/; revision=20866
2007-02-19 22:29:23 +00:00
Gerald Combs 131db54e82 Squelch Coverity CID 220. Fix up whitespace.
svn path=/trunk/; revision=19682
2006-10-25 16:39:19 +00:00
Ronnie Sahlberg 8826c144f7 pass the relative data offset of data in/out pdu's to the scsi data in/out 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-13 09:16:45 +00:00
Ronnie Sahlberg 15d3176063 wireshark does not yet consume enough memory for me to be happy
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-12 10:54:36 +00:00
Ronnie Sahlberg 145d7a0577 add a task_flags bitmap and two lengths (data and bidirectional data)
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-11 11:32:56 +00:00
Ronnie Sahlberg 494e873eb0 move the ITL and the ITLQ structure to packet-scsi.h where it belongs
svn path=/trunk/; revision=19492
2006-10-11 10:38:59 +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 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 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 4aa5a68788 use the fc exchange structure to track LUN values from fcp command all the way through to the response
and get rid of the broken hashtable used for the same purpose previously.

some additional cleanups.


svn path=/trunk/; revision=17827
2006-04-06 03:15:16 +00:00
Ronnie Sahlberg 507b3a384f use the fc exchange data to track fcp response times
svn path=/trunk/; revision=17826
2006-04-06 02:46:41 +00:00
Ronnie Sahlberg ec77d1cc28 remove another field from a structure that we never use.
svn path=/trunk/; revision=17824
2006-04-06 02:04:22 +00:00
Ronnie Sahlberg dd62a0f458 remove a field we no longer use in this dissector from the conversation structure.
svn path=/trunk/; revision=17823
2006-04-06 01:17:36 +00:00
Ronnie Sahlberg a72a698985 move conversation tracking out from the type specific subdissectors and 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.



svn path=/trunk/; revision=17822
2006-04-06 01:16:23 +00:00
Ronnie Sahlberg 5e89308fe3 from previous commit
dont dereference cdata null pointer


svn path=/trunk/; revision=17814
2006-04-05 10:07:49 +00:00
Ronnie Sahlberg 4a8bcee67f create the protocol tree in the main function and not down in the individual helper functions
svn path=/trunk/; revision=17813
2006-04-05 09:51:14 +00:00
Ronnie Sahlberg 342c290c42 remove some crap
svn path=/trunk/; revision=17812
2006-04-05 08:58:16 +00:00
Ronnie Sahlberg a9f636b41d imake fcp responses that do carry a scsi response code
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



svn path=/trunk/; revision=17811
2006-04-05 08:51:45 +00:00
Ronnie Sahlberg 1808675f72 add dissection of the fcp response bidir read residual field
svn path=/trunk/; revision=17807
2006-04-05 01:17:32 +00:00
Ronnie Sahlberg cd7baad861 refactoring of the fcp response dissector
add missing flags to the dissection   and during refactoring fix several things that just can not have worked previously.




svn path=/trunk/; revision=17805
2006-04-04 22:21:48 +00:00
Ronnie Sahlberg 826f6ede9a The task management flags in FCP are very useful to display since they convey that something real bad has happened.
Therefore put them and fence them at the start of the Info column



svn path=/trunk/; revision=17393
2006-02-23 22:03:55 +00:00
Ronnie Sahlberg b56bc5db31 prettify the previous patch
remove the remaining strcpy() from this dissector and make it decode the bitmap PROPERLY.


svn path=/trunk/; revision=15995
2005-09-24 23:25:38 +00:00
Ronnie Sahlberg d2ac9b9b97 refactor the "dissector" for task management flags to dissect the bits properly
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.



svn path=/trunk/; revision=15994
2005-09-24 22:43:15 +00:00
Guy Harris b7b80d94be Move a pile of protocol-related headers from the top-level source
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.

svn path=/trunk/; revision=15844
2005-09-17 00:02:31 +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
Ulf Lamping 0dc9fb3d4a various code cleanup:
-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

svn path=/trunk/; revision=15264
2005-08-08 18:50:39 +00:00
Ronnie Sahlberg 3e8894dd23 iFCP uses one dedicated TCP session per fc-endpoint pair.
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.



svn path=/trunk/; revision=15076
2005-07-26 00:54:16 +00:00
Gerald Combs 6fa95413b8 From Ronnie: Offset checking/handling fix.
Fix up whitespace and newlines.

svn path=/trunk/; revision=15072
2005-07-25 23:11:32 +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
Guy Harris 43558fba8a Get rid of boilerplate.
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.


svn path=/trunk/; revision=13917
2005-03-26 03:56:54 +00:00
Gerald Combs f56c06ebdc Add checks to make sure the packet length hasn't overflowed in a couple of
places.

svn path=/trunk/; revision=13899
2005-03-25 19:44:09 +00:00