}
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;
}
if (sinfo[NL80211_STA_INFO_TX_BITRATE]) {
char buf[100];
- parse_tx_bitrate(sinfo[NL80211_STA_INFO_TX_BITRATE], buf, sizeof(buf));
+ parse_bitrate(sinfo[NL80211_STA_INFO_TX_BITRATE], buf, sizeof(buf));
printf("\ttx bitrate: %s\n", buf);
}
}
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)
{