[PATCH v2] supplicant: Print human readable event names.

Jouni Malinen j
Wed Nov 9 06:26:37 PST 2011

On Mon, Nov 07, 2011 at 02:21:02PM -0800, greearb at candelatech.com wrote:
> This makes it easier to understand the event related
> logs.

I can understand this part..

> Also, print re-entrancy depth in the event handler.
> I'm suspicious that it could be called in a re-entrant
> manner if netlink events are received & processed as
> part of another event.

This sounds strange. I would recommend splitting this part to a separate
patch if you want to get the human readable part in.. I would need to
hear quite a bit more convincing explanation on how you think this
function can be used in re-entrant manner in a single process
implementation with eloop.

> diff --git a/src/common/wpa_common.c b/src/common/wpa_common.c
> +#include "drivers/driver.h"

This wpa_common.c file should not really use driver interface.

> +const char* event_to_string(enum wpa_event_type event)

And this does not belong here either.. wpa_common.c is a set of common
helper functions for WPA EAPOL-Key processing. Driver events have
nothing to do with it. If you are using this only in
wpa_supplicant/events.c, it would be better to add the function there.
If there is a plan to have this shared with hostapd, a new C file in
src/drivers could be the best approach.

Jouni Malinen                                            PGP id EFC895FA

More information about the Hostap mailing list