Commit Graph

327 Commits

Author SHA1 Message Date
Peter Wu 5c4458345c Change maxmind_db_lookup_ipv4 to look more like maxmind_db_lookup_ipv6
Both functions accept an address in network byte order, but
maxmind_db_lookup_ipv4 does not accept a pointer. Add an indirection and
remove unnecessary memcpy calls. This removes some confusion for me.

Change-Id: I291c54c8c55bc8048ca011b84918c8a5d3ed1398
Reviewed-on: https://code.wireshark.org/review/31951
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-02-11 05:13:37 +00:00
Guy Harris 2d41b15495 Add a "failed" return for tap packet routines.
This allows taps that can fail to report an error and fail; a failed
tap's packet routine won't be called again, so they don't have to keep
track of whether they've failed themselves.

We make the return value from the packet routine an enum.

Don't have a separate type for the per-packet routine for "follow" taps;
they're expected to act like tap packet routines, so just use the type
for tap packet routines.

One tap packet routine returned -1; that's not a valid return value, and
wasn't one before this change (the return value was a boolean), so
presume the intent was "don't redraw".

Another tap routine's early return, without doing any work, returned
TRUE; this is presumably an error (no work done, no need to redraw), so
presumably it should be "don't redraw".

Clean up some white space while we're at it.

Change-Id: Ia7d2b717b2cace4b13c2b886e699aa4d79cc82c8
Reviewed-on: https://code.wireshark.org/review/31283
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-01-01 05:03:42 +00:00
Nardi Ivan 5feb326312 ip, tcp: add expert info for invalid header length
Change-Id: I58c1b20304aabcff144667cfbbcc774010fc2a16
Reviewed-on: https://code.wireshark.org/review/31148
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-12-21 06:31:12 +00:00
Guy Harris 8beab04229 Fix expert info message for wrong option length.
Bug: 15290
Change-Id: Id5b4f6a899fea542f5d50e8be991d7cca623fd46
Reviewed-on: https://code.wireshark.org/review/30744
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-11-20 18:27:17 +00:00
Christoph Portner 1539e455d7 MPLS: add dissector for Management Communication Channel
Management communication channel described in RFC 5718

Change-Id: I5ed95d0d6f25754c50a97457679d08b99db6f527
Reviewed-on: https://code.wireshark.org/review/29920
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-09-30 19:24:54 +00:00
João Valverde 3b17e66b78 Revert "IP: Use pinfo for session IP addresses"
This reverts commit bb25d64a2a.

Change-Id: I8b790ee8371a7257696a21fe99ed483c892b8baf
Reviewed-on: https://code.wireshark.org/review/29251
Reviewed-by: João Valverde <j@v6e.pt>
2018-08-22 18:10:22 +00:00
João Valverde bb25d64a2a IP: Use pinfo for session IP addresses
The pinfo structure is sufficent for providing the src/dst address.
The pinfo address data is strictly the same as the tap data, even for
IP over IP.

Besides the trivial code simplification we prioritize the use of pinfo
over a tap, for increased type-safety and on the presumption of having
a more stable implementation (in the mutability sense).

Change-Id: Idcfc8c762f9af934e4612522b7472b35a01042ca
Reviewed-on: https://code.wireshark.org/review/29238
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-08-22 05:01:43 +00:00
Guy Harris 1834cda2ee The maximum offset in an IP option dissector is the length of the option.
It's *not* the sum of the length of the option and the length of the
option header.

Change-Id: I0b5ab0e35ca33dc02a0bc2501e0f0f531ec3f376
Reviewed-on: https://code.wireshark.org/review/28701
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-07-14 21:44:34 +00:00
Gerald Combs bbe5fc1028 Epan+Qt: Invalidate cached column strings.
Add col_data_changed, which checks to see if we have updated column
info. Add col_append_frame_number, which adds a frame number and sets
col_data_changed. Call col_append_frame_number instead of
col_append_fstr from some dissectors.

