Commit Graph

7 Commits

Author SHA1 Message Date
Dr. Lars Völker dabf0af6b7 AUTOSAR NM: In default configuration all CAN packets will be dissected
The default value for the CAN-ID Mask is currently 0. If no config is
present, all comparisons would be always true. This leads to all CAN
packets are being dissected by this dissector by default.
This is a huge performance problem and surely not intended.

This patch sets the default of the CAN-ID Mask to 0xffffffff, so that
in the unconfigured case, only the CAN-ID 0 would be dissected.
2021-03-13 08:00:30 +00:00
Dr. Lars Völker 4d515f70af AUTOSAR-NM: Adding support for PDU ranges and clean up
This patch:
- adds support for PDU ranges instead of one single PDUs
- simplifies the dissection code for CAN messages
- cleans up some some comments
2021-01-14 18:36:49 +00:00
Dr. Lars Völker 238446dc91 AUTOSAR-NM: True-False-String wrong way around for PNI (BUGFIX)
This patch fixes the PNI TFString, which was wrong. Correct is:
0 = "... contains no Partial Network ..."
1 = "... contains Partial Network ..."

Fixes #17154
2021-01-14 13:18:12 +00:00
Dr. Lars Völker e8ebebe860 Adding dissector for PDU-Transport
This patch adds a new dissector for PDU-Transport. This is a very
simple protocol to transport CAN, FlexRay, LIN, and other PDUs.
It is typically used to transport legacy messages/PDUs over Ethernet.
The format is compatible to FDN and AUTOSAR.

Enabled AUTOSAR NM on top of the PDU Transport and fixed a few bugs
in AUTOSAR NM as well (length parsing).

Solves #17095
2020-12-24 06:05:27 +00:00
Guy Harris e1d9a226a2 Fix the type of arrays of pointers to hf_ values for bitfield routines.
The static arrays are supposed to be arrays of const pointers to int,
not arrays of non-const pointers to const int.

Fixing that means some bugs (scribbling on what's *supposed* to be a
const array) will be caught (see packet-ieee80211-radiotap.c for
examples, the first of which inspired this change and the second of
which was discovered while testing compiles with this change), and
removes the need for some annoying casts.

Also make some of those arrays static while we're at it.

Update documentation and dissector-generator tools.

Change-Id: I789da5fc60aadc15797cefecfd9a9fbe9a130ccc
Reviewed-on: https://code.wireshark.org/review/37517
Petri-Dish: Guy Harris <gharris@sonic.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-06-19 11:32:26 +00:00
Stefan Tatschner 40eece98f8 Change struct can_identifier to can_info
The can specific data structure `struct can_identifier` is used as
supplementary data for higher level dissectors. This patch adds more
data to this struct and renames it accordingly to `struct can_info`.

More supplementary data is needed in order to dissect iso15765
correctly, since the header format depends on details on the underlying
CAN protocol (CAN 2.0B vs CAN-FD).

Change-Id: Id068cf38453f98b67a5ec470a22e7013548c5a14
Reviewed-on: https://code.wireshark.org/review/35246
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-11-28 18:27:16 +00:00
Maksim Salau 7f49d0d1bb udp-nm: Extend and rename to autosar-nm
The UDP-NM dissector is actually AUTOSAR-NM and works over UDP and CAN.

The change also adds parsing of reserved bits of control bit vector and
the 'NM Coordinator Id' field which was present in revision 3.2 but now
is deprecated (bits are marked as reserved).

Since not every packet on a CAN bus is an Network Management one,
parameters were added to filter only packets with specific ids.
In order to define ids to be dissected one should define a reference id
and a mask in preferences.

Change-Id: Ica69032b7200c4c3a1f81130ebcea0dd4144cbf2
Reviewed-on: https://code.wireshark.org/review/31560
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-01-17 08:11:22 +00:00