summaryrefslogtreecommitdiff
path: root/epan/dissectors/packet-infiniband.c
AgeCommit message (Collapse)AuthorFilesLines
2017-06-15infiniband: add RETH remote key to infinibandinfo structNitzan Carmi1-15/+18
RETH remote key might be needed in protocol's dissectors. Remote access key is shared out of band usually via RDMA send operation. This key sharing is upper layer protocol specific and protocol dissector knows about the key. infiniband layer do not know about which rkey is shared. For protocol dissectors to associate data packets with past command packets, infiniband needs to provide the rkey. Change-Id: I927116d649ed2b01c388afbcdb924cb7e5128e12 Signed-off-by: Nitzan Carmi <nitzanc@mellanox.com> Reviewed-by: Parav Pandit <parav@mellanox.com> Tested-by: Nitzan Carmi <nitzanc@mellanox.com> Reviewed-on: https://code.wireshark.org/review/22123 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-03-05dissectors: fix this statement may fall through ↵Alexis La Goutte1-0/+2
[-Werror=implicit-fallthrough=] found by gcc7 Change-Id: Iba6238988ded675cba328ab512232d1919d93b4a Reviewed-on: https://code.wireshark.org/review/20415 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-01-20infiniband: add shutdown routine.Dario Lombardo1-0/+8
Change-Id: I3e7c1b8f589662a81c665b8b43056f20c17428ca Reviewed-on: https://code.wireshark.org/review/19704 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-01-13packet-infiniband: Pass read request packets to ULP dissectorsParav Pandit1-1/+2
This patch passes RDMA read request packets to ULP dissectors similar to other RDMA packets so that ULP dissector can have opportunity to show as upper layer protocol instead of IB or RRoCE. Change-Id: I594d8eada858b7f77fc94be44e3639526789779e Tested-by: paravpandit@yahoo.com Reviewed-on: https://code.wireshark.org/review/19619 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-01-07Add support for RROCE(v2) over IPv4 (without UDP).Jeff Morriss1-2/+6
This isn't standard but has been seen in the wild, see: https://ask.wireshark.org/questions/58521/cannot-decode-rocev2-traffic With this change users can Decode-As an IP Protocol as RROCE (by selecting Infiniband (IB) as the protocol). Change-Id: Iec865478d056f687f2f66124d6e936f67707d2c4 Reviewed-on: https://code.wireshark.org/review/19572 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-01-05Update the preference help text to indicate the correct default RROCE port.Jeff Morriss1-2/+2
I97b82fb53fd63d9107ee5d4c64b94840e743fc72 changed the default but not the help text. Change-Id: I05375c44c01703e36686d0a16a094cb8d6b3dcd2 Reviewed-on: https://code.wireshark.org/review/19557 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-01-04No reason not to use etype_vals for an Ethertype field.Guy Harris1-1/+1
Maybe there was an issue on Windows back in the old days, when 1) we didn't have a shared libwireshark library from which to import functions and data variables and thus you couldn't get variables such as etype_vals in a plugin and 2) the Infiniband dissector was a plugin, but neither of those are the case any more. Change-Id: Id8b82886317bd36a32ad1e1591673623696d4808 Reviewed-on: https://code.wireshark.org/review/19530 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-01-03infiniband: remove offset variable.Dario Lombardo1-9/+7
Change-Id: Ie86c2aece05ebbc35eb15a54d8c3f2c455ff53cf Reviewed-on: https://code.wireshark.org/review/19516 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Petri-Dish: Dario Lombardo <lomato@gmail.com> Reviewed-by: Dario Lombardo <lomato@gmail.com>
2017-01-03infiniband: fix error for clobbered variable.Dario Lombardo1-1/+1
Given by gcc-4.9.2 on arm: epan/dissectors/packet-infiniband.c:2708:9: error: variable ‘offset’ might be clobbered by ‘longjmp’ or ‘vfork’ [-Werror=clobbered] int offset = 0; ^ cc1: all warnings being treated as errors Change-Id: I12066031093c1fa638792ff8be8f3f5457e3feda Reviewed-on: https://code.wireshark.org/review/19515 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-12-28Infiniband: Use base of packet tree (top_tree) for ↵Michael Mann1-23/+24
"infiniband.mad.cm.private" heuristic dissector. The "infiniband.payload" heuristic dissector was converted to use the base of the packet tree so that subdissectors could show their protocol as the base layer. Since many of the subdissectors use the same dissection function for both "infiniband.payload" and "infiniband.mad.cm.private", ensure that both use the same "tree level", but still pass in the "payload tree" as part of the dissector data in case a subdissector wants to use it (currently used by InfinibandSDP) Ping-Bug: 13259 Change-Id: I899e8348f6b23d8eee9e74764d8ca32d7bf6e625 Tested-by: paravpandit@yahoo.com Reviewed-on: https://code.wireshark.org/review/19441 Petri-Dish: Anders Broman <a.broman58@gmail.com> Reviewed-by: Parav Pandit <paravpandit@yahoo.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-12-20Improve Infiniband heuristic subdissection.Michael Mann1-2/+53
Add preference in Infiniband dissector to distinguish between heuristic and non-heuristic dissection (that uses Decode As). Remove all of the preferences in the Infiniband subdissectors that tried to put in "manual" heuristics and direct users to just use Decode As. Most subdissectors still kept some basic heuristics in their heuristic functions, but now also register with the Infiniband dissector table for "manually" forcing dissection with Decode As. Ping-Bug: 13259 Change-Id: I20d56eee38887664b439e52ec5f5b8f962c45ef1 Reviewed-on: https://code.wireshark.org/review/19362 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-12-19Make more infiniband subdissectors heuristic.Michael Mann1-157/+161
1. Convert the Mellanox encapsulation header into a heuristic dissector. 2. Convert EtherType header dissection into a heuristic dissector. 3. Convert "heuristic preferences" to use deprecated_heur_dissector_pref. Ping-Bug: 5061 Ping-Bug: 2672 Change-Id: Iabcac1af8e07f3f6f25f825ed56b2036c3285783 Reviewed-on: https://code.wireshark.org/review/19317 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-12-13packet-infiniband: Update conversation src port for exact lookupParav Pandit1-3/+23
Dissectors above infiniband (such as RPC dissector) performs exact lookup on saddr, daddr, sport, dport. They are unaware that underlying transport is infiniband which doesn't have src_qp in packets. Due to which srcport remains uninitialized and exact lookup fails. In order to get them work seemlessly, this fix updates the sport to src_qp (similar to destport to dest_qp). With this upper level dissectors can perform direct lookup similar to TCP. Those which need to access private data of unidirectional CM messages, can still continue to perform unidirectional lookup as before. It also fixes the issue where req_qp and resp_qp were swapped during bidirectional conversation creation. This was caught during testing with packet-rpc.c by Chuck Lever. Tested protocols: 1. nfs-rdma over Infiniband with trace of Bug 13213 2. ICMP packets over Infiniband 3. NVMe fabrics over RDMA Tested with trace of Bug 13201 for Nvme. Bug: 13202 Bug: 13213 Change-Id: Ica1b6aae3ccaa6642dc3b3edfa9a5a4c335cc5da Tested-by: paravpandit@yahoo.com Reviewed-on: https://code.wireshark.org/review/19190 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Chuck Lever <chuck.lever@oracle.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-12-08Revert "Revert "Don't use a local variable's address in set_address().""Guy Harris1-1/+1
This reverts commit 92a2c184b09ce41a1ab717963750bb5543099742. Actually, that address *is* attached to a pinfo structure. Change-Id: I183135f9cf10a6714045091d2ae02d2799093bae Reviewed-on: https://code.wireshark.org/review/19143 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-12-07Revert "Don't use a local variable's address in set_address()."Guy Harris1-1/+1
This reverts commit e2c26ff90c6aee381c3af0c33253dcfa5631bb43. *That* address isn't attached to a pinfo structure, it's used to create a conversation, and a copy is made of it, using file scope. So that's not the cause of this problem. Change-Id: I07ce091e678c42c30080cd00fd17cd1584f473ad Reviewed-on: https://code.wireshark.org/review/19138 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-12-07Don't use a local variable's address in set_address().Guy Harris1-1/+1
The address data is supposed to outlive the current routine's scope, so you can't pass it a pointer to an argument to the routine; you have to allocate pinfo-scoped memory and copy the variable to that. Bug: 13219 Change-Id: Id3fdb52b614036d4d24d0676e798a2524fbe916c Reviewed-on: https://code.wireshark.org/review/19136 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-12-03packet-infiniband: Fixed duplicate conversation entriesParav Pandit1-29/+74
1. Fixed find_conversation for PT_IBQP to not lookup in reverse direction when all searches fail. This is required, because there could be valid different connection in reverse direction which mistakenly gets updated for non template cases. 2. Added support for having MAD data for upper level dissectors to process during RC packet processing. This is required because connection options are negotiated out of band using this CM exchanges (unlike in band TCP options). 3. Moved creating unidirectional connections when actually MAD packets are processed. Previously client-to-server unidirectional conversation was created when CM_RSP stage, where MAD Data of CM_REQ packet is inaccessible. 4. Fixed creating multiple conversations with same address property by eliminating create_conv_and_add_proto_data during RTU stage, which was incorrect. Now they are created during REQ and RSP frame processing. (Instead of RSP and RTU processing). 5. Added support for creating bidirectional connection that ULP can refer. This is required to keep track of oustanding transactions on a connection (requests and responses). Bug: 11363 Change-Id: I32ea084a581a58efbc16dbb7a3e267c82622c50c Tested-by: paravpandit@yahoo.com Reviewed-on: https://code.wireshark.org/review/18982 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-11-02packet-infiniband: Fixed IP based connections & other minor fixesParav Pandit1-67/+123
1. Fixed setting right address type instead of AT_IB for RoCE and RRoCE depending on address type given by pinfo where address type would be IPv4 or IPV6. Fail to do so was resulting into infiniband dissector adding conversation info based on AT_IB type vs payload dissectors dissecting based on pinfo. Fixing this allows to add/search based on right address type. (Tested for Infiniband and RRoCE) 2. Added support to pass already parsed CM attribute id from infiniand to other mad private data dissectors so that right dissection of private data can be done based on CM attribute id (message type). Moved CM attribute id definitions to header file so that private data dissectors based on CM attribute id can reuse these values without duplicate defines. (Tested for Infiniband and RRoCE) 3. Added direction client to server/server to client, (active/passive) to conversation_data for payload dissectors which cannot dissect only based on payload content without knowing the direction. (Tested for RRoCE) 4. Fixed IP CM to claim all 92 bytes of private data (including consumer private data), instead of just 36 bytes of header because its part of IP CM private data. (Tested for Infiniband and RRoCE) 5. Fixed MAD header to claim all 232 (256-24) bytes of data as it belongs to it in the tree. (Tested for Infiniband and RRoCE) 6. Fixed getting ip version by performing AND operation first to extract IP version field. (Tested for RRoCE-IPV4 and Infiniband) Change-Id: I37daca6a089784b61c25e10cdc8f3cf028ca8c58 Tested-by: paravpandit@yahoo.com Reviewed-on: https://code.wireshark.org/review/18573 Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Petri-Dish: Anders Broman <a.broman58@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-10-26packet-infiniband: Add support to sub dissect CM messages private dataParav Pandit1-87/+188
1. This patch enables sub dissectors to parse RTU, REJ, DREQ, DRSP CM messages private data. (Sub dissection for CM REQ and RSP private data was already present). 2. For dissecting non CM data specific packets, connection context needs to be active until connection is closed. So instead of removing hash table entry during CM response message, it keeps it around until DRSP (when connection is closed). 3. This patch moves CM messsage dissection to their individual functions for cleanup, so that main parser remains readable code. 4. created smaller functions for reusing in different message parsing functions. REQ, RSP, DREQ, DRSP message are tested. REJ is untested. Change-Id: I3b4695402d1dbe93fc003d4b43424ae0aa96ba43 Tested-by: paravpandit@yahoo.com Reviewed-on: https://code.wireshark.org/review/18469 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2016-10-24packet-infiniband: Added support to dissect ip cm request private dataParav Pandit1-5/+114
This patch adds support to dissect 36 bytes of private data of Table 560 of spec 1.3.1 whenever CM request message is of IP CM type. Change-Id: I66b65b066a0034cf95c4c4f38549882c265b7ef5 Tested-by: paravpandit@yahoo.com Reviewed-on: https://code.wireshark.org/review/18434 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Roland Knall <rknall@gmail.com>
2016-10-23packet-infiniband: Fixed displaying reserved fieldParav Pandit1-220/+306
1. Added Extended transport type field instead of reserved as per latest release 1.3.1 in CM Req msg. 2. Defined reserved bits and bytes for CM messages 3. Minor code refactor to move to smaller functions for CM Req Rsp parsing instead of 200+ lines function which is hard to read and is expected to grow for more features 4. Cleanup around primary and alternate fields which were crossing byte boundary CM request and response messages are tested. Reject message reserved fields change is untested but it a minor change that is expected to work. Change-Id: I94da62614f854218249b4e14c780f4168f44751c Reported-by: Alexis La Goutte Tested-by: paravpandit@yahoo.com Reviewed-on: https://code.wireshark.org/review/18340 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
2016-10-20packet-infiniband: Add support for IP CM serviceidParav Pandit1-3/+51
Added support for decoding IP CM Service id for CM Connect requests. Annex 11.2 defines a specific prefix of serviceid for IP CM based ULPs. Corrected typo error which got introduced as part of bad local merge for hf_cm_drsp_privatedata. Corrected now. Change-Id: I18235ea86d82a224dcc7110a1c45c08f698fa9a6 Tested-by: paravpandit@yahoo.com Reviewed-on: https://code.wireshark.org/review/18284 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-10-18packet-infiniband: Add support for CM DREQ/DRSPParav Pandit1-19/+74
Added support for decoding CM Disconnect and CM Disconnect response packets. Reusing ATTR macros in CM_Attributes definition. Change-Id: Ic6065b67d2007fc68848441e0c866e4a637a3657 Tested-by: paravpandit@yahoo.com Reviewed-on: https://code.wireshark.org/review/18229 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-10-13Convert most UDP dissectors to use "auto" preferences.Michael Mann1-1/+2
Similar to the "tcp.port" changes in I99604f95d426ad345f4b494598d94178b886eb67, convert dissectors that use "udp.port". More cleanup done on dissectors that use both TCP and UDP dissector tables, so that less preference callbacks exist. Change-Id: If07be9b9e850c244336a7069599cd554ce312dd3 Reviewed-on: https://code.wireshark.org/review/18120 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-09-29packet-infiniband: Fix setting rocev2 udp port numberParav Pandit1-1/+1
This patch sets RoCE-v2 (RRoCE) UDP port number to right value of 4791 as assigned by IANA described in below link. http://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml?search=RoCE#InfiniBand_Trade_Association Change-Id: I97b82fb53fd63d9107ee5d4c64b94840e743fc72 Tested-by: pandit.parav@gmail.com Reviewed-on: https://code.wireshark.org/review/17971 Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-08-04Bump GLib minimum required version to 2.22.0João Valverde1-1/+0
Change-Id: I0ab85be8090f234f9ca10914063f97f13c894413 Reviewed-on: https://code.wireshark.org/review/16879 Petri-Dish: João Valverde <j@v6e.pt> Reviewed-by: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt>
2016-03-20Create call_data_dissector() to call data dissector.Michael Mann1-6/+4
This saves many dissectors the need to find the data dissector and store a handle to it. There were also some that were finding it, but not using it. For others this was the only reason for their handoff function, so it could be eliminated. Change-Id: I5d3f951ee1daa3d30c060d21bd12bbc881a8027b Reviewed-on: https://code.wireshark.org/review/14530 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-03-20Manually add protocol dependencies derived from find_dissector.Michael Mann1-1/+1
Started by grepping call_dissector_with_data, call_dissector_only and call_dissector and traced the handles passed into them to a find_dissector within the dissector. Then replaced find_dissector with find_dissector_add_dependency and added the protocol id from the dissector. "data" dissector was not considered to be a dependency. Change-Id: I15d0d77301306587ef8e7af5876e74231816890d Reviewed-on: https://code.wireshark.org/review/14509 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-03-17Associate dissector tables and heuristic subdissector lists with a protocol.Michael Mann1-2/+2
This will make it easier to determine protocol dependencies. Some LLC OUI dissector tables didn't have an associated protocol, so they were left without one (-1 used) Change-Id: I6339f16476510ef3f393d6fb5d8946419bfb4b7d Reviewed-on: https://code.wireshark.org/review/14446 Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-01-24Add the packet number to the packet_info structure, and use it.Guy Harris1-5/+5
That removes most of the uses of the frame number field in the frame_data structure. Change-Id: Ie22e4533e87f8360d7c0a61ca6ffb796cc233f22 Reviewed-on: https://code.wireshark.org/review/13509 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-17Correctly construct subset tvbuffs.Guy Harris1-23/+8
Use tvb_subset_remaining() or tvb_subset_length() - they calculate the correct captured length for you. This fixes, for example, the EoIB code, where you ended up with tvbuffs with captured length > reported length. Change-Id: Ie792b53a796d4b32242cb83020b54232a2a09698 Reviewed-on: https://code.wireshark.org/review/13355 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-17Call the "no FCS present" version of the Ethernet dissector.Guy Harris1-1/+19
I haven't found an official spec for EoIB, but slide 10 of http://downloads.openfabrics.org/Media/Sonoma2009/Sonoma_2009_Tues_converged-net-bridging.pdf shows the "Eth Payload" following the "Eth Header" and optional "Vlan tag", and doesn't show an FCS; "Payload" generally refers to the data transported by the protocol, which wouldn't include the FCS. In addition, the capture attached to bug 5061 includes no Ethernet FCS. So we assume the Ethernet frames carried by EoIB don't include the Ethernet FCS. Bug: 9933 Change-Id: I310e5727c42e05498d1f1df08266a48fd6674388 Reviewed-on: https://code.wireshark.org/review/13351 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-09new_register_dissector -> register_dissector for dissector directory.Michael Mann1-2/+2
Change-Id: Ie39ef054a4a942687bd079f3a4d8c2cc55d5f22c Reviewed-on: https://code.wireshark.org/review/12485 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-09new_create_dissector_handle -> create_dissector_handle for dissector directory.Michael Mann1-2/+2
Some of the ASN.1 dissectors still generate a new_create_dissector_handle from the tool itself, so leave those for now. Change-Id: Ic6e5803b1444d7ac24070949f5fd557909a5641f Reviewed-on: https://code.wireshark.org/review/12484 Petri-Dish: Anders Broman <a.broman58@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-16create_dissector_handle -> new_create_dissector_handleMichael Mann1-8/+8
Picking off "easy" dissectors that only have one or two exit points at most. Change-Id: I96aa9cf53533cbb07105aa400d42922baf3016b3 Reviewed-on: https://code.wireshark.org/review/11860 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-14register_dissector -> new_register_dissectorMichael Mann1-8/+8
Picking off "easy" dissectors that only have one or two exit points at most. Change-Id: I25fe6a0aac93980333217d007702799d16946563 Reviewed-on: https://code.wireshark.org/review/11816 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-03Remaining ADDRESS macro to address function conversionsJoão Valverde1-4/+4
Change-Id: I8bc9af431e70243b05f4f0ce8c2b8ee451383788 Reviewed-on: https://code.wireshark.org/review/11463 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-10-22Use address functions instead of ADDRESS macros in asn1 and epanGerald Combs1-10/+10
Replace CMP_ADDRESS, COPY_ADDRESS, et al with their lower-case equivalents in the asn1 and epan directories. Change-Id: I4043b0931d4353d60cffbd829e30269eb8d08cf4 Reviewed-on: https://code.wireshark.org/review/11200 Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-09-10InfiniBand: fix dissection of MCMemberRecord JoinState fieldPascal Quantin1-1/+1
Bug: 11512 Change-Id: Ie13bcfd0daa72ce2090e3cc538dd7bf601e3e177 Reviewed-on: https://code.wireshark.org/review/10464 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-02-16Put the 64-bit hash routines into a common file.Guy Harris1-18/+1
Some or all are used by the Infiniband, MBIM, and RSVD dissectors; put them into a common source file, with a header for them, and just include the header in the dissectors. Change-Id: I724f0c2232ba751ccbd491222af6f03bafd6d63c Reviewed-on: https://code.wireshark.org/review/7182 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-07SET_ADDRESS -> TVB_SET_ADDRESS to "hide" some of the tvb_get_ptr use.Michael Mann1-28/+4
Not all changes were able to remove their corresponding tvb_get_ptr, because there are other API dependent on the (tvb_get)pointer, but future iterations optimizing those other APIs will then be able to remove it. Change-Id: Id7cefd440b81834de1d1aace7cd0789b1c871a22 Reviewed-on: https://code.wireshark.org/review/6358 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-12-23Deleting unnecessary #includes from dissectors.Martin Mathieson1-3/+0
Third batch (packet-icmpv6.c -> packet-mac-lte.c). Will look at cleaning up and committing script afterwards. Change-Id: Ib91e36ad200db01c3000605f6a7a21125b96a640 Reviewed-on: https://code.wireshark.org/review/6018 Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com> Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2014-12-21Cleanup use of #includes in non-generated epan/dissector/*.cBill Meier1-3/+0
Specifically: - Set packet.h to be the first wireshark #include after config.h and "system" #includes. packet.h added as an #include in some cases when missing. - Remove some #includes included (directly/indirectly) in packet.h. E.g., glib.h. (Done only for those files including packet.h). - As needed, move "system" #includes to be after config.h and before wireshark #includes. - Rework various #include file specifications for consistency. - Misc. Change-Id: Ifaa1a14b50b69fbad38ea4838a49dfe595c54c95 Reviewed-on: https://code.wireshark.org/review/5923 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-12-21Have a heur_dissector_list_t be an opaque handle.Guy Harris1-2/+2
This allows dissector lists to be looked up by name, so they can be shared by multiple dissectors. (This means that there's no "udplite" heuristic dissector list, but there shouldn't be one - protocols can run atop UDP or UDPLite equally well, and they share a port namespace and uint dissector table, so they should share a heuristic dissector table as well.) Change-Id: Ifb2d2c294938c06d348a159adea7a57db8d770a7 Reviewed-on: https://code.wireshark.org/review/5936 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-11-26Remove the use of pinfo->private_data from dissectors that just save it to ↵Michael Mann1-7/+1
restore it. Change-Id: I13197cc48068bb35ee12a7023cfe5f76bbc4e264 Reviewed-on: https://code.wireshark.org/review/5486 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-11-25Add new dissector for Shared Memory Communications over RDMA protocol (SMC-R)Joe Fowler1-11/+18
RFC draft http://www.ietf.org/id/draft-fox-tcpm-shared-memory-rdma-05.txt used as reference for packet dissection. A small change was made to packet-infiniband, to add the Queue Number to the info column. This allows for easy indentification of session traffic for a particular QP. Also: infiniband: tvb_length() --> tvb_captured_length() Bug: 10715 Change-Id: I774ceffaa5c271cb6a28ab4ed21e53cd42f2547b Reviewed-on: https://code.wireshark.org/review/5386 Petri-Dish: Bill Meier <wmeier@newsguy.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-10-28Infiniband: fix warning: C++ style comments are not allowed in ISO C90Alexis La Goutte1-1/+1
Change-Id: I706d6b7cf4c8d0367f485b55fa11a905bff426d1 Reviewed-on: https://code.wireshark.org/review/4957 Reviewed-by: Evan Huus <eapache@gmail.com>
2014-10-13RoCE and CM dissector fixesTim (Thanh) Nguyen1-50/+55
- fixed cm.req cm.rep bit fields - fixed packetLength and CRC length for RoCE - use "RoCE" or "RRoCE" instead of "InfiniBand" in COL_PROTOCOL where appropriate Change-Id: Id491658f9368034bb2267922fa5618e1c259cd56 Reviewed-on: https://code.wireshark.org/review/4614 Petri-Dish: Bill Meier <wmeier@newsguy.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Evan Huus <eapache@gmail.com>
2014-09-29Add editor modelines; fix indentation as needed.Bill Meier1-0/+13
Change-Id: I1ad94654343e5a018a0b3159481d45ffb3a91263 Reviewed-on: https://code.wireshark.org/review/4363 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-09-22 packet-infiniband: added support for RoCE-v2 (RRocE)Wasim Abu Moch1-15/+66
Added support for the new Routable RDMA over Converged Ethernet. (NEW PATCH) Change-Id: I857a27c4f29cc78fcea8efa113e3c7e968eb041b Reviewed-on: https://code.wireshark.org/review/4156 Reviewed-by: Evan Huus <eapache@gmail.com>