Commit Graph

127 Commits

Author SHA1 Message Date
Dario Lombardo d6282d59a7 infiniband: add shutdown routine.
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-20 18:37:17 +00:00
Parav Pandit a4bbd3cc77 packet-infiniband: Pass read request packets to ULP dissectors
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-13 02:56:04 +00:00
Jeff Morriss ae5dbe1b63 Add support for RROCE(v2) over IPv4 (without UDP).
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-07 06:57:55 +00:00
Jeff Morriss a8d4051e69 Update the preference help text to indicate the correct default RROCE port.
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-05 22:26:08 +00:00
Guy Harris a2d6fb94fc No reason not to use etype_vals for an Ethertype field.
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-04 02:10:24 +00:00
Dario Lombardo 564051df5e infiniband: remove offset variable.
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-03 15:02:41 +00:00
Dario Lombardo 8c86f3b0a3 infiniband: fix error for clobbered variable.
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>
2017-01-03 13:31:07 +00:00
Michael Mann 40c618eac5 Infiniband: Use base of packet tree (top_tree) for "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-28 08:58:44 +00:00
Michael Mann 4c50e4b5c4 Improve Infiniband heuristic subdissection.
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-20 22:15:56 +00:00
Michael Mann a942468e07 Make more infiniband subdissectors heuristic.
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-19 14:19:48 +00:00
Parav Pandit 9f9086c392 packet-infiniband: Update conversation src port for exact lookup
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-13 03:22:05 +00:00
Guy Harris 98ec464f0c Revert "Revert "Don't use a local variable's address in set_address().""
This reverts commit 92a2c184b0.

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-08 09:07:21 +00:00
Guy Harris 92a2c184b0 Revert "Don't use a local variable's address in set_address()."
This reverts commit e2c26ff90c.

*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-07 22:50:57 +00:00
Guy Harris e2c26ff90c Don't use a local variable's address in set_address().
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-07 22:21:54 +00:00
Parav Pandit 77f31c6e7d packet-infiniband: Fixed duplicate conversation entries
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-12-03 13:24:16 +00:00
Parav Pandit 8ba444b843 packet-infiniband: Fixed IP based connections & other minor fixes
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-11-02 01:22:37 +00:00
Parav Pandit 41c4cd81a5 packet-infiniband: Add support to sub dissect CM messages private data
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-26 11:57:11 +00:00
Parav Pandit e3ecb9310c packet-infiniband: Added support to dissect ip cm request private data
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-24 18:26:46 +00:00
Parav Pandit 3156980aa5 packet-infiniband: Fixed displaying reserved field
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-23 22:34:23 +00:00
Parav Pandit d821c72b97 packet-infiniband: Add support for IP CM serviceid
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-20 07:08:35 +00:00
Parav Pandit 2c071296f5 packet-infiniband: Add support for CM DREQ/DRSP
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-18 05:14:30 +00:00
Michael Mann 2eb7b05b8c Convert most UDP dissectors to use "auto" preferences.
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-10-13 02:51:18 +00:00
Parav Pandit 7aa243c0c7 packet-infiniband: Fix setting rocev2 udp port number
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-09-29 00:54:13 +00:00
João Valverde d21295f9a6 Bump GLib minimum required version to 2.22.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-08-04 16:13:41 +00:00
Michael Mann 1e60d63c8c Create call_data_dissector() to call data dissector.
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-20 17:38:03 +00:00
Michael Mann 9bcac48403 Manually add protocol dependencies derived from find_dissector.
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-20 12:48:48 +00:00
Michael Mann e37275bfde Associate dissector tables and heuristic subdissector lists with a protocol.
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-03-17 00:05:17 +00:00
Guy Harris bc5a0374bf Add the packet number to the packet_info structure, and use it.
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-24 03:41:28 +00:00
Guy Harris 5625dc78db Correctly construct subset tvbuffs.
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-17 08:30:01 +00:00
Guy Harris 2c3d343592 Call the "no FCS present" version of the Ethernet dissector.
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>
2016-01-17 04:03:37 +00:00
Michael Mann 31a54708f4 new_register_dissector -> register_dissector for dissector directory.
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-09 12:38:06 +00:00
Michael Mann 443a7ed259 new_create_dissector_handle -> create_dissector_handle for dissector directory.
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-12-09 12:37:36 +00:00
Michael Mann 799d6fd057 create_dissector_handle -> new_create_dissector_handle
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-16 22:00:30 +00:00
Michael Mann 8faf5c80b3 register_dissector -> new_register_dissector
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-14 18:00:00 +00:00
João Valverde 3df2333155 Remaining ADDRESS macro to address function conversions
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-11-03 12:20:34 +00:00
Gerald Combs 86fe2be4dc Use address functions instead of ADDRESS macros in asn1 and epan
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-10-22 11:45:56 +00:00
Pascal Quantin e1ba44951c InfiniBand: fix dissection of MCMemberRecord JoinState field
Bug: 11512
Change-Id: Ie13bcfd0daa72ce2090e3cc538dd7bf601e3e177
Reviewed-on: https://code.wireshark.org/review/10464
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-09-10 18:15:46 +00:00
Guy Harris cfb1bc3bb4 Put the 64-bit hash routines into a common file.
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-02-16 19:33:57 +00:00
Michael Mann 4088a8286d SET_ADDRESS -> TVB_SET_ADDRESS to "hide" some of the tvb_get_ptr use.
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>
2015-01-07 12:37:52 +00:00
Martin Mathieson 86ed26f0b8 Deleting unnecessary #includes from dissectors.
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-23 14:44:28 +00:00
Bill Meier b5d7b7ab6e Cleanup use of #includes in non-generated epan/dissector/*.c
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-21 05:46:22 +00:00
Guy Harris 2b006ad30e Have a heur_dissector_list_t be an opaque handle.
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-12-21 04:14:24 +00:00
Michael Mann a2c2f872f4 Remove the use of pinfo->private_data from dissectors that just save it to 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-26 16:20:59 +00:00
Joe Fowler 392dae58db Add new dissector for Shared Memory Communications over RDMA protocol (SMC-R)
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-11-25 04:48:27 +00:00
Alexis La Goutte f62d60b082 Infiniband: fix warning: C++ style comments are not allowed in ISO C90
Change-Id: I706d6b7cf4c8d0367f485b55fa11a905bff426d1
Reviewed-on: https://code.wireshark.org/review/4957
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-10-28 01:26:05 +00:00
Tim (Thanh) Nguyen a9497befeb RoCE and CM dissector fixes
- 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-10-13 15:45:33 +00:00
Bill Meier 10406870f5 Add editor modelines; fix indentation as needed.
Change-Id: I1ad94654343e5a018a0b3159481d45ffb3a91263
Reviewed-on: https://code.wireshark.org/review/4363
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-09-29 13:47:02 +00:00
Wasim Abu Moch a886f8f740 packet-infiniband: added support for RoCE-v2 (RRocE)
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>
2014-09-22 02:57:46 +00:00
Evan Huus f0b4411783 Revert "packet-infiniband: added support for RoCE-v2 (RRocE)"
This reverts commit 07078921e4.

Change-Id: I5b88f0203558c86562694ca841d28314bff336a5
Reviewed-on: https://code.wireshark.org/review/4152
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-09-17 14:12:57 +00:00
Evan Huus 933ae8ea8b Add missing initializer
Change-Id: I60917502ef869bb519b37bb0252371dbc91a608d
Reviewed-on: https://code.wireshark.org/review/4146
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-09-17 13:36:57 +00:00