Add PacketListRecord::invalidateAllRecords, which invalidates any cached
record data. Add PacketListModel::invalidateAllColumnStrings which calls
invalidateAllRecords and signals that our data has changed. Call
invalidateAllColumnStrings when we have new name resolution or column
information.

Bug: 11414
Bug: 11468
Change-Id: I2671594a722f4f9436fe1df84d43489a148e0cee
Reviewed-on: https://code.wireshark.org/review/26373
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2018-03-15 12:19:23 +00:00
Gerald Combs 6a819d9950 MaxMindDB: Add country ISO codes.
Add and dissect country ISO codes. Prefer them when printing summary
information.

Change-Id: I3ce2bde88fa5ca2604c8bb745c42f239660252ff
Reviewed-on: https://code.wireshark.org/review/26415
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-03-10 19:21:42 +00:00
Gerald Combs a1da75c554 Transition from GeoIP Legacy to MaxMindDB.
MaxMind is discontinuing its legacy databases in April in favor of
GeoIP2, which use a newer database format (MaxMind DB). The reference C
library (libmaxminddb) is available under the Apache 2.0 license which
isn't quite compatible with ours.

Add mmdbresolve, a utility that reads IPv4 and IPv6 addresses on stdin
and prints resolved information on stdout. Place it under a liberal
license (MIT) so that we can keep libmaxminddb at arm's length. Add
epan/maxmind_db.[ch], which spawns mmdbresolve and communicates with it
via stdio.

Migrate the preferences and documentation to MaxMindDB.

Change the IPv4 and IPv6 asnum fields to FT_UINT32s. Change the
geographic coordinate fields to FT_DOUBLEs.

Bug: 10658
Change-Id: I24aeed637bea1b41d173270bda413af230f4425f
Reviewed-on: https://code.wireshark.org/review/26214
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-03-06 18:02:21 +00:00
Dario Lombardo fe219637a6 dissectors: use SPDX identifiers.
Change-Id: I92c94448e6641716d03158a5f332c8b53709423a
Reviewed-on: https://code.wireshark.org/review/25756
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-12 16:49:58 +00:00
Kenneth Soerensen b3394a76ab ZigBee: Enable heuristic dissection of Tunneling cluster payload
The Smart Energy Tunneling cluster can carry various payloads.
The type of payload is determined when the tunnel is established.
However, we cannot be sure to capture the tunnel establishment and
therefore heuristics are used to determine the payload type.

