What is the difference between nl80211_cmd_msg and nl80211_bss_msg?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



They appear to do the same task?

https://w1.fi/cgit/hostap/tree/src/drivers/driver_nl80211.c#n658




struct nl_msg * nl80211_cmd_msg(struct i802_bss *bss, int flags, uint8_t cmd)
{
struct nl_msg *msg;

msg = nlmsg_alloc();
if (!msg)
return NULL;

if (!nl80211_cmd(bss->drv, msg, flags, cmd) ||
    nl80211_set_iface_id(msg, bss) < 0) {
nlmsg_free(msg);
return NULL;
}

return msg;
}


static struct nl_msg *
nl80211_ifindex_msg_build(struct wpa_driver_nl80211_data *drv,
  struct nl_msg *msg, int ifindex, int flags,
  uint8_t cmd)
{
if (!msg)
return NULL;

if (!nl80211_cmd(drv, msg, flags, cmd) ||
    nla_put_u32(msg, NL80211_ATTR_IFINDEX, ifindex)) {
nlmsg_free(msg);
return NULL;
}

return msg;
}


struct nl_msg * nl80211_bss_msg(struct i802_bss *bss, int flags, uint8_t cmd)
{
return nl80211_ifindex_msg(bss->drv, bss->ifindex, flags, cmd);
}



Kind regards / Bien cordialement / Met vriendelijke groet

Koen Vandeputte

_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux