Commit Graph

9 Commits

Author SHA1 Message Date
João Valverde e67ce21f81 Netlink nl80211: Convert to normal proto tree API 2021-12-11 16:32:33 +00:00
João Valverde d2a9cb940a epan: Remove new proto tree API
Remove experimental new API.

Fix Netlink dissector to compile with normal proto tree API.

Closes #17774.
2021-12-10 14:37:01 +00:00
Gerald Combs 30c392f166 Tools+test: Call python3 explicitly.
PEP 394[1] says,

"In cases where the script is expected to be executed outside virtual
 environments, developers will need to be aware of the following
 discrepancies across platforms and installation methods:

  * Older Linux distributions will provide a python command that refers
    to Python 2, and will likely not provide a python2 command.

  * Some newer Linux distributions will provide a python command that
    refers to Python 3.

  * Some Linux distributions will not provide a python command at all by
    default, but will provide a python3 command by default."

Debian has forced the issue by choosing the third option[2]:

"NOTE: Debian testing (bullseye) has removed the "python" package and
 the '/usr/bin/python' symlink due to the deprecation of Python 2."

Switch our shebang from "#!/usr/bin/env python" to "#!/usr/bin/env
python3" in some places. Remove some 2/3 version checks if we know we're
running under Python 3. Remove the "coding: utf-8" in a bunch of places
since that's the default in Python 3.

[1]https://www.python.org/dev/peps/pep-0394/#for-python-script-publishers
[2]https://wiki.debian.org/Python
2020-11-05 06:46:35 +00:00
Mikael Kanstrup 97ade16979 nl80211: Fix abbreviated field names for NAN
Python's lstrip apparently doesn't strip a prefix but instead strips
all supplied characters from beginning of a string. Using lstrip
in generate-nl80211-fields.py script to remove the 'nl80211_' prefix
happened to work for everything but a few NAN related enums.
Introduce a remove_prefix function and regenerate the nl80211
dissector code to fix the abbreviated field names for NAN.
2020-08-28 13:07:13 +02:00
Jaap Keuter fe9ee2c9b9 netlink: update 802.11 related netlink messages Linux kernel v5.4
Taking the Linux kernel v5.4 uapi/linux/nl80211.h file:
- Sort the enums in the generation script according to the header file
  to make incremental maintenance easier.
- Add listing of all additional enums found in the header file.
- Update the generated netlink dissector code for 802.11.

Change-Id: I9d2dc09d58d8f252d4746e662e4133d47a7525c5
Reviewed-on: https://code.wireshark.org/review/35570
Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2019-12-28 14:00:04 +00:00
Peter Wu 1d9aff7740 nl80211: update fields to Linux v4.20-rc4
Fix `tools/generate-nl80211-fields.py --update` to match the output from
v2.9.0rc0-1896-g43134ae252 ("netlink-*: fix various VALS/TFS misuse").
Update to match nl80211.h from Linux v4.19-rc6-1865-g0d4e14a32dca.

Change-Id: I101146867a62f2f881752c42229a218c12d6dda7
Reviewed-on: https://code.wireshark.org/review/30794
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-11-27 04:34:19 +00:00
Mikael Kanstrup 5442b51267 nl80211: Dissect further attributes
Add code to dissect:
- Top level nested attributes
- Top level nested array attributes
- Top level attributes with enum fields
- nl80211_band_attr sub attribute
- nl80211_bss sub attribute
- nl80211_sta_info sub attribute
- Attributes containing 802.11 information elements

Also update tools/generate-nl80211-fields.py to generate further
code blocks.

NOTE: This commit will not build alone as it does not contain the
generated definitions needed.

Depends-On: Ibd8c296c4a3d2f880f359f075271b89625367898
Change-Id: I23b87f41c6230d3fc1eb0f6b050b0d5209a9dd5c
Reviewed-on: https://code.wireshark.org/review/29317
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-09-03 07:17:10 +00:00
Dario Lombardo 8a5385b9c9 More licenses converted to SPDX.
Change-Id: Id4f987dcdacf06622d70263f4659a4400e30dc39
Reviewed-on: https://code.wireshark.org/review/26332
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-03-07 13:35:49 +00:00
Peter Wu 190350d732 Initial support for Linux 802.11 Netlink (nl80211) dissection
Only commands and top-level attributes are recognized, no specialization
is done (yet?) since it is a large protocol.

Fields are extracted from Linux v4.10-rc4-749-g8585989d146c using the
"tools/generate-nl80211-fields.py --update" command.
Depends on the Generic Netlink (genl) dissector.

Change-Id: I7f81b91e3beacca8ebcb853137212406004f65e8
Ping-Bug: 13561
Reviewed-on: https://code.wireshark.org/review/20914
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-04-17 02:10:45 +00:00