summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2018-07-24 16:31:24 +0200
committerJo-Philipp Wich <jo@mein.io>2018-07-24 17:36:17 +0200
commitd991fe54810761643ec96d4eca17fefbdbfef5df (patch)
treed056740a7019666654c5566cc46f53224381debc /include
parent44956b780db9aa71ac86152577275ff235d7afef (diff)
downloadiwinfo-d991fe54810761643ec96d4eca17fefbdbfef5df.tar.gz
utils: add simple ubus query support
Some wireless runtime parameters are not available via nl80211, e.g. the effective Mesh ID so we need to fetch those from ubus state info. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'include')
-rw-r--r--include/iwinfo/utils.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/iwinfo/utils.h b/include/iwinfo/utils.h
index 159fd49..98b9c89 100644
--- a/include/iwinfo/utils.h
+++ b/include/iwinfo/utils.h
@@ -22,6 +22,7 @@
#include <sys/socket.h>
#include <net/if.h>
#include <uci.h>
+#include <libubus.h>
#include "iwinfo.h"
@@ -58,4 +59,7 @@ void iwinfo_parse_rsn(struct iwinfo_crypto_entry *c, uint8_t *data, uint8_t len,
struct uci_section *iwinfo_uci_get_radio(const char *name, const char *type);
void iwinfo_uci_free(void);
+int iwinfo_ubus_query(const char *ifname, const char *field,
+ char *buf, size_t len);
+
#endif