Commit Graph

79852 Commits

Author SHA1 Message Date
Guy Harris b09514f3b3 dumpcap: provide more information to put into an Npcap bug.
Turn the sequence of details to supply in an Npcap bug into a list, with
one element per line, and provide the interface name, Windows version
string, and Npcap version string.  Put that into a common routine.
2021-02-08 23:08:49 -08:00
Martin Haaß 40e5934444 first version of reassembly btatt
does trigger reassembly but never accumulates data
2021-02-09 05:01:18 +00:00
Guy Harris 9b771d2c14 dumpcap: use the display name in error messages.
That adds the description, if present, on UN*X, and replaces the ugly
GUID-based name with a friendly name on Windows.
2021-02-08 15:16:33 -08:00
Guy Harris 37f5e0f7fd dumpcap: give details on how to fix Npcap bugs.
Give a whole bunch of details to put into the bug, in the (vain?) hope
that the user will put them in the bug, to try to help Daniel and
possibly Microsoft networking stack folk figure out what's happening.

(Remove an extra report_capture_error() left over from the previous
commit.)
2021-02-08 13:10:54 -08:00
Guy Harris b3db9e3aa1 dumpcap: show the interface name in capture errors.
dumpcap can capture on more than one interface at a time.  If the
capture stops due to an error on an interface, report the name of the
interface on which the error occurred.
2021-02-08 12:35:43 -08:00
Alexis La Goutte 35d8055e0e ieee80211: fix HE Operation Channel width
use directly VALS on hf definition (no need to use val_to_str)
2021-02-08 21:09:08 +01:00
Alexis La Goutte a3bab17bc9 ieee80211: Add HE Operation 6Ghz 2021-02-08 21:09:08 +01:00
Jirka Novak 40c1929115 Refactored: Moved sample_bytes_ to rtp_media.h as SAMPLE_BYTES 2021-02-08 17:05:59 +00:00
Richard Sharpe 80aa82c039 ieee80211: Add support for Robust AV Streaming.
This adds support for handling SCS Descriptors and MSCS descriptors and add
more handling of TCLAS.

Change-Id: Ibe91a612c2dc8c325c3223633610b954ea2fda3d
2021-02-08 16:46:00 +00:00
Martin Kaiser cd9d4d38c4 wsp: create and populate the stats table only once
Use the new stat_tap_find_table function during init to check if our
statistics table already exists.

If so, we can safely assume that its rows have already beend initialized.
All we have to do is clear the data that was collected by the tap.
2021-02-08 16:26:57 +00:00
Martin Kaiser 0239c495dd mtp3: populate stats table rows only once
If the init function is called and the statistics table already exists, it's
sufficient to clear the data that was collected when the tap parsed the
packets.

Fixes: a5207b541e ("mtp3: create the statistics table only once")
2021-02-08 15:24:52 +00:00
Joakim Karlsson 965451f10e dot11decrypt: fix build with older GCC
dot11decrypt.c:1775:27: error: ‘ptk_len’ may be used uninitialized in
this function [-Werror=maybe-uninitialized]
         sa->wpa.ptk_len = (INT)ptk_len;
                           ^

Change-Id: I705007a8b351c333dc1c8cb1d455ea2f0976c964
2021-02-08 14:43:07 +00:00
Martin Mathieson 251092b005 Make more functions and vars static. 2021-02-08 13:05:27 +00:00
Alex Nik b35befb818 added description for ONC-RPC Programs 2021-02-08 10:28:00 +00:00
Paul Offord 69df23fc40 sharkd: Add configuration profile and other options
This change adds code to allow the selection of a configuration
profile during sharkd start by adding a -C command line option.
A new -a option has been added to specify the api service
endpoint e.g. tcp:127.0.0.1:4446

The change also adds version display (-v) and help display (-h) options.
These additions have been made in a way to ensure that the original
command line options still work correctly to maintain backward
compatibility.

The new options have been added using the getopt_long(...) function
that is used by tshark to simplify the addition of further command
line options.

Closes #17222
2021-02-08 10:27:18 +00:00
Stig Bjørlykke 37bef583da NAS: Put decoded user data in the top tree
Decoded user data as IP or Ethernet belongs in the top tree.
2021-02-08 09:45:49 +00:00
Amit Cohen 1684ff0b4a packet-netlink-net_dm: Fix timestamp handling
Commit f582c85623 ("netlink: use value retrieval with proper encoding")
changed the conversion of timestamp field and with it the field is
displayed incorrectly.

In the kernel the timestamp field is encoded in nanoseconds using 64 bits.
Change the code to the way it was written before which is compatible
with kernel coding.

