[PATCH] P2P: Add IFNAME=iface command option for interface redirection

Jouni Malinen j at w1.fi
Tue May 21 03:55:00 EDT 2013

On Mon, May 20, 2013 at 05:59:33PM -0700, Dmitry Shmidt wrote:
> I like idea to have global interface to control everything. However,
> it looks like it doesn't understand
> "usual" interface commands like:
> root at manta:/ # wpa_cli -g @android:wpa_wlan0
> Interactive mode
> > status
> > IFNAME=wlan0 status
> Unknown command 'IFNAME=wlan0'
> > p2p_find
> OK

wpa_supplicant does understand the command and the "status" failing is
by design since there is no way of figuring out which interface that
would apply to without the IFNAME prefix. I guess there could also be a
global STATUS command added to give systemwide (not specific to a
network interface information).

The middle one is a current limitation in wpa_cli, not in the
wpa_supplicant control interface. You can run that with "raw
IFNAME=wlan0 STATUS" from wpa_cli. I guess I should make wpa_cli
understand that IFNAME= prefix, too, so that this would not need to go
through the raw command. Anyway, this is all within wpa_cli.

> I understand that it was not your original design direction, but it
> will be easier for wifi manager to
> have one socket control and one socket monitor.

That was the original design direction for the global control interface
extensions, too, and it should work fine (and does in my tests). Please
let me know if you hit any issues that are not just because of wpa_cli
limitations on this. As far as I can tell, it should now be possible to
run every operation (both commands and events) through the global
interface now.

Jouni Malinen                                            PGP id EFC895FA

More information about the HostAP mailing list