0

I would like to add wpa_ctrl.h on a C code, and the source code has the following header files:

#include "includes.h"
#include "common.h"

how do I suppose to have them? Do I need to install any package or do they suppose to be at the kernel header files or in the include path? If I need to include it manually, then each file depends on some many header files that needs to be added manually, is there a convenient way to add the files that are needed

sven
  • 1,101
  • 7
  • 21
  • 44

2 Answers2

1

These files are part of the hostapd project, and internal header files that won't be installed so you can't just include them after installing the package.

You'd be probably better off just ripping out the parts from wpa_ctrl.h you need. Depending on what you need it might be even better to use e.g. the DBus interface to communicate with wpa_supplicant (if that's what you want).

ldx
  • 3,984
  • 23
  • 28
  • I want to use wpa_supplicant from a C code (the equivalent of executing wpa_supplicant -B -Dnl80211 -iwlan0 -c/etc/w.conf) and have better control over wpa_supplicant to watch if the interface is authenticated or deauthenticated,.. in that case do you suggest me to use DBus or wpa_ctrl? In both cases, do you recommend any tutorial that would be good for a newbie to learn how to use the tool? – sven Nov 06 '13 at 21:42
  • Probably you should use the DBus API: http://hostap.epitest.fi/wpa_supplicant/devel/dbus.html – ldx Nov 09 '13 at 18:32
0

You get them from wpa_supplicant source code.

Here's where to find them:

wpa_supplicant-2.4/src/utils/includes.h wpa_supplicant-2.4/src/utils/common.h

I copied them into my project directory and everything worked.

Here's where to find the source code:

https://w1.fi/releases/