Signed-off-by: Amit Cohen <amcohen@nvidia.com>
2021-02-08 09:28:59 +00:00
Guy Harris d28021cacb "The device has been removed." can happen if it has, indeed, been removed.
So only tell the user to report that as an Npcap bug if they *haven't*
removed the device.
2021-02-08 00:40:36 -08:00
Guy Harris 27cbb68525 dumpcap: look for "PacketReceivePacket error: .* (1617)".
The error message text for ERROR_DEVICE_REMOVED (1617) might be in the
user's language; just look for the numeric error code.
2021-02-07 22:51:44 -08:00
Alexis La Goutte c9174bb67d smc: display reserved bytes 2021-02-08 06:20:39 +00:00
Guy Harris 152fd1fdab dumpcap: improve some secondary error emssages.
For "PacketReceivePacket error: The device has been removed. (1617)",
report the error in that fashion, indicate that the interface is no
longer attached, *and* suggest that this may be an Npcap bug and that
the user should report it as such; give the URL for the Npcap issue
list.

For "The other host terminated the connection", report the error in that
fashion, and suggest that it might be a problem with the host on which
the capture is being done.

Hopefully this will mean fewer bugs filed as *Wireshark* bugs for those
issues.

(And, with any new capture API in libpcap, these should all turn into
specific PCAP_ERROR_ codes, to make it easier to detect them in callers
of libpcap.)
2021-02-07 19:12:44 -08:00
Martin Kaiser b12c82c102 wsp: (trivial) use consistent indentation
Use the indentation as defined in the editor modelines (expand TAB to 4
spaces) throughout the file.
2021-02-07 23:18:04 +00:00
Martin Kaiser 02e875b78f h225: create and populate the stats table only once
Use the new stat_tap_find_table function during init to check if our
statistics table already exists.

If so, we can safely assume that its rows have already beend initialized.
All we have to do is clear the data that was collected by the tap.
2021-02-07 23:02:43 +00:00
Martin Kaiser 72468248c7 gsm_map: create and populate the stats table only once
Use the new stat_tap_find_table function during init to check if our
statistics table already exists.

If so, we can safely assume that its rows have already beend initialized.
All we have to do is clear the data that was collected by the tap.
2021-02-07 22:46:43 +00:00
Martin Kaiser a198094599 ansi_map: create and populate the stats table only once
Use the new stat_tap_find_table function during init to check if our
statistics table already exists.

If so, we can safely assume that its rows have already beend initialized.
All we have to do is clear the data that was collected by the tap.
2021-02-07 22:30:21 +00:00
Martin Kaiser 04d887f2fd camel: create and populate the stats table only once
Use the new stat_tap_find_table function during init to check if our
statistics table already exists.

If so, we can safely assume that its rows have already beend initialized.
All we have to do is clear the data that was collected by the tap.
2021-02-07 22:13:17 +00:00
Martin Kaiser 881941e255 sip: populate stats tables' rows only once
Sip uses two different statistics tables. We check for each one if it
already exists. If so, we don't populate the rows again, we just clear
the data that was collected when the tap parsed the packets.

Fixes: b00c3bd742 ("sip: create the statistics tables only once")
2021-02-07 21:52:02 +00:00
Martin Kaiser dd1b76b4ad rpc: populate stats table rows only once
If the init function is called and the statistics table already exists, it's
sufficient to clear the data that was collected when the tap parsed the
packets.

Fixes: b49b95af65 ("rpc: create the statistics table only once")
2021-02-07 20:53:30 +00:00
Martin Kaiser 9337e1cd53 dhcp: populate stats table rows only once
If the init function is called and the statistics table already exists, it's
sufficient to clear the data that was collected when the tap parsed the
packets.

Fixes: f21f1c292a ("dhcp: create the statistics table only once")
2021-02-07 20:38:08 +00:00
Martin Kaiser 395af33e74 ansi_a: dtap stats: populate table rows only once
If the init function is called and the statistics table already exists, it's
sufficient to clear the data that was collected when the tap parsed the
packets.

Fix a typo in a comment while at it.

Fixes: 8963dff518 ("ansi_a: dtap statistics: create the table only once")
2021-02-07 19:24:38 +00:00
Martin Kaiser 67b4680bca ansi_a: bsmap stats: populate table rows only once
Commit f4ac70818a updated the init function to use stat_tap_find_table and
create the statistics table only when it doesn't already exist.

However, if the table does already exist, its rows are still populated
again. If the table rows contain data that is allocated dynamically by
g_malloc or g_strdup, populating the table again (without freeing its rows
before) causes a memory leak.

If the init function is called and the statistics table already exists, all
we have to do is clear the data that was gathered when the tap parsed the
packets. This is what the stat_tap_reset_table_cb function does.

