On 2016-07-31 at 23:13:16 +0200, Vadim Kochan <vadi...@gmail.com> wrote:
> trafgen uses libnl only to inject mac80211 frames but
> it might be not needed in some embedded or switch environments,
> so lets make possible to disable this feature.
> 
> In case if --rfraw option will be used - user will get the panic message.
> 
> Signed-off-by: Vadim Kochan <vadi...@gmail.com>
> ---
>  mac80211.c       |  1 -
>  mac80211.h       | 15 +++++++++++++++
>  trafgen/Makefile | 21 +++++++++++++++------
>  3 files changed, 30 insertions(+), 7 deletions(-)
> 
> diff --git a/mac80211.c b/mac80211.c
> index f22b600..9aea5a0 100644
> --- a/mac80211.c
> +++ b/mac80211.c
> @@ -24,7 +24,6 @@
>  #include <netlink/msg.h>
>  #include <netlink/attr.h>
>  
> -#include "die.h"
>  #include "str.h"
>  #include "dev.h"
>  #include "mac80211.h"
> diff --git a/mac80211.h b/mac80211.h
> index dea4ae0..2780c03 100644
> --- a/mac80211.h
> +++ b/mac80211.h
> @@ -1,7 +1,22 @@
>  #ifndef MAC80211_H
>  #define MAC80211_H
>  
> +#include "die.h"
> +#include "config.h"
> +
> +#ifdef CONFIG_NO_LIBNL
> +static inline void enter_rfmon_mac80211(const char *device, char **mondev)
> +{
> +    panic("enter_rfmon_mac80211: CONFIG_NO_LIBNL option needs to be 
> disabled\n");
> +}
> +
> +static inline void leave_rfmon_mac80211(const char *mondev)
> +{
> +    panic("leave_rfmon_mac80211: CONFIG_NO_LIBNL option needs to be 
> disabled\n");
> +}

These messages both have a double negative which isn't very easy to
understand. I suggest to call the CONFIG directive CONFIG_LIBNL instead
which is also more in line with the other library CONFIG_* directives we
have.

Also, you use the CONFIG_NO_LIBNL without setting it anywhere, this is
only done in patch 3/3. Please change the series order to make the
configure change come first.

-- 
You received this message because you are subscribed to the Google Groups 
"netsniff-ng" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to netsniff-ng+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to