aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-infiniband.c
AgeCommit message (Collapse)AuthorFilesLines
2014-07-08Fix setting PT_IBQP typeYan Burman1-5/+1
Without this patch, pinfo->ptype is PT_UNKNOWN Change-Id: Ia15b5115f874d0c9ff69be11ed7ee3dac1fadbd5 Signed-off-by: Yan Burman <yanb@mellanox.com> Reviewed-on: https://code.wireshark.org/review/2941 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-19Revert "Fixup: tvb_* -> tvb_captured"Michael Mann1-7/+7
https://www.wireshark.org/lists/wireshark-dev/201406/msg00131.html This reverts commit 246fe2ca4c67d8c98caa84e2f57694f6322e2f96. Change-Id: Ib24bae0198c13a84bd7f731bf4af921212109a8f Reviewed-on: https://code.wireshark.org/review/2430 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-18Fixup: tvb_* -> tvb_capturedDario Lombardo1-7/+7
Change-Id: I9209c1271967405c34c1b6fa43e1726a4d3a5a3f Reviewed-on: https://code.wireshark.org/review/2377 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-05-21Change the signature of dissector_try_heuristic() to return hdtbl_entryAndersBroman1-3/+5
which can be used to call the found heuristic dissector on the next pass. Introduce call_heur_dissector_direct() to be used to call a heuristic dissector which accepted the frame on the first pass. Change-Id: I524edd717b7d92b510bd60acfeea686d5f2b4582 Reviewed-on: https://code.wireshark.org/review/1697 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-02Have Infiniband dissector show payload. Bug 9929.Michael Mann1-100/+47
The trees in the infiniband dissectors were incorrectly setup causing the data dissector to always have a NULL tree (so it wouldn't appear in packet view). Also cleaned up some other unnecessary global variables. Change-Id: I778073bdca864dfc5087cdcfc7ef0018f9bd704c Reviewed-on: https://code.wireshark.org/review/915 Tested-by: Michael Mann <mmann78@netscape.net> Reviewed-by: Graham Bloice <graham.bloice@trihedral.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-04-02Fix InfiniBand dissector. Bug 9719Bart Van Assche1-5/+5
Change-Id: I7b9df14b4d9aa520c3fe28c86014665461b758f2 Reviewed-on: https://code.wireshark.org/review/917 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-03-13Fix dissection of RDMA WRITE ONLY IMM packets.Patrick MacArthur1-0/+13
Change-Id: Icdc4aaa243191dc85e067a75a068c175fa09296b Reviewed-on: https://code.wireshark.org/review/637 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-03-04Remove all $Id$ from top of fileAlexis La Goutte1-2/+0
(Using sed : sed -i '/^ \* \$Id\$/,+1 d') Fix manually some typo (in export_object_dicom.c and crc16-plain.c) Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8 Reviewed-on: https://code.wireshark.org/review/497 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-02-26Replace tabs by spacesPascal Quantin1-2/+2
Change-Id: Ib7b97c415fdf924783637bfe566f1e7d21e28369 Reviewed-on: https://code.wireshark.org/review/401 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-02-26packet-infiniband: pass a struct infinibandinfo to subdissectorsStefan Metzmacher1-96/+24
Change-Id: I187a1a91f34b1b758cad03bd9902ba132272cd3a Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-on: https://code.wireshark.org/review/357 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2013-12-21Add missing includesJakub Zawadzki1-0/+4
svn path=/trunk/; revision=54332
2013-12-18Fix [-Wmissing-prototypes]Anders Broman1-1/+1
svn path=/trunk/; revision=54209
2013-12-15Fix [-Wmissing-prototypes]Jakub Zawadzki1-0/+3
svn path=/trunk/; revision=54135
2013-11-21Remove ethertype, mpls_label and ppids from packet_info structure.Michael Mann1-2/+0
The information was converted to "proto" data within their respective dissectors strictly for use in "Decode As". svn path=/trunk/; revision=53489
2013-11-10Add missing includes in order to remove exceptions.h from proto.h (next commit).Jakub Zawadzki1-0/+1
svn path=/trunk/; revision=53230
2013-10-29From didier gautheron: remove redundant or use faster col_xxx functionsBill Meier1-3/+1
- when the text parameter is constant col_add_str() and col_set_str() are equivalent but col_set_str() is faster. - same for replace col_append_fstr and col_append_str - remove col_clear() when it's redundant: + before a col_set/col_add if the dissector can't throw an exception. - replace col_append() after a col_clear() with faster col_add... or col_set https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9344 svn path=/trunk/; revision=52948
2013-09-16Convert each of the address.h macros to inline functions. Gerald Combs1-4/+3
Document each function. Note that we now call tvb_get_ptr() before modifying the address in tvb_set_address() and tvb_set_address_hf(). The caller doesn't have to worry about doing that any more. Add add_address_to_hash64(). svn path=/trunk/; revision=52106
2013-09-15More wmem conversion (leaving uat related functions aside)Pascal Quantin1-9/+9
svn path=/trunk/; revision=52055
2013-08-05Keep result of [new_]register_dissector in some dissectors.Jakub Zawadzki1-4/+5
svn path=/trunk/; revision=51156
2013-03-18From beroset:Anders Broman1-11/+11
remove C++ incompatibilities https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 svn path=/trunk/; revision=48400
2013-02-27Move show_exception() and show_reported_bounds_error() toGuy Harris1-35/+16
epan/show_exception.c, as it's used outside epan/dissectors/packet-frame.c. Update their callers to include <epan/show_exception.h> to get their declaration. Add a CATCH_NONFATAL_ERRORS macro that catches all exceptions that, if there's more stuff in the packet to dissect after the dissector call that threw the exception, doesn't mean you shouldn't go ahead and dissect that stuff. Use it in all those cases, including ones where BoundsError was inappropriately being caught (you want those passed up to the top level, so that the packet is reported as having been cut short in the capture process). Add a CATCH_BOUNDS_ERRORS macro that catches all exceptions that correspond to running past the end of the data for a tvbuff; use it rather than explicitly catching those exceptions individually, and rather than just catching all exceptions (the only place that DissectorError should be caught, for example, is at the top level, so dissector bugs show up in the protocol tree). Don't catch and then immediately rethrow exceptions without doing anything else; just let the exceptions go up to the final catcher. Use show_exception() to report non-fatal errors, rather than doing it yourself. If a dissector is called from Lua, catch all non-fatal errors and use show_exception() to report them rather than catching only ReportedBoundsError and adding a proto_malformed item. Don't catch exceptions when constructing a trailer tvbuff in packet-ieee8023.c - just construct it after the payload has been dissected, and let whatever exceptions that throws be handled at the top level. Avoid some TRY/CATCH/ENDTRY cases by using checks such as tvb_bytes_exist() before even looking in the tvbuff. svn path=/trunk/; revision=47924
2013-02-26Fix spelling/typos found using a list of commonly misspelled words.Bill Meier1-1/+1
The misspellings were mostly in comments but some were in text strings visible to the user. svn path=/trunk/; revision=47899
2013-01-24Add support for HFI and infiniband interfaces in AIX iptrace files.Gilbert Ramirez1-0/+4
svn path=/trunk/; revision=47258
2012-09-20We always HAVE_CONFIG_H so don't bother checking whether we have it or not.Jeff Morriss1-3/+1
svn path=/trunk/; revision=45017
2012-09-11Add data parameter to dissector_try_heuristicJakub Zawadzki1-3/+3
svn path=/trunk/; revision=44871
2012-06-28Update Free Software Foundation address.Jakub Zawadzki1-1/+1
(COPYING will be updated in next commit) svn path=/trunk/; revision=43536
2012-05-21Fix "Function call argument is an uninitialized value" issue found by ↵Bill Meier1-851/+856
scan-build. (It seems to me that this issue would rarely, if ever, actually occur). Also: - Use val_to_str_const() as appropriate; - Localize some variables; - Remove unneeded initializers; - Do some parenthesizing; - Use a consistent formatting style; - Do whitespace cleanup. svn path=/trunk/; revision=42754
2012-04-10Fix bug #7053, change ep_ to se_Jakub Zawadzki1-4/+11
** ERROR **: Memory corrupted (not scrubbed) dead0004 svn path=/trunk/; revision=42002
2012-04-05Fix invalid use of sizeof, it should be array length.Jakub Zawadzki1-12/+12
svn path=/trunk/; revision=41960
2012-03-10Fix some Dead Store (Dead assignement/Dead increment) Warning found by ClangAlexis La Goutte1-80/+99
svn path=/trunk/; revision=41467
2011-11-29Fix some Dead Store (Dead assignement/Dead increment) Warning found by ClangAlexis La Goutte1-4/+4
svn path=/trunk/; revision=40042
2011-10-26Add missing hf[] entries (and fix proto_tree_add_item() encoding args).Bill Meier1-11/+53
svn path=/trunk/; revision=39605
2011-10-24Fix encoding arg for various fcn calls:Bill Meier1-2/+2
- 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-21For proto_tree_add_item(..., proto_xxx, ...)use ENC_NA as the encoding arg.Bill Meier1-2/+2
Also: remove trailing whitespace for a number of files. svn path=/trunk/; revision=39503
2011-10-20From Huzaifa Sidhpurwala: Fix a null pointer dereference.Gerald Combs1-3/+13
svn path=/trunk/; revision=39500
2011-10-16Do some conversions of proto_tree_add_item() 'encoding' arg.Bill Meier1-6/+6
(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-15Convert proto_tree_add_item() 'encoding' arg for field types FT_STRING, ↵Bill Meier1-2/+2
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-10 Convert 'encoding' parameter of certain proto_tree_add_item() calls in ↵Bill Meier1-31/+31
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-06Convert 'encoding' parameter of certain proto_tree_add_item() calls in ↵Bill Meier1-436/+436
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-04Use ENC_NA as encoding for proto_tree_add_item() calls which directly ↵Bill Meier1-87/+87
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-08-08Remove unneeded #includes: proto.h,tvbuff.h,value_string.h,stdlib.h,...Bill Meier1-3/+3
svn path=/trunk/; revision=38413
2011-06-22Fix some gcc 4.6 "set but not used [-Wunused-but-set-variable]" warnings;Bill Meier1-5/+2
Also: misc minor cleanup: unneeded #include; whitespace, tvb_length-->tvb_reported_length svn path=/trunk/; revision=37757
2011-05-27Treat TVBs as opaque: use the accessor functions instead of accessing the fieldsJeff Morriss1-2/+2
directly. svn path=/trunk/; revision=37420
2011-05-23Fix various benign cases of Coverity [UNUSED]: 996,995,956,936,899,1133,1000Bill Meier1-5/+1
svn path=/trunk/; revision=37371
2011-04-22ep_alloc() returns a properly-aligned value for all uses; that's why itGuy Harris1-2/+2
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-03-22Allocate correct size of hash_key.Stig Bjørlykke1-1/+1
Coverity 713. svn path=/trunk/; revision=36264
2010-12-20Rename the routines that handle dissector tables with unsigned integerGuy Harris1-3/+3
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-06Make some symbols static.Jeff Morriss1-2/+2
svn path=/trunk/; revision=35140
2010-11-28From Slava:Anders Broman1-8/+5
Bug with RWH parsing in Infiniband dissector. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5444 svn path=/trunk/; revision=35056
2010-11-17From Slava via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5335 :Jeff Morriss1-150/+2209
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