Adjusting wpa_ctrl.c for use in/by external programs

Rafał Miłecki zajec5
Wed Jan 28 02:45:20 PST 2015

Documentation just says optimistic "External programs (...) should
link in wpa_ctrl.c":
Easier said than done.

There are some tips on doing this, see:
but none of the solutions seem really clean. Modifying wpa_ctrl.c or
compiling half of utils sources (with some complex paths) doesn't
really convince me.

So my question is if you were considering some clean way of sharing
wpa_ctrl.c and its helpers.

I guess there are two ways:
1) Modify wpa_ctrl.c upstream (modify dependencies, header files) so
it can be just copied and compiled in an external project. This
solution still won't be perfect (ppl will need to copy wpa_ctrl.c,
wpa_ctrl.h, os.h, os_*.c), but at least will be better than current
2) Make wpa_ctrl a separated library. A bit harder to achieve (one
would need to known hostapd Makefile-s magic), but cleaner in the
final result. Maybe a bit of overhead for such a small library, I
don't know.

Do you have any advise on this?


More information about the Hostap mailing list