问题
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
回答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).
回答2:
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/
来源:https://stackoverflow.com/questions/19822882/including-wpa-ctrl-h-in-a-c-code