The IP protocol is added as a heuristic dissector because the
specification allows IP in the tunnel payload. However, the only
real life payload type I am aware of is GBCS messages in
UK Smart Metering (https://smartenergycodecompany.co.uk).

Finally, if a heuristic dissector cannot be found, the Data
dissector is used.

Change-Id: I4942bf00d0d0efe7047db6494cd4f8a9d19c96b6
Reviewed-on: https://code.wireshark.org/review/25181
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Martin Boye Petersen <martinboyepetersen@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-01-07 16:08:01 +00:00
Guy Harris 39ba9d4e7f Add wsutil/inet_ipv4.h.
It defines a ws_in4_addr type, which is intended to hold IPv4 addresses
in network byte order, and some macros to test for IPv4 addresses in the
local network control block and multicast IPv4 addresses.

Use those macros in places where dissectors had their own code for that
purpose.

Change-Id: I4252b410e37207157be85119a332e2a6913b332f
Reviewed-on: https://code.wireshark.org/review/24178
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-10-30 02:11:22 +00:00
Michael Mann 63966ec5d5 Use endpoint_type in conversation tables and hostlists
Follow up to having conversions use endpoint_type instead of
port_type.

Change-Id: Ifd59a33bd8b9a013c242bce5fcceb09533f02c17
Reviewed-on: https://code.wireshark.org/review/24172
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-10-29 20:17:03 +00:00
João Valverde 692b1175e4 Have a single IPv6 tap
Optimize code and open possibility for enriching IPv6 tap data.

Change-Id: I5a204d7464cde32123d5bfe664cc9b6bcf08dbe1
Reviewed-on: https://code.wireshark.org/review/23340
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
2017-09-02 16:06:42 +00:00
João Valverde f16f6a3ef2 Avoid use of global protocol variables
Change-Id: I006d872a83649e72a6c83abac68cbae064457162
Reviewed-on: https://code.wireshark.org/review/23346
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-09-01 03:29:39 +00:00
Michael Mann ff1bdfa0bc Verify IP checksum even if in ICMP error packet
Bug: 10579
Change-Id: I18cac02f81465598451e0cf8f6729a26faf8c176
Reviewed-on: https://code.wireshark.org/review/22849
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-07-30 01:09:43 +00:00
Michael Mann e3b46bc48a Fix IP Security option dissection
"offset" no longer needed (since using dissector table for options),
and since it should always be 0, just remove it.

Change-Id: Icc2802b76bc99a17d60d1deff75e1dc65761e8ed
Reviewed-on: https://code.wireshark.org/review/22848
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-07-30 00:32:56 +00:00
Arjen Zonneveld 168065dad7 Add initial RFC2780 IP Version lookup support
Add support for https://www.iana.org/assignments/version-numbers/version-numbers.xhtml IP Version lookups.

Change-Id: I58a330ab9acba17356344df3ffeb94cc1b2b1443
Reviewed-on: https://code.wireshark.org/review/22821
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-07-29 14:11:10 +00:00
AndersBroman 558fe23226 [IP] Simplify paring of flags field by using
proto_tree_add_bitmask_with_flags().

Change-Id: If8e9f9956543f253f4f59d8204c9536f444dbcd5
Reviewed-on: https://code.wireshark.org/review/22728
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-07-20 15:40:56 +00:00
Gerald Combs b370c02a02 TCP: Make the header length display consistent with IPv4.
Format tcp.hdr_len in the tree similar to ip.hdr_len. Add comments
noting that they should be consistent.

Change-Id: Ic64282d8386c8ed339811bc9c22b5962c707d292
Reviewed-on: https://code.wireshark.org/review/22314
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-06-22 02:42:30 +00:00
Pascal Quantin e6883c15ac IP: ensure that fragment contains payload before adding it for reassembly
Solves a UBSan runtime error null pointer passed as argument 1, which is
declared to never be null.
It can be reproduced with the pcap from bug 13603

Change-Id: I0d6fdddcccc892b3141855d59be372887afcaca5
Reviewed-on: https://code.wireshark.org/review/22272
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-06-20 20:17:48 +00:00
Michael Mann 2273cf0e7b packet-nsh.c: Create dissector table for next protocol
Change-Id: Id8be2a37f99f4ac9d531a694273c7d5d3f843cc1
Reviewed-on: https://code.wireshark.org/review/21163
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2017-04-17 20:22:45 +00:00
Michael Mann 26512328ae Make IP options into a dissector table.
This provides external access for dissectors and plugins to provide their
own implementation of IP options.

Change-Id: I40ce17ce408217769e3b86e364f372a5181888e1
Reviewed-on: https://code.wireshark.org/review/20163
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-02-23 03:34:30 +00:00
Michael Mann af54b292e6 Register reassembly tables
Register all reassembly tables with a central unit, allowing the
central unit to have the callback that initializes and destroys
the reassembly tables, rather than have dissectors do it individually.

Change-Id: Ic92619c06fb5ba6f1c3012f613cae14982e101d4
Reviewed-on: https://code.wireshark.org/review/19834
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-29 13:29:04 +00:00
Michael Mann f4b0abc729 Dissectors don't need a journey of self discovery.
They already know who they are when they register themselves.  Saving the
handle then to avoid finding it later.
Not sure if this will increase unnecessary register_dissector functions
(instead of using create_dissector_handle in proto_reg_handoff function)
when other dissectors copy/paste, but it should make startup time
a few microseconds better.

Change-Id: I3839be791b32b84887ac51a6a65fb5733e9f1f43
Reviewed-on: https://code.wireshark.org/review/19481
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>
2016-12-31 07:31:42 +00:00
Michael Mann b7f4e25059 Adjust proto_tree_add_uint_format_value calls to use unit string
Several calls to proto_tree_add_uint_format_value could be better served
using BASE_UNIT_STRING with a "unit string" in hf_ field.  There also
a few cases where proto_tree_add_uint_format_value could just be
proto_tree_add_uint.

Added a few more "common" unit string values to unit_strings.[ch]

Change-Id: Iaedff82c515269c9c31ab9100dff19f5563c932d
Reviewed-on: https://code.wireshark.org/review/19242
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-12-13 22:56:50 +00:00
Alexis La Goutte 40b98600bd fix no previous prototype for ‘capture_*’ [-Wmissing-prototypes]
Change-Id: Ie5bfe4d366a679ebcb561716f23d174e7b9bf487
Reviewed-on: https://code.wireshark.org/review/18754
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>
2016-11-12 19:51:54 +00:00
Jaap Keuter d7e874c5d0 PW_ACH: Use proper symbolic names
Collect all used PW Associated Channel Types and use them in the
subdissector table registrations.

Change-Id: I5d196bceefdb4560b1f4388ff86898e316e5e2ae
Reviewed-on: https://code.wireshark.org/review/18590
Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-10-31 11:38:55 +00:00
João Valverde d47551982b Implement registration of capture dissectors by name
Mirror it after protocol dissector API.

Change-Id: I7985bcfa9e07654c7cf005efec94efc205d7a304
Reviewed-on: https://code.wireshark.org/review/18496
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-10-28 17:39:04 +00:00
Jaap Keuter 1d35c7f096 IP: Fix evil flag expert item text
When creating the expert info item definition the copied line wasn't
updated with the correct message text. This change sets the right text.

Change-Id: I9a98126c0b8a650e5ab195f97c53bb32e3053e89
Reviewed-on: https://code.wireshark.org/review/18301
Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
2016-10-19 10:18:18 +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
Guy Harris a4c8ebc18b Don't do any Decode As stuff for dissector tables not used with Decode As.
Have all dissector tables have a "supports Decode As" flag, which
defaults to FALSE, and which is set to TRUE if a register_decode_as()
refers to it.

When adding a dissector to a dissector table with a given key, only add
it for Decode As if the dissector table supports it.

For non-FT_STRING dissector tables, always check for multiple entries
for the same protocol with different dissectors, and report an error if
we found them.

This means there's no need for the creator of a dissector table to
specify whether duplicates of that sort should be allowed - we always do
the check when registering something for "Decode As" (in a non-FT_STRING
dissector table), and just don't bother registering anything for "Decode
As" if the dissector table doesn't support "Decode As", so there's no
check done for those dissector tables.

Change-Id: I4a1fdea3bddc2af27a65cfbca23edc99b26c0eed
Reviewed-on: https://code.wireshark.org/review/17402
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-08-31 00:08:01 +00:00
Guy Harris 00961a0df2 Pass the next protocol value to ip_try_dissect() as an argument.
That way, we don't rely on the ws_ip pointer being non-null.

Based on changes from Ib73410fd8575ad6c836311bbda87a0580e5640ac.

Change-Id: If8c437572c725481ac4148c8095a1a479b4fb0f8
Reviewed-on: https://code.wireshark.org/review/16617
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-07-24 08:05:57 +00:00
João Valverde 904d9fc2c3 Update struct ws_ip with flow label and comments
Change field ip_v_hl to version.

Change-Id: Ic7ce8d6d083f6413284a7b9ba91a2387b11b29fb
Reviewed-on: https://code.wireshark.org/review/16555
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
2016-07-23 03:46:58 +00:00
João Valverde c11cdd6493 Use wmem_new0() to allocate struct ws_ip
Change-Id: I0e76ffc2dc0c3e3d7bd081ff433c95741b9aa906
Reviewed-on: https://code.wireshark.org/review/16598
Reviewed-by: João Valverde <j@v6e.pt>
2016-07-23 03:46:40 +00:00
Michael Mann ad6fc87d64 Add proto_tree_add_checksum.
This is an attempt to standardize display/handling of checksum fields for all dissectors.
The main target is for dissectors that do validation, but dissectors that just report the
checksum were also included just to make them easier to find in the future.

Bug: 10620
Bug: 12058
Ping-Bug: 8859
Change-Id: Ia8abd86e42eaf8ed50de6b173409e914b17993bf
Reviewed-on: https://code.wireshark.org/review/16380
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-07-21 12:35:22 +00:00
Pascal Quantin d75de9f755 VXLAN: use the newly created vxlan.next_proto dissector table everywhere
Change-Id: Ib6f44e0f1d3d8c76d2b6e6c778af8c243af4389c
Reviewed-on: https://code.wireshark.org/review/16543
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-07-19 11:46:59 +00:00
João Valverde 4b8cb97ab4 Rename iph->ip_p to iph->ip_nxt
struct ws_ip is IP version agnostic. "ip_p" is too terse and less
appropriate.

Change-Id: I06b8740ab420e20781bf7b9efcf5dce19ad22ab2
Reviewed-on: https://code.wireshark.org/review/16519
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: João Valverde <j@v6e.pt>
2016-07-18 01:33:32 +00:00
João Valverde 9ba9a05ef0 Display "IP DSCP" column as short text
Ping-Bug: 12429
Change-Id: I618b2017e161d89f0efa25ce2fb82a1808e8d315
Reviewed-on: https://code.wireshark.org/review/10701
Reviewed-by: João Valverde <j@v6e.pt>
2016-06-15 17:34:34 +00:00
Pascal Quantin f29d1da0fb IPv4: use calculated value for Header Length display filter
Bug: 12387
Change-Id: I63370ea884b6fb75a0743fecc06af2e213700645
Reviewed-on: https://code.wireshark.org/review/15163
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: João Valverde <j@v6e.pt>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-04-30 07:22:16 +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 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
AndersBroman 780a703c5f [IPv4] In case of a bougus IPv4 version continnue dissection as IPv6 if
the version indicates IPv6.
This handles a case of Linux cooked capture with ethertype set as IPv4 for
IPv6 packets.

Change-Id: Ie79f1a631980a224a7b51963f9174e75ffb69a47
Reviewed-on: https://code.wireshark.org/review/14321
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-03-03 12:48:20 +00:00
Stig Bjørlykke 8e5272a969 IP: Don't check length if in a ICMP error packet
Change-Id: I5fd81aec13655b9c53df9f0002441c3afc51c6e9
Reviewed-on: https://code.wireshark.org/review/13597
Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl>
Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Tested-by: Jaap Keuter <jaap.keuter@xs4all.nl>
2016-02-01 16:38:21 +00:00
Guy Harris 099698445b Move the proto data stuff out of frame_data.[ch].
It's not tied to the frame_data structure any more, so it belongs by
itself.

Clean up some #includes while we're at it; in particular, frame_data.h
doesn't use anything related to tvbuffs, so don't have it gratuitiously
include tvbuff.h.

Change-Id: Ic32922d4a3840bac47007c5d4c546b8842245e0c
Reviewed-on: https://code.wireshark.org/review/13518
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-25 02:24:34 +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 9141bd9700 Add more fields to packet_info structure and use them.
Add fields for the absolute time stamp (and another field for a presence
flag for the absolute time stamp) and the packet encapsulation for the
packet.

This lets us remove the field for the packet encapsulation in the
frame_data structure; do so.

Change-Id: Ifb910a9a192414e2a53086f3f7b97f39ed36aa39
Reviewed-on: https://code.wireshark.org/review/13499
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-23 03:50:58 +00:00
AndersBroman 40951bf32e [IP] IP fragment reassembly gets thrown off if there is the same packets
with different VLAN Ids in the trace in some cases.
Add VLAN Id to the ID used to identify fragments.
As discussed in https://code.wireshark.org/review/#/c/13452/ this may not
be a complete solution but fixes the emediate problem.

Change-Id: Id418304268d2bf4d0af863de11c4db02dc0854db
Reviewed-on: https://code.wireshark.org/review/13470
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-01-21 14:40:25 +00:00