eiwd

no dbus iwd with iwctl functionality
git clone https://git.daat.foo/repos/eiwd.git
Log | Files | Refs | Submodules | README | LICENSE

commit ad51250835d7c4962d5953cb898ee97cb5cf9037
parent 5ebcc48814464b61414a74253fcf912ee33d47a3
Author: James Prestwood <prestwoj@gmail.com>
Date:   Wed, 26 Oct 2022 13:45:58 -0700

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.

Diffstat:
Mmonitor/main.c | 1+
Mmonitor/nlmon.c | 4+++-
Mmonitor/nlmon.h | 1+
3 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/monitor/main.c b/monitor/main.c @@ -710,6 +710,7 @@ int main(int argc, char *argv[]) switch (opt) { case 'r': reader_path = optarg; + config.read_only = true; break; case 'w': writer_path = optarg; diff --git a/monitor/nlmon.c b/monitor/nlmon.c @@ -104,6 +104,7 @@ struct nlmon { bool nowiphy; bool noscan; bool noies; + bool read; }; struct nlmon_req { @@ -7202,7 +7203,7 @@ static void nlmon_message(struct nlmon *nlmon, const struct timeval *tv, return; } - if (nlmsg->nlmsg_type != nlmon->id) { + if (!nlmon->read && nlmsg->nlmsg_type != nlmon->id) { if (nlmsg->nlmsg_type == GENL_ID_CTRL) store_message(nlmon, tv, nlmsg); return; @@ -7265,6 +7266,7 @@ struct nlmon *nlmon_create(uint16_t id, const struct nlmon_config *config) nlmon->nowiphy = config->nowiphy; nlmon->noscan = config->noscan; nlmon->noies = config->noies; + nlmon->read = config->read_only; return nlmon; } diff --git a/monitor/nlmon.h b/monitor/nlmon.h @@ -30,6 +30,7 @@ struct nlmon_config { bool nowiphy; bool noscan; bool noies; + bool read_only; }; struct nlmon *nlmon_open(const char *ifname, uint16_t id, const char *pathname,