Commit Graph

64 Commits

Author SHA1 Message Date
Bill Meier 4e57694d4a Convert 'encoding' parameter of certain proto_tree_add_item() calls in 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-06 03:35:44 +00:00
Stig Bjørlykke 5359494b1f Second try to move crc routines to libwsutil.
This time keep the tvb routines in epan.

Now we can use common crc routines outside epan.

svn path=/trunk/; revision=38810
2011-08-31 09:00:54 +00:00
Stig Bjørlykke 71f903b956 Revert r38800, as the crc routines contains some tvb functions.
svn path=/trunk/; revision=38803
2011-08-30 14:17:40 +00:00
Stig Bjørlykke 4132d40e50 Move all crc routines to libwsutil.
This way we can use the crc routines in wiretap.

svn path=/trunk/; revision=38800
2011-08-30 13:46:42 +00:00
Bill Meier 91191c6c00 Fix some gcc 4.6 "set but not used [-Wunused-but-set-variable]" warnings;
(Code commented out since it may be required in the future (at least in some cases).

svn path=/trunk/; revision=37723
2011-06-20 01:13:21 +00:00
Jeff Morriss 067a076179 Use tvb_ip_to_str().
There's no need to pass the result of tvb_get_ptr() as the 'value' in
proto_tree_add_*(): just use proto_tree_add_item().

Replace some tvb_get_ptr()s with tvb_get_ephemeral_string()s to ensure the
return string is NULL terminated.

svn path=/trunk/; revision=35545
2011-01-16 03:29:03 +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 e7568712ef Define some fcns & vars as static;
Minor whitespace and comments cleanup.

svn path=/trunk/; revision=34477
2010-10-11 19:00:55 +00:00
Jeff Morriss 729de1a635 As suggested in http://www.wireshark.org/lists/wireshark-dev/200809/msg00075.html
(as referenced in https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2907 ) and
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3411 :

Write a new convenience routine for finding a conversation and, if it is not
found, create it.  The frame number and addresses are taken from pinfo (as is
the common case).

Use this function in a bunch of dissectors.

svn path=/trunk/; revision=32790
2010-05-13 18:28:34 +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
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
Bill Meier 09cfdb2530 Don't init fc_fragment_table twice via registered_init_routines...
svn path=/trunk/; revision=30582
2009-10-16 22:00:41 +00:00
Stig Bjørlykke ea3139f395 Rewrote fc_sof_t and fc_eof_t from enum to defines, as enum
is defined as signed int.

svn path=/trunk/; revision=30328
2009-10-05 15:17:41 +00:00
Kovarththanan Rajaratnam 65c53fedb6 Don't guard col_append_str with check_col
svn path=/trunk/; revision=30125
2009-09-24 20:00:21 +00:00
Jaap Keuter b30cc51638 From kahou:
FCSOF incorrect checksum calculation.

svn path=/trunk/; revision=29815
2009-09-09 07:27:01 +00:00
Jaap Keuter 58dedc3872 From kahou:
Add Fibre Channel Delimiter Dissector for Fibre Channel FC2.

svn path=/trunk/; revision=29531
2009-08-23 19:16:35 +00:00
Kovarththanan Rajaratnam 8b515e9340 Switch a bunch of dissectors over to using tvb_new_subset_remaining()
svn path=/trunk/; revision=29446
2009-08-16 12:36:22 +00:00
Kovarththanan Rajaratnam 6110a96f68 Don't guard col_set_str (COL_INFO/COL_PROTOCOL) with col_check
svn path=/trunk/; revision=29345
2009-08-09 07:59:51 +00:00
Kovarththanan Rajaratnam 4b6090e576 Don't guard col_set_str (COL_INFO) with col_check
svn path=/trunk/; revision=29342
2009-08-09 07:01:26 +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 e9066532cf From Kahou via bug 3739:
New DLT value is added for Fibre Channel FC2.

svn path=/trunk/; revision=29115
2009-07-16 10:45:14 +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
Anders Broman c91a384702 Apply some of the patches from:
http://wiki.wireshark.org/Development/Optimization

svn path=/trunk/; revision=28356
2009-05-13 19:46:11 +00:00
Bill Meier 79a1441582 FT_BOOLEAN fields w/o bitmasks really should use BASE_NONE (not BASE_DEC,...).
svn path=/trunk/; revision=28317
2009-05-08 20:35:57 +00:00
Bill Meier a8f30cbca1 Fix some typos and spelling (mostly in text strings)
svn path=/trunk/; revision=27037
2008-12-17 17:23:37 +00:00
Bill Meier 44af6ef887 Fix some of the Errors/warnings detected by checkapi.
svn path=/trunk/; revision=25290
2008-05-14 01:47:41 +00:00
Jaap Keuter 2f3869cbbe The Fibre Channel protocol defines a virtual fabric tag (VFT) similar to
ethernet's VLAN tag.  It is sometimes called the VSAN tag.  
It used to be proprietary, but now it's standard.
Wireshark currently displays it as an 8-byte field without dissecting it further.
It'd be nice to have it broken down into fields. A patch is attached.

svn path=/trunk/; revision=22879
2007-09-16 09:07:30 +00:00
Jaap Keuter d87fb06466 Fix for bug 1633:
Adding BLS ABTS handling.

svn path=/trunk/; revision=22087
2007-06-13 06:52:23 +00:00
Sebastien Tandel 68ad2f4b9b fix MacOSX gcc-3.3 warnings about unused tfs/value_string variables
most have been tagged unused (few have been deleted if dissector has not been
modified since a long time)

move packet-ssl-utils.c to DISSECTOR_SRC


svn path=/trunk/; revision=21431
2007-04-14 14:01:53 +00:00
Ronnie Sahlberg d516bcbb78 if FC type is FPC/SCSI and the relative offset bit is set in f_ctl then the parameter field is 4 bytes and contain the relative offset of the data for data in/out
decode this field as relative offset   and also store it in the fc_hdr structure so that FCP can pick it up and pass if to the SCSI payload data in/out dissector later




svn path=/trunk/; revision=19510
2006-10-13 08:42:33 +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 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 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 ee469dc8ea coverity 149 dead code
svn path=/trunk/; revision=18571
2006-06-24 05:45:06 +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 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 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 0257503efc add a field for storing the scsi opcode in the exchange struct.
it is silly that scsi has to track these things itself  when all the transports
already keep track of exchanges.

the scsi transports should all use the fc_exchange_data structure to pass lun to scsi and where scsi kan store the opcode between requests and data/response packets




svn path=/trunk/; revision=17829
2006-04-06 08:33:08 +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 33af09f927 make fc pass the fchdr structure as pinfo->private data to higher layer protocols
svn path=/trunk/; revision=17825
2006-04-06 02:15:41 +00:00
Ronnie Sahlberg d06fea3fa6 cleaning up bits and pieces
replacing the hashtables with a better exchange   se_tree



svn path=/trunk/; revision=17809
2006-04-05 05:51:51 +00:00
Ronnie Sahlberg 70f17cd417 remove all strcpy from fcels
ito make it easier to read use doublespace to separate the items on the expansion line instead of ',' since so many of the strings contain spaces.

cleanup fc slightly and remove a redundant parameter


svn path=/trunk/; revision=16019
2005-09-27 08:03:13 +00:00
Ronnie Sahlberg 94df2dc3f4 remove all strcpy() from packet-fc.c
rewrite the functions to do proto_item_append_text() instead of building a string and then printing it.

The new function is functionally equivalent to the previous function except it does not print the values of the multi-bit fields to the expansion
(the expansion line is already a km wide as it is)



there are now only 202 strcpy() left in epan/dissectors  down from 300+ instances some weeks ago.



svn path=/trunk/; revision=16009
2005-09-26 10:11:38 +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
Gerald Combs e777958eb6 Fix fragment length checks. Fixes bugs 440 and 442-446.
svn path=/trunk/; revision=15824
2005-09-15 18:42:04 +00:00
Anders Broman 402b0480f7 From Dinesh G Dutt
Support some new messages and fix a couple of bugs.

packet-fc.h - Added a #define for a Cisco MDS-specific frame called OHMS (online health mgmt srv) packet-fc.c - Support for OHMS frame, fixed an incorrect "malformed frame" error caused on ACK1 frames (they
                   don't contain anything but (encap hdr + FC hdr + encap trailer), fixed incorrect detection of
                   last-data-frame

packet-fcct.h - Support for new service type, "Fabric Controller", used in conjunction with FC-SW3 ESS message,
                     exported the service name value string definitions and  
packet-fcct.c - Support for recognizing "Fabric Controller" service type and "vendor-specific" service

packet-fcswils.h - Support for ESS & MRRA messages, defined as part of FC-SW3 packet-fcswils.c - Support for ESS & MRRA messages, defined as part of FC-SW3

packet-scsi.c - Support for Verify and Write&Verify SBC commands.

svn path=/trunk/; revision=15799
2005-09-14 18:40:16 +00:00