Fixes: f4ac70818a ("stat_tap_table_ui: create tables only once during init")
2021-02-07 19:28:23 +01:00
Gerald Combs f93f7d80b3 [Automatic update for 2021-02-07]
Update manuf, services enterprise numbers, translations, and other items.
2021-02-07 14:32:00 +00:00
Guy Harris 85de5ed784 btsnoop: fix writing of btsnoop files.
In answer to the question "How do we support multiple backends?", this
is the answer - what they mean is "how do we support multiple
encapsulation types for the *same* file format", and the answer is "you
have one dump open routine that writes the appropriate encapsulation
type in the header, depending on the encapulation type, and you have one
dump write routine that generates the appropriate packet header and
writes out the packet, depending on the encapsulation type".

Fix the generation of the packet header when writing H1 and H4 packets,
and *don't* strip off the first octet of the packet data when writing H1
packets - that octet isn't generated when reading H1 packets, it's read
from the file.

Tested by running several H1 and H4 captures through "editcap -F
btsnoop" and making sure that the files are identical.
2021-02-07 09:58:39 +00:00
Alexis La Goutte 4569260b22 ieee80211: fix conflict
'wlan.s1g.twt_information.next_twt' exists multiple times with incompatible types: FT_UINT48 and FT_UINT32
 'wlan.s1g.twt_information.next_twt' exists multiple times with incompatible types: FT_UINT64 and FT_UINT48
2021-02-07 07:48:10 +00:00
Alexis La Goutte edd0396bb0 ieee80211: fix -Wmissing-prototypes warning 2021-02-07 07:48:10 +00:00
Alexis La Goutte 3a4def009e ieee80211: Add Known BSSID and Short SSID Extension Tag
from 802.11ax/D8
2021-02-07 07:48:10 +00:00
Alexis La Goutte 7306a1a5c6 ieee80211: Add Reason code (71) from 802.11ax/D8 2021-02-07 07:48:10 +00:00
Alexis La Goutte 4795dccac7 ieee80211: Add Band id 6Ghz
From 802.11ax/D8 (9.4.1.45)
2021-02-07 07:48:10 +00:00
Alexis La Goutte a660c80f79 ieee80211: Add Extended Capabilitilies from 802.11ax/D8
bit 83: Enhanced Multi-BSSID Advrtisement Support
bit 86: OCT
bit 89: TWT Parameters Range Support
2021-02-07 07:48:09 +00:00
Alexis La Goutte 1441d45000 ieee80211: Add Extension Tag: Mutiple BSSID Configuration
From 802.11ax/D8 (9.4.2.260)
2021-02-07 07:48:09 +00:00
Alexis La Goutte 1abc4d7f1a ieee80211: Update Extension Tag value_string
from 802.11ax/D8
2021-02-07 07:48:09 +00:00
Alexis La Goutte 57fd3157c5 ieee80211: display payload data and expert info when unknown Ext(ension) Tag 2021-02-07 07:48:09 +00:00
Alexis La Goutte a5483a99d7 ieee80211: not found tag num (or Extension Tag) are unknown
Not Reserved..
2021-02-07 07:48:09 +00:00
Alexis La Goutte be214d1166 ieee80211: fix length of extension tag 2021-02-07 07:48:09 +00:00
Alexis La Goutte 30744de9e3 per: remove len is not longer needed 2021-02-07 07:32:01 +00:00
Alexis La Goutte 316ecda0a7 per: remove extra parenthese 2021-02-07 07:32:01 +00:00
Alexis La Goutte d735f8b9ee smc: fix Dead Store found by Clang Analyzer
packet-smc.c:595:4: warning: Value stored to 'offset' is never read [deadcode.DeadStores]
packet-smc.c:664:4: warning: Value stored to 'offset' is never read [deadcode.DeadStores]
2021-02-07 07:32:00 +00:00
Alexis La Goutte 0ca129bdd2 per: fix Dead Store found by Clang Analyzer
packet-per.c:2702:5: warning: Although the value stored to 'len' is used in the enclosing expression, the value is never actually read from 'len'
2021-02-07 07:32:00 +00:00
Alexis La Goutte f715b01058 pdu-transport: Fix Dead store Found by Clang Analyzer
packet-pdu-transport.c:244:9: warning: Value stored to 'tmp' is never read
2021-02-07 07:32:00 +00:00
Alexis La Goutte 572774123f opa-mad: Fix Dead Store Found by Clang Analyzer
packet-opa-mad.c:2816:12: warning: Although the value stored to 'local_offset' is used in the enclosing expression, the value is never actually read from 'local_offset'
2021-02-07 07:32:00 +00:00