2 * hostapd / ubus support
3 * Copyright (c) 2013, Felix Fietkau <nbd@nbd.name>
5 * This software may be distributed under the terms of the BSD license.
6 * See README for more details.
8 #ifndef __HOSTAPD_UBUS_H
9 #define __HOSTAPD_UBUS_H
11 enum hostapd_ubus_event_type {
12 HOSTAPD_UBUS_PROBE_REQ,
13 HOSTAPD_UBUS_AUTH_REQ,
14 HOSTAPD_UBUS_ASSOC_REQ,
18 struct hostapd_ubus_request {
19 enum hostapd_ubus_event_type type;
20 const struct ieee80211_mgmt *mgmt_frame;
21 const struct ieee802_11_elems *elems;
22 int ssi_signal; /* dBm */
31 #include <libubox/avl.h>
34 struct hostapd_ubus_bss {
35 struct ubus_object obj;
36 struct avl_tree banned;
40 void hostapd_ubus_add_iface(struct hostapd_iface *iface);
41 void hostapd_ubus_free_iface(struct hostapd_iface *iface);
42 void hostapd_ubus_add_bss(struct hostapd_data *hapd);
43 void hostapd_ubus_free_bss(struct hostapd_data *hapd);
45 int hostapd_ubus_handle_event(struct hostapd_data *hapd, struct hostapd_ubus_request *req);
46 void hostapd_ubus_notify(struct hostapd_data *hapd, const char *type, const u8 *mac);
50 struct hostapd_ubus_bss {};
52 static inline void hostapd_ubus_add_iface(struct hostapd_iface *iface)
56 static inline void hostapd_ubus_free_iface(struct hostapd_iface *iface)
60 static inline void hostapd_ubus_add_bss(struct hostapd_data *hapd)
64 static inline void hostapd_ubus_free_bss(struct hostapd_data *hapd)
68 static inline int hostapd_ubus_handle_event(struct hostapd_data *hapd, struct hostapd_ubus_request *req)
73 static inline void hostapd_ubus_notify(struct hostapd_data *hapd, const char *type, const u8 *mac)