#include <net/if.h>
#include <errno.h>
#include <string.h>
-#include <ctype.h>
#include <stdbool.h>
#include <netlink/genl/genl.h>
}
static int handle_scan_for_link(struct nl80211_state *state,
- struct nl_cb *cb,
struct nl_msg *msg,
int argc, char **argv,
enum id_input id)
if (argc > 0)
return 1;
- nl_cb_set(cb, NL_CB_VALID, NL_CB_CUSTOM, link_bss_handler, &lr);
+ register_handler(link_bss_handler, &lr);
return 0;
}
}
static int handle_link_sta(struct nl80211_state *state,
- struct nl_cb *cb,
struct nl_msg *msg,
int argc, char **argv,
enum id_input id)
NLA_PUT(msg, NL80211_ATTR_MAC, ETH_ALEN, mac_addr);
- nl_cb_set(cb, NL_CB_VALID, NL_CB_CUSTOM, print_link_sta, NULL);
+ register_handler(print_link_sta, NULL);
return 0;
nla_put_failure:
return -ENOBUFS;
}
-static int handle_link(struct nl80211_state *state, struct nl_cb *cb,
+static int handle_link(struct nl80211_state *state,
struct nl_msg *msg, int argc, char **argv,
enum id_input id)
{