Netlink communication between hostapd and hostap,nl80211

Kerht keithr2009 at
Fri Apr 3 04:13:31 EDT 2009

I am puzzling about hte netlink usage in hostapd.
I saw below code in hostapd:
static int hostap_send_mgmt_frame(void *priv, const void *msg, size_t len,
                  int flags)
    struct hostap_driver_data *drv = priv;
    struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) msg;
    int res;

    /* Request TX callback */
    hdr->frame_control |= host_to_le16(BIT(1));
    res = send(drv->sock, msg, len, flags);
    hdr->frame_control &= ~host_to_le16(BIT(1));

    return res;

Then I did not find which part of hostap or nl80211 can handle this "sned".
It seems the msg is not in generic netlink format.
Isn't it?



More information about the HostAP mailing list