[PATCH 2/6] nl80211: Convert some wpa_printf to wpa_msg methods.

Jouni Malinen j
Thu Oct 20 12:08:25 PDT 2011

On Thu, Oct 20, 2011 at 06:34:30AM -0700, Ben Greear wrote:
> On 10/20/2011 06:29 AM, Johannes Berg wrote:
> > On Thu, 2011-10-20 at 06:24 -0700, Ben Greear wrote:
> Hopefully the DEBUG messages don't show up by default anyway, and if someone
> was crazy enough to try to parse them, then hopefully they are smart enough
> to be clever with their parsing and able to deal with any issues.

wpa_msg() calls at MSG_DEBUG level do not show up in the control
interface by default. In theory, it would be possible to change the
level, but I think I managed to break that operation at some point on
the UNIX domain socket interface.. ;-)

> >> But, I can change everything to wpa_lmsg or somthing that just logs
> >> to a file if you prefer...
> >
> > That'd make more sense to me.
> Jouni:  Please let me know which you prefer.

I don't see much need for adding new wrappers for debug messages, but I
would prefer wpa_dbg() to be used instead of wpa_msg() when the message
is at MSG_DEBUG (or below) level and is not really meant for anything
parsing messages from the control interface. The main benefit here is
that wpa_dbg() strings can be easily compiled out from the binary to
minimize size requirements while wpa_msg() cannot be handled that easily
since it is needed for ctrl_iface to work properly.

Jouni Malinen                                            PGP id EFC895FA

More information about the Hostap mailing list