[PATCH 2/7] p2p: Add a utility function to retrieve local GO device address

Jouni Malinen j
Sat May 31 08:59:42 PDT 2014

On Tue, May 27, 2014 at 01:32:32PM +0300, Tomasz Bursztyka wrote:
> Basically, what I want is in DBus API part to retrieve all group the
> peer is part of (as a client or a GO)
> for that I need the wpa_s the group is related to to be able to
> provide the object path of the group then.

Please note that wpa_supplicant does not track this type of information
now, so no matter what you'll do with the D-Bus interface, it is
unlikely to be able to give you this information reliably..

It is easy to find any specific peer from the groups where the local
device is the GO (though, there can be more than one matching group even
though that would be pretty unlikely in real world use cases).

For the groups where the local device is a P2P Client, there is no
existing data structure that would store reliably a list of all group
members. Getting an up to date list available would require sending a
Probe Request frame to the GO and then fetch the list from the Probe
Response frame. This is the part that is missing both in the sense of
that extra scan being triggered and that the results would be used to
generate a data structure with that information. If you want to make the
D-Bus interface work properly, the patch set would likely need to add
this new dynamic group data structure for groups where the local device
is a P2P Client and also some code to either trigger automatically
within wpa_supplicant or maybe more likely trigger by an external entity
a new scan for the GO(s) of such groups (p2p_find can specific a device
address to limit the results, but this would need to be run on the
operating channel(s), so may be useful to add a new wpa_supplicant
command to update the tables for P2P Client groups).

Jouni Malinen                                            PGP id EFC895FA

More information about the Hostap mailing list