[PATCH] wpa-cli: Support monitor mode without action file.

Jouni Malinen j at w1.fi
Tue Apr 17 15:04:11 PDT 2018


On Wed, Jun 14, 2017 at 11:29:22AM -0700, greearb at candelatech.com wrote:
> I wanted a way to start wpa_cli, have it do the keep-alive ping,
> and print events as they are received.  I do not want an action file,
> and I do not need interactive mode, and I want to run
> this in a way where stdin may not be open.
> 
> So, introduce '-m' monitor mode.
> 
> wpa_cli -m -g /var/run/wpa_supplicant_if_wiphy0

This and the related (I'd assume) "wpa_cli: Don't buffer stdout." patch
were left in my queue for more consideration and I did not really ever
find time to go through the details before now.. It looks like this is
used to enable wpa_cli to be used by some other program to receive
wpa_supplicant messages. That sounds quite complex compared to simply
using wpa_ctrl.c or wpaspy.py (or similar implementation of socket
communication in other programming languages). I'm not really convinced
that wpa_cli should have such mode and instead, I'd recommend
implementing direct wpa_supplicant socket access in whatever the program
is that would be using this no-buffering-stdout from wpa_cli.

-- 
Jouni Malinen                                            PGP id EFC895FA



More information about the Hostap mailing list