Log file proposal

Ben Greear greearb
Thu Nov 18 09:52:33 PST 2010

On 11/18/2010 03:14 AM, Jouni Malinen wrote:
> On Wed, Nov 17, 2010 at 10:36:34AM -0800, Ben Greear wrote:
>> The log file for wpa_supplicant rarely if ever uses the wpa_s->ifname,
>> so when you are running with multiple interfaces, the logs are not so
>> useful.
> Yes.. That has also been getting worse recently with the addition of P2P
> and dynamic group interface..
>> One option is to search for all logging calls and explicitly add the
>> name to the log messages, but it might be better to make a new
>> method that assumes wpa_s exists and automatically append the name
>> to the front of the string.  We can then add a new logging method
>> that doesn't assume wpa_s for places.
> The "new method" already exists: wpa_msg(). In other words, wpa_printf()
> calls should be replaced with wpa_msg() in place where this matters (and
> where wpa_s pointer is available). wpa_printf() can remain in its
> current form that does not require wpa_s pointer to avoid having to
> change all the close to 7000 existing users..

In the core (src/*), the ctx passed to wpa_msg is void*, so you can't get a
name out of it w/out casting it to wpa_s, and I was afraid that might
be an invalid assumption.

I posted a patch to add a new wpa_msg and a _wpa_printf that took an ifname,
but it was too big for the list and is awaiting admin approval it seems...



Ben Greear <greearb at candelatech.com>
Candela Technologies Inc  http://www.candelatech.com

More information about the Hostap mailing list