3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-02 16:39:25 +01:00
Commit Graph

17 Commits

Author SHA1 Message Date
Denis Kenzior
cfb468e44d monitor: Move iwmon reading logic into main.c
To support multiple nlmon sources, move the logic that reads from iwmon
device into main.c instead of nlmon.  nlmon.c now becomes agnostic of
how the packets are actually obtained.  Packets are fed in via
high-level APIs such as nlmon_print_rtnl, nlmon_print_genl,
nlmon_print_pae.
2024-01-02 10:59:38 -06:00
James Prestwood
ad51250835 monitor: allow parsing pcaps without -F option
The -F option is undocumented but allows you to pass a nl80211
family ID so iwmon doesn't ignore messages which don't match the
systems nl80211 family ID (i.e. pcaps from other systems).

This is somewhat of a pain to use since its unclear what the other
system's family ID actually is until you run it though something
like wireshark. Instead iwmon can ignore the family ID when in
read mode which makes reading other systems pcap files automatic.
2022-10-26 16:48:21 -05:00
James Prestwood
5ebcc48814 monitor: pass config to nlmon_create
Expand nlmon_create to be useful for both pcaps and monitoring. Doing
this also lets iwmon filter pcaps based on --no-ies,rtnl,scan etc
flags since they are part of the config.
2022-10-26 16:47:46 -05:00
James Prestwood
72d35fc491 monitor: use int64_t type for NLMSG_NEXT length
Commit c7640f8346 was meant to fix a sign compare warning
in clang because NLMSG_NEXT internally compares the length
with nlmsghdr->nlmsg_len which is a u32. The problem is the
NLMSG_NEXT can underflow an unsigned value, hence why it
expects an int type to be passed in.

To work around this we can instead pass a larger sized
int64_t which the compiler allows since it can upgrade the
unsigned nlmsghdr->nlmsg_len. There is no underflow risk
with an int64_t either because the buffer used is much
smaller than what can fit in an int64_t.

Fixes: c7640f8346 ("monitor: fix integer comparison error (clang)")
2022-10-14 09:49:13 -05:00
Denis Kenzior
83e1265c6b monitor: Add --noies option
To help understand scanning results a bit better and cut down on scan
output add an option to not print the contents of the IEs.  Only the
SSID IE will be printed.
2021-02-02 12:04:53 -06:00
Marcel Holtmann
152b56a12a treewide: Move the Intel copyright forward to 2019 2019-10-25 00:43:08 +02:00
James Prestwood
5c5bfbb423 monitor: added scan/wiphy flags
Specifying --noscan will filter out any scan related packets
Specifying --nowiphy will filter out any "new wiphy" packets
2018-05-15 19:42:46 -05:00
Denis Kenzior
d6a9b0f85a monitor: Add option to not print rtnl output 2016-07-13 10:14:28 -05:00
Marcel Holtmann
9fa506c237 monitor: Add option to provide nl80211 family identifier 2014-08-16 00:00:10 +02:00
Marcel Holtmann
d3f37628b0 monitor: Add support for writing combined PCAP trace files 2014-08-12 19:35:59 -07:00
Marcel Holtmann
a2a59e78fa monitor: Extract PAE port traffic out of PCAP files and decode it 2014-08-10 18:32:11 -07:00
Marcel Holtmann
4a5f30bbc2 monitor: Listing to Ethernet packets on PAE port and display them 2014-08-10 14:57:28 -07:00
Marcel Holtmann
b4eb544355 monitor: Handle timestamp and real packet length information 2014-08-10 12:45:56 -07:00
Marcel Holtmann
7a1bb1e953 monitor: Improve message and attribute display handling 2014-08-09 22:59:42 -07:00
Marcel Holtmann
ce202ac843 monitor: Add helper functions for parsing-only netlink monitor 2014-08-05 22:37:31 +02:00
Marcel Holtmann
e260854da3 monitor: Add command line option for netlink monitor device 2014-08-05 21:39:54 +02:00
Marcel Holtmann
db60e4d48f monitor: Add initial version of iwmon utitlity 2014-08-03 06:03:53 +02:00