diff options
author | Vadim Kochan <vadim4j@gmail.com> | 2016-08-04 19:30:18 +0300 |
---|---|---|
committer | Tobias Klauser <tklauser@distanz.ch> | 2016-08-05 10:54:52 +0200 |
commit | c831bcda3e2638c55b286bd538415ea79f510cdb (patch) | |
tree | c1ef44e3beb40e51f30487faf81c6127ea6c77b9 /mac80211.h | |
parent | e6b7339a68ce57244117e2470f87ff581520cfc7 (diff) |
trafgen: Allow to compile without libnl
trafgen uses libnl only to inject mac80211 frames but
it might be not needed in some embedded or switch environments.
Let's make it possible to disable this feature.
In case the `--rfraw' option is used, the user will get a panic
message.
Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Diffstat (limited to 'mac80211.h')
-rw-r--r-- | mac80211.h | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -1,7 +1,21 @@ #ifndef MAC80211_H #define MAC80211_H +#include "config.h" +#include "die.h" + +#ifdef HAVE_LIBNL extern void enter_rfmon_mac80211(const char *device, char **mondev); extern void leave_rfmon_mac80211(const char *mondev); +#else +static inline void enter_rfmon_mac80211(const char *device, char **mondev) +{ + panic("No built-in libnl support!\n"); +} + +static inline void leave_rfmon_mac80211(const char *mondev) +{ +} +#endif /* HAVE_LIBNL */ #endif /* MAC80211_H */ |