Commit Graph

44 Commits

Author SHA1 Message Date
Alexis La Goutte ba94f6f0a5 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=40042
2011-11-29 19:54:00 +00:00
Bill Meier 4b79db3e55 Add missing hf[] entries (and fix proto_tree_add_item() encoding args).
svn path=/trunk/; revision=39605
2011-10-26 17:04:26 +00:00
Bill Meier 54b72021bb Fix encoding arg for various fcn calls:
- proto_tree_add_bits_item
 - proto_tree_add_bits_ret_val
 - proto_tree_add_bitmask
 - tvb_get_bits
 - tvb_get_bits16
 - tvb_get_bits24
 - tvb_get_bits32
 - tvb_get_bits64


svn path=/trunk/; revision=39539
2011-10-24 19:57:53 +00:00
Bill Meier 794757ae8f For proto_tree_add_item(..., proto_xxx, ...)use ENC_NA as the encoding arg.
Also: remove trailing whitespace for a number of files.

svn path=/trunk/; revision=39503
2011-10-21 02:10:19 +00:00
Gerald Combs 0c83f1655a From Huzaifa Sidhpurwala: Fix a null pointer dereference.
svn path=/trunk/; revision=39500
2011-10-20 23:46:04 +00:00
Bill Meier 293049dfba Do some conversions of proto_tree_add_item() 'encoding' arg.
(previously missed).

    57   FT_BOOLEAN:       FALSE-->ENC_BIG_ENDIAN
    31   FT_BOOLEAN:       TRUE-->ENC_LITTLE_ENDIAN

    10   FT_BYTES:         ENC_BIG_ENDIAN-->ENC_NA
     1   FT_BYTES:         ENC_LITTLE_ENDIAN-->ENC_NA
    21   FT_BYTES:         FALSE-->ENC_NA
     2   FT_BYTES:         TRUE-->ENC_NA

     2   FT_IPXNET:        ENC_BIG_ENDIAN-->ENC_NA

     6   FT_IPv6:          ENC_BIG_ENDIAN-->ENC_NA
     1   FT_IPv6:          FALSE-->ENC_NA

     6   FT_NONE:          ENC_BIG_ENDIAN-->ENC_NA
    19   FT_NONE:          FALSE-->ENC_NA
     3   FT_NONE:          TRUE-->ENC_NA

     1   FT_STRING:        ENC_BIG_ENDIAN-->ENC_ASCII|ENC_NA
     1   FT_STRING:        ENC_LITTLE_ENDIAN-->ENC_ASCII|ENC_NA
     5   FT_STRING:        FALSE-->ENC_ASCII|ENC_NA
     1   FT_STRING:        TRUE-->ENC_ASCII|ENC_NA

     4   FT_STRINGZ:       ENC_NA-->ENC_ASCII|ENC_NA
     8   FT_STRINGZ:       FALSE-->ENC_ASCII|ENC_NA

     1   FT_INT32:         FALSE-->ENC_BIG_ENDIAN
     1   FT_INT32:         TRUE-->ENC_LITTLE_ENDIAN

    11   FT_UINT8:         0-->ENC_BIG_ENDIAN
   111   FT_UINT8:         FALSE-->ENC_BIG_ENDIAN
    17   FT_UINT8:         TRUE-->ENC_LITTLE_ENDIAN
     1   FT_UINT16:        0-->ENC_BIG_ENDIAN
    68   FT_UINT16:        FALSE-->ENC_BIG_ENDIAN
    18   FT_UINT16:        TRUE-->ENC_LITTLE_ENDIAN
     4   FT_UINT24:        FALSE-->ENC_BIG_ENDIAN
    70   FT_UINT32:        FALSE-->ENC_BIG_ENDIAN
     1   FT_UINT32:        TRUE-->ENC_LITTLE_ENDIAN
     4   FT_UINT64:        FALSE-->ENC_BIG_ENDIAN
     1   FT_UINT64:        TRUE-->ENC_LITTLE_ENDIAN

     1   FT_UINT_STRING:   FALSE-->ENC_ASCII|ENC_BIG_ENDIAN


svn path=/trunk/; revision=39442
2011-10-16 23:38:49 +00:00
Bill Meier 126aa85393 Convert proto_tree_add_item() 'encoding' arg for field types FT_STRING, FT_STRINGZ, FT_UINT_STRING as follows:
1. If there's no character encoding (ENC_ASCII, ...) specified
    then use ENC_ASCII.
 2. For all but FT_UINT_STRING, always use ENC_NA
    (replacing any existing True/1/FALSE/0
    /ENC_BIG_ENDIAN/ENC_LITTLE_ENDIAN).



svn path=/trunk/; revision=39426
2011-10-15 18:46:26 +00:00
Bill Meier 67ee5049d4 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_BOOLEAN
     FT_IPv4
     FT_EUI64
     FT_GUID
     FT_UINT_STRING

Also: For type FT_ITv6 use ENC_NA. (This was missed in SVN #39260)

svn path=/trunk/; revision=39328
2011-10-10 00:39:31 +00:00
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
Bill Meier 94f36ca4ff Use ENC_NA as encoding for proto_tree_add_item() calls which directly reference an hf item (in hf[] with types:
FT_NONE
   FT_BYTES
   FT_IPV6
   FT_IPXNET
   FT_OID

Note: Encoding field set to ENC_NA only if the field was previously TRUE|FALSE|ENC_LITTLE_ENDIAN|ENC_BIG_ENDIAN

svn path=/trunk/; revision=39260
2011-10-04 22:44:31 +00:00
Bill Meier 2bf572bc41 Remove unneeded #includes: proto.h,tvbuff.h,value_string.h,stdlib.h,...
svn path=/trunk/; revision=38413
2011-08-08 17:59:32 +00:00
Bill Meier fb54240c34 Fix some gcc 4.6 "set but not used [-Wunused-but-set-variable]" warnings;
Also: misc minor cleanup: unneeded #include; whitespace, tvb_length-->tvb_reported_length

svn path=/trunk/; revision=37757
2011-06-22 23:03:56 +00:00
Jeff Morriss 7ad71a2d78 Treat TVBs as opaque: use the accessor functions instead of accessing the fields
directly.

svn path=/trunk/; revision=37420
2011-05-27 01:57:33 +00:00
Bill Meier 058fc19f45 Fix various benign cases of Coverity [UNUSED]: 996,995,956,936,899,1133,1000
svn path=/trunk/; revision=37371
2011-05-23 18:04:45 +00:00
Guy Harris 43d372fe58 ep_alloc() returns a properly-aligned value for all uses; that's why it
returns void * rather than guint8 *.  Don't pointer-convert that
information away; otherwise, compilers might whine about safe pointer
casts.

svn path=/trunk/; revision=36794
2011-04-22 03:53:01 +00:00
Stig Bjørlykke 41d5c9b750 Allocate correct size of hash_key.
Coverity 713.

svn path=/trunk/; revision=36264
2011-03-22 19:13:48 +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
Jeff Morriss 19b2af1e70 Make some symbols static.
svn path=/trunk/; revision=35140
2010-12-06 23:20:21 +00:00
Anders Broman 42e31d3efe From Slava:
Bug with RWH parsing in Infiniband dissector.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5444

svn path=/trunk/; revision=35056
2010-11-28 21:08:03 +00:00
Jeff Morriss 37d4ccff56 From Slava via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5335 :
This patch adds to Wireshark the ability to dissect Infiniband SDP (Socket
Direct Protocol) and CM MADs traffic.

It also contains various other bug-fixes and enhancements. SDP traffic can be
identified automatically (analyzing SDP CM MADs) or manually.

SDP, or Sockets Direct Protocol, is a protocol developed by the Infiniband
Trade Association which enables existing socket-based applications to
transparently utilize the Infiniband capabilities. 

This patch is submitted on behalf of Mellanox Technologies Ltd.

svn path=/trunk/; revision=34918
2010-11-17 02:57:22 +00:00
Jeff Morriss 33f116a46d Restore pinfo->private_data after an exception was thrown by a subdissector.
This is necessary in case a subdissector had changed it but was unable to
restore it (due to the exception).

Remove check_col().

svn path=/trunk/; revision=34436
2010-10-08 17:48:22 +00:00
Anders Broman 03dc7a7f67 From Slava:
This patch adds to the Infiniband dissector the ability to dissect EoIB
(Ethernet-over-Infiniband) traffic which uses Mellanox Technologies Ltd's
standard for encapsulating Ethernet traffic inside Infiniband packets.

This patch is submitted on behalf of Mellanox Technologies Ltd.

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5061

svn path=/trunk/; revision=33808
2010-08-16 05:48:40 +00:00
Stig Bjørlykke 742655b349 Make it compile.
svn path=/trunk/; revision=33770
2010-08-11 12:30:33 +00:00
Anders Broman ce06f1f63e Remove redundant chek_col.
svn path=/trunk/; revision=33769
2010-08-11 12:13:24 +00:00
Anders Broman 0848d851cf From Slava:
The Infiniband dissector currently uses a heuristic where it attempts to parse
IBA payloads as if they contained encapsulated traffic with an Ethertype
header. While a relatively common occurrence and thus a fairly useful feature,
this heuristic in many cases causes false-positives which invoke unneeded
dissectors and generate noise in the form of unjustified "malformed packet"
errors these dissectors cause. This patch adds a checkbox to the Infiniband
preferences menu that allows users to disable this feature if desired. The
option remains on by default.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5062

svn path=/trunk/; revision=33703
2010-08-03 17:08:52 +00:00
Anders Broman dff27826ec From Slava:
Infiniband RoCE dissection.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5060

svn path=/trunk/; revision=33702
2010-08-03 16:57:02 +00:00
Stig Bjørlykke a0022b31f2 From Mellanox Technologies Ltd. via bug 5004:
Added missing variable assignment for dst_qp.

svn path=/trunk/; revision=33501
2010-07-13 14:38:23 +00:00
Anders Broman ee02ae333b This patch is submitted on behalf of Mellanox Technologies:
Printing to the source and destination columns by the Infiniband dissector is
not working properly. This patch changes the printing code to perform the
correct operations, so that the source and destination information properly
appears in the columns.


https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4739

svn path=/trunk/; revision=32648
2010-05-03 18:31:00 +00:00
Anders Broman 0f7fd9399e This patch is submitted on behalf of Mellanox Technologies:
This patch adds code for correct dissection of two performance management
datagrams to the Infiniband dissector. The added MADs are PortCounters and
PortCounters Extended.

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4741

svn path=/trunk/; revision=32647
2010-05-03 18:14:38 +00:00
Anders Broman 17a5f699cc This patch is submitted on behalf of Mellanox Technologies:
This patch adds value strings that display the meaning of the possible values for the infiniband.mad.method field.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4740

svn path=/trunk/; revision=32646
2010-05-03 18:06:21 +00:00
Anders Broman e1ba9e371b This patch is submitted on behalf of Mellanox Technologies:
This patch fixes a bug in Infiniband dissection where the offset was
incorrectly incremented in some cases leading to attempt to read past the end
of the tvb and a MALFORMED-PACKET error being issued.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4738

svn path=/trunk/; revision=32645
2010-05-03 17:58:22 +00:00
Anders Broman 15d860553a This patch is submitted on behalf of Mellanox Technologies:
This patch fixes the code to correctly identify MAD
packets by their source and destination queue pairs.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4737

svn path=/trunk/; revision=32644
2010-05-03 17:51:01 +00:00
Anders Broman 441c3f63b2 From Stephen Donnelly:
InfiniBand Link Packet (flow control) dissector.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4656

svn path=/trunk/; revision=32425
2010-04-08 08:41:56 +00:00
Bill Meier 69df32fb11 #include <string.h> not needed.
svn path=/trunk/; revision=32411
2010-04-06 22:09:47 +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
Gerald Combs 40e2849be8 Just use proto_tree_add_item instead of feeding tvb->real_data to
proto_tree_add_bytes.

svn path=/trunk/; revision=29812
2009-09-08 22:58:23 +00:00
Kovarththanan Rajaratnam 0a5b014cec Don't guard col_clear with col_check
svn path=/trunk/; revision=29344
2009-08-09 07:36:13 +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 b9a11a95a6 From Kovarththanan Rajaratnam:
Move hf/ett definitions from packet-infiniband.h -> packet-infiniband.c to
align it with the rest of the bunch

svn path=/trunk/; revision=28979
2009-07-07 11:40:40 +00:00
Stig Bjørlykke 26bd9f3623 Remove a tvb_free() call.
svn path=/trunk/; revision=28839
2009-06-25 01:50:56 +00:00
Guy Harris b4d3b4244b Get rid of some other uses of ethertype() for protocols that don't have
a trailer.

Clean up the NHRP dissector's handling of the protocol ID to fully
implement RFC 2332 (and mention that 2332 is the RFC for NHRP).  Don't
compute the checksum unless we have all the packet data, and don't use
the captured length as the actual packet length.  Check for an invalid
extension offset value.  Get rid of some unneeded
tvb_ensure_bytes_exist() calls.  Dissect - and set the columns -
regardless of whether we're building the protocol tree.  Mark the packet
in error reports as an error packet.

svn path=/trunk/; revision=28273
2009-05-05 03:50:06 +00:00
Bill Meier c5783e32df infiniband: Fix various issues mostly relating to protocol field display:
- Conform display of fields to Infiniband spec (1.2.1): E.G.: use correct bitmasks in hf[];
  (The verification/correction process is not complete: see packet-inifiniband.h);
- Comment out unused hf[] & related elements;
- hf[]: FT_BOOLEAN entries with bitmask: "BASE" should be "bitwidth of parent bitfield";
- packet-infiniband.c: Use consistent indentation;
-                      Move proto_register & proto_reg_handoff to the end of the file.

svn path=/trunk/; revision=28105
2009-04-21 13:52:00 +00:00
Jaap Keuter 9fb248f1c0 Incorporate plugin dissector into build in collection.
svn path=/trunk/; revision=27502
2009-02-22 10:52:05 +00:00