aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils/common.h
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2013-10-22 16:10:56 (GMT)
committerJouni Malinen <j@w1.fi>2013-10-22 21:44:07 (GMT)
commitaf8a827b90ad504711bf1c156b715103878a934d (patch)
treeef8100ad8d33aa08932c654d8c36ab29fa47f3f1 /src/utils/common.h
parent941dae0a2e2f6cacee90d2ea8fcd7e94229d3528 (diff)
downloadhostap-af8a827b90ad504711bf1c156b715103878a934d.zip
hostap-af8a827b90ad504711bf1c156b715103878a934d.tar.gz
hostap-af8a827b90ad504711bf1c156b715103878a934d.tar.bz2
Make frequency range list routines more general
This allows the frequency range list implementation to be shared for other purposes. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'src/utils/common.h')
-rw-r--r--src/utils/common.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/utils/common.h b/src/utils/common.h
index 29f0b95..399ab79 100644
--- a/src/utils/common.h
+++ b/src/utils/common.h
@@ -505,6 +505,20 @@ static inline int is_broadcast_ether_addr(const u8 *a)
#include "wpa_debug.h"
+struct wpa_freq_range_list {
+ struct wpa_freq_range {
+ unsigned int min;
+ unsigned int max;
+ } *range;
+ unsigned int num;
+};
+
+int freq_range_list_parse(struct wpa_freq_range_list *res, const char *value);
+int freq_range_list_includes(const struct wpa_freq_range_list *list,
+ unsigned int freq);
+char * freq_range_list_str(const struct wpa_freq_range_list *list);
+
+
/*
* gcc 4.4 ends up generating strict-aliasing warnings about some very common
* networking socket uses that do not really result in a real problem and