input stringlengths 16 454k | output stringlengths 13 350k | function_name stringlengths 1 100 | repo_name stringlengths 6 43 | category stringclasses 76
values | sample_id stringlengths 22 88 | decompiler stringclasses 1
value | opt_level stringclasses 1
value |
|---|---|---|---|---|---|---|---|
int nl80211_register_action_frame(i802_bss *bss, const u8 *match,
size_t match_len) {
return nl80211_register_frame(bss, bss->nl_mgmt, 0xD0u, match, match_len, 0);
} | static int nl80211_register_action_frame(struct i802_bss *bss, const u8 *match,
size_t match_len) {
u16 type = (WLAN_FC_TYPE_MGMT << 2) | (WLAN_FC_STYPE_ACTION << 4);
return nl80211_register_frame(bss, bss->nl_mgmt, type, match, match_len,
fal... | nl80211_register_action_frame | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int nl80211_register_beacons(wpa_driver_nl80211_data *drv,
nl80211_wiphy_data *w) {
char *v3;
int ret;
nl_msg *msg;
msg = (nl_msg *)nlmsg_alloc(drv, (const char *)w);
if (!msg)
return -1;
if (nl80211_cmd(drv, msg, 0, 0x55u) &&
!nla_put_u32(msg, 1, (unsigned int)w->wip... | static int nl80211_register_beacons(struct wpa_driver_nl80211_data *drv,
struct nl80211_wiphy_data *w) {
struct nl_msg *msg;
int ret;
msg = nlmsg_alloc();
if (!msg)
return -1;
if (!nl80211_cmd(drv, msg, 0, NL80211_CMD_REGISTER_BEACONS) ||
nla_put_u32(msg, NL8021... | nl80211_register_beacons | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void nl80211_register_eloop_read(nl_sock **handle, eloop_sock_handler handler,
void *eloop_data, int persist) {
const char *v4;
nl_sock *v5;
int fd;
int err;
err = nl_socket_set_buffer_size(*handle, &loc_40000, 0);
if (err < 0) {
v4 = (const char *)nl_geterror((unsigned... | static void nl80211_register_eloop_read(struct nl_sock **handle,
eloop_sock_handler handler,
void *eloop_data, int persist) {
int err;
err = nl_socket_set_buffer_size(*handle, 262144, 0);
if (err < 0) {
wpa_printf(MSG_DEBUG, "nl... | nl80211_register_eloop_read | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int nl80211_register_frame(i802_bss *bss, nl_sock *nl_handle, u16 type,
const u8 *match, size_t match_len, bool multicast) {
const char *v6;
char *v8;
int ret;
wpa_driver_nl80211_data *drv;
nl_msg *msg;
char buf[40];
unsigned long v17;
v17 = __readfsqword(0x28u);
drv = bss-... | static int nl80211_register_frame(struct i802_bss *bss,
struct nl_sock *nl_handle, u16 type,
const u8 *match, size_t match_len,
bool multicast) {
struct wpa_driver_nl80211_data *drv = bss->drv;
struct nl_msg *msg;
... | nl80211_register_frame | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int nl80211_register_spurious_class3(i802_bss *bss) {
char *v1;
int ret;
nl_msg *msg;
msg = nl80211_bss_msg(bss, 0, 0x53u);
ret = send_and_recv(bss->drv->global, bss->nl_mgmt, msg, 0, 0, 0, 0);
if (ret) {
v1 = strerror(-ret);
wpa_printf(2, "nl80211: Register spurious class3 failed: ret=%d (%s)", re... | static int nl80211_register_spurious_class3(struct i802_bss *bss) {
struct nl_msg *msg;
int ret;
msg = nl80211_bss_msg(bss, 0, NL80211_CMD_UNEXPECTED_FRAME);
ret = send_and_recv(bss->drv->global, bss->nl_mgmt, msg, NULL, NULL, NULL,
NULL);
if (ret) {
wpa_printf(MSG_DEBUG,
... | nl80211_register_spurious_class3 | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void nl80211_rekey_offload_event(wpa_driver_nl80211_data *drv, nlattr **tb) {
nlattr *rekey_info[5];
wpa_event_data data;
unsigned long v4;
v4 = __readfsqword(0x28u);
if (tb[6] && tb[122] &&
!(unsigned int)nla_parse_nested(rekey_info, 4, tb[122], rekey_policy_2)) {
if (rekey_info[3]) {
memset... | static void nl80211_rekey_offload_event(struct wpa_driver_nl80211_data *drv,
struct nlattr **tb) {
struct nlattr *rekey_info[NUM_NL80211_REKEY_DATA];
static struct nla_policy rekey_policy[NUM_NL80211_REKEY_DATA] = {
[NL80211_REKEY_DATA_KEK] =
{
.... | nl80211_rekey_offload_event | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void nl80211_remove_iface(wpa_driver_nl80211_data *drv, int ifidx) {
nl_msg *v2;
wpa_driver_nl80211_data *drv2;
wpa_printf(2, "nl80211: Remove interface ifindex=%d", ifidx);
for (drv2 = (wpa_driver_nl80211_data *)&drv->global->interfaces.next[-1].prev;
drv2 != (wpa_driver_nl80211_data *)drv->global;
... | void nl80211_remove_iface(struct wpa_driver_nl80211_data *drv, int ifidx) {
struct nl_msg *msg;
struct wpa_driver_nl80211_data *drv2;
wpa_printf(MSG_DEBUG, "nl80211: Remove interface ifindex=%d", ifidx);
dl_list_for_each(drv2, &drv->global->interfaces,
struct wpa_driver_nl80211_data, list) ... | nl80211_remove_iface | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void nl80211_remove_monitor_interface(wpa_driver_nl80211_data *drv) {
if (drv->monitor_refcount > 0)
--drv->monitor_refcount;
wpa_printf(2, "nl80211: Remove monitor interface: refcount=%d",
drv->monitor_refcount);
if (drv->monitor_refcount <= 0) {
if (drv->monitor_ifidx >= 0) {
nl80211_... | void nl80211_remove_monitor_interface(struct wpa_driver_nl80211_data *drv) {
if (drv->monitor_refcount > 0)
drv->monitor_refcount--;
wpa_printf(MSG_DEBUG, "nl80211: Remove monitor interface: refcount=%d",
drv->monitor_refcount);
if (drv->monitor_refcount > 0)
return;
if (drv->monitor_ifidx... | nl80211_remove_monitor_interface | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int nl80211_remove_pmkid(void *priv, wpa_pmkid_params *params) {
const char *v2;
char *v3;
int ret;
if (params->bssid) {
wpa_printf(2, "nl80211: Delete PMKID for %02x:%02x:%02x:%02x:%02x:%02x",
*params->bssid, *((unsigned char *)params->bssid + 1),
*((unsigned char *)params->b... | static int nl80211_remove_pmkid(void *priv, struct wpa_pmkid_params *params) {
struct i802_bss *bss = priv;
int ret;
if (params->bssid)
wpa_printf(MSG_DEBUG, "nl80211: Delete PMKID for " MACSTR,
MAC2STR(params->bssid));
else if (params->fils_cache_id && params->ssid_len) {
wpa_printf(MSG... | nl80211_remove_pmkid | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void nl80211_restore_ap_mode(i802_bss *bss) {
int *v1;
char *v2;
int was_ap;
wpa_driver_nl80211_data *drv;
drv = bss->drv;
was_ap = is_ap_interface(bss->drv->nlmode);
wpa_driver_nl80211_set_mode(bss, drv->ap_scan_as_station);
if (!was_ap && is_ap_interface(drv->ap_scan_as_station) && bss->brname[0] &&
... | void nl80211_restore_ap_mode(struct i802_bss *bss) {
struct wpa_driver_nl80211_data *drv = bss->drv;
int was_ap = is_ap_interface(drv->nlmode);
wpa_driver_nl80211_set_mode(bss, drv->ap_scan_as_station);
if (!was_ap && is_ap_interface(drv->ap_scan_as_station) && bss->brname[0] &&
(bss->added_if_into_bridg... | nl80211_restore_ap_mode | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
nl_msg *nl80211_scan_common(i802_bss *bss, u8 cmd,
wpa_driver_scan_params *params) {
const char *v4;
u32 scan_flags;
size_t i;
size_t ia;
wpa_driver_nl80211_data *drv;
nl_msg *msg;
nlattr *ssids;
nlattr *freqs;
drv = bss->drv;
scan_flags = 0;
msg = nl80211_cmd_msg(bss,... | static struct nl_msg *
nl80211_scan_common(struct i802_bss *bss, u8 cmd,
struct wpa_driver_scan_params *params) {
struct wpa_driver_nl80211_data *drv = bss->drv;
struct nl_msg *msg;
size_t i;
u32 scan_flags = 0;
msg = nl80211_cmd_msg(bss, 0, cmd);
if (!msg)
return NULL;
if (param... | nl80211_scan_common | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int nl80211_scan_filtered(wpa_driver_nl80211_data *drv, const u8 *ie,
size_t ie_len) {
size_t i;
const u8 *ssid;
if (!drv->filter_ssids)
return 0;
ssid = get_ie(ie, ie_len, 0);
if (!ssid)
return 1;
for (i = 0; i < drv->num_filter_ssids; ++i) {
if (ssid[1] == drv->filte... | static int nl80211_scan_filtered(struct wpa_driver_nl80211_data *drv,
const u8 *ie, size_t ie_len) {
const u8 *ssid;
size_t i;
if (drv->filter_ssids == NULL)
return 0;
ssid = get_ie(ie, ie_len, WLAN_EID_SSID);
if (ssid == NULL)
return 1;
for (i = 0; i < drv->num_f... | nl80211_scan_filtered | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int nl80211_sched_scan_add_scan_plans(wpa_driver_nl80211_data *drv, nl_msg *msg,
wpa_driver_scan_params *params) {
unsigned int i;
sched_scan_plan *scan_plans;
nlattr *plans;
nlattr *plan;
scan_plans = params->sched_scan_plans;
plans = (nlattr *)nla_nest_start(msg, 225... | static int
nl80211_sched_scan_add_scan_plans(struct wpa_driver_nl80211_data *drv,
struct nl_msg *msg,
struct wpa_driver_scan_params *params) {
struct nlattr *plans;
struct sched_scan_plan *scan_plans = params->sched_scan_plans;
unsigned int i;
... | nl80211_sched_scan_add_scan_plans | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int nl80211_send_eapol_data(i802_bss *bss, const u8 *addr, const u8 *data,
size_t data_len) {
int *v5;
char *v6;
int ret;
sockaddr_ll ll;
unsigned long v11;
v11 = __readfsqword(0x28u);
if (bss->drv->eapol_tx_sock >= 0) {
memset(&ll, 0, sizeof(ll));
ll.sll_family = 17;
... | static int nl80211_send_eapol_data(struct i802_bss *bss, const u8 *addr,
const u8 *data, size_t data_len) {
struct sockaddr_ll ll;
int ret;
if (bss->drv->eapol_tx_sock < 0) {
wpa_printf(MSG_DEBUG, "nl80211: No socket to send EAPOL");
return -1;
}
os_memset(&ll, 0, ... | nl80211_send_eapol_data | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int nl80211_send_external_auth_status(void *priv, external_auth *params) {
char *v3;
int ret;
nl_msg *msg;
wpa_driver_nl80211_data *drv;
drv = *(wpa_driver_nl80211_data **)priv;
ret = -1;
if (is_ap_interface(*(nl80211_iftype *)(*(_QWORD *)priv + 800LL)) &&
(*(_BYTE *)(*(_QWORD *)priv + 824LL) &... | static int nl80211_send_external_auth_status(void *priv,
struct external_auth *params) {
struct i802_bss *bss = priv;
struct wpa_driver_nl80211_data *drv = bss->drv;
struct nl_msg *msg = NULL;
int ret = -1;
if ((is_ap_interface(drv->nlmode) && !bss->drv->device_ap... | nl80211_send_external_auth_status | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int nl80211_send_frame_cmd(i802_bss *bss, unsigned int freq, unsigned int wait,
const u8 *buf, size_t buf_len, int save_cookie,
int no_cck, int no_ack, int offchanok,
const u16 *csa_offs, size_t csa_offs_len) {
char *v11;
const char *v... | static int nl80211_send_frame_cmd(struct i802_bss *bss, unsigned int freq,
unsigned int wait, const u8 *buf,
size_t buf_len, int save_cookie, int no_cck,
int no_ack, int offchanok,
con... | nl80211_send_frame_cmd | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int nl80211_send_monitor(wpa_driver_nl80211_data *drv, const void *data,
size_t len, int encrypt, int noack) {
int *v6;
char *v7;
u16 txflags;
msghdr_0 msg;
iovec iov[2];
__u8 rtap_hdr[14];
unsigned long v12;
v12 = __readfsqword(0x28u);
*(_QWORD *)rtap_hdr = 0xC002000E0000LL;... | int nl80211_send_monitor(struct wpa_driver_nl80211_data *drv, const void *data,
size_t len, int encrypt, int noack) {
__u8 rtap_hdr[] = {
0x00, 0x00, 0x0e, 0x00, 0x02, 0xc0, 0x00, 0x00, IEEE80211_RADIOTAP_F_FRAG,
0x00, 0x00, 0x00, 0x00, 0x00,
};
struct iovec iov[2] = {{
... | nl80211_send_monitor | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void nl80211_send_null_frame(i802_bss *bss, const u8 *own_addr, const u8 *addr,
int qos) {
le16 v4;
size_t size;
$AEDD9F7E293A65F55C1D3945FB06FD67 nulldata;
unsigned long v9;
v9 = __readfsqword(0x28u);
memset(&nulldata, 0, sizeof(nulldata));
if (qos) {
nulldata.hdr.frame_... | static void nl80211_send_null_frame(struct i802_bss *bss, const u8 *own_addr,
const u8 *addr, int qos) {
struct {
struct ieee80211_hdr hdr;
u16 qos_ctl;
} STRUCT_PACKED nulldata;
size_t size;
os_memset(&nulldata, 0, sizeof(nulldata));
if (qos) {
nulldata.hdr.... | nl80211_send_null_frame | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int nl80211_set_4addr_mode(void *priv, const char *bridge_ifname, int val) {
const char *v3;
int ret;
nl_msg *msg;
wpa_driver_nl80211_data *drv;
drv = *(wpa_driver_nl80211_data **)priv;
ret = -105;
if (val)
v3 = "Enable";
else
v3 = "Disable";
wpa_printf(2, "nl80211: %s 4addr mode (bridge_ifna... | static int nl80211_set_4addr_mode(void *priv, const char *bridge_ifname,
int val) {
struct i802_bss *bss = priv;
struct wpa_driver_nl80211_data *drv = bss->drv;
struct nl_msg *msg;
int ret = -ENOBUFS;
wpa_printf(MSG_DEBUG, "nl80211: %s 4addr mode (bridge_ifname: %s)",
... | nl80211_set_4addr_mode | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int nl80211_set_bss(i802_bss *bss, int cts, int preamble, int slot,
int ht_opmode, int ap_isolate, const int *basic_rates) {
wpa_driver_nl80211_data *drv;
nl_msg *msg;
drv = bss->drv;
msg = nl80211_bss_msg(bss, 0, 0x19u);
if (msg &&
(cts < 0 || !(unsigned int)nla_put_u8(msg, 28, (un... | static int nl80211_set_bss(struct i802_bss *bss, int cts, int preamble,
int slot, int ht_opmode, int ap_isolate,
const int *basic_rates) {
struct wpa_driver_nl80211_data *drv = bss->drv;
struct nl_msg *msg;
if (!(msg = nl80211_bss_msg(bss, 0, NL80211_CMD_SET_... | nl80211_set_bss | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int nl80211_set_channel(i802_bss *bss, hostapd_freq_params *freq,
int set_chan) {
uint8_t v3;
char *v5;
int ret;
wpa_driver_nl80211_data *drv;
nl_msg *msg;
drv = bss->drv;
wpa_printf(2,
"nl80211: Set freq %d (ht_enabled=%d, vht_enabled=%d, "
"he_enabled=%... | static int nl80211_set_channel(struct i802_bss *bss,
struct hostapd_freq_params *freq, int set_chan) {
struct wpa_driver_nl80211_data *drv = bss->drv;
struct nl_msg *msg;
int ret;
wpa_printf(MSG_DEBUG,
"nl80211: Set freq %d (ht_enabled=%d, vht_enabled=%d, "
... | nl80211_set_channel | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int nl80211_set_conn_keys(wpa_driver_associate_params *params, nl_msg *msg) {
void *v3;
int i;
int ia;
int privacy;
nlattr *nl_keys;
nlattr *nl_key;
privacy = 0;
for (i = 0; i <= 3; ++i) {
if (params->wep_key[i]) {
privacy = 1;
break;
}
}
if (params->wps == wps_mode_WPS_MODE_PRI... | static int nl80211_set_conn_keys(struct wpa_driver_associate_params *params,
struct nl_msg *msg) {
int i, privacy = 0;
struct nlattr *nl_keys, *nl_key;
for (i = 0; i < 4; i++) {
if (!params->wep_key[i])
continue;
privacy = 1;
break;
}
if (params->wps == WPS_... | nl80211_set_conn_keys | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void nl80211_set_dfs_domain(nl80211_dfs_regions region, u8 *dfs_domain) {
switch (region) {
case nl80211_dfs_regions_NL80211_DFS_FCC:
*dfs_domain = 1;
break;
case nl80211_dfs_regions_NL80211_DFS_ETSI:
*dfs_domain = 2;
break;
case nl80211_dfs_regions_NL80211_DFS_JP:
*dfs_domain = 3;
break... | static void nl80211_set_dfs_domain(enum nl80211_dfs_regions region,
u8 *dfs_domain) {
if (region == NL80211_DFS_FCC)
*dfs_domain = HOSTAPD_DFS_REGION_FCC;
else if (region == NL80211_DFS_ETSI)
*dfs_domain = HOSTAPD_DFS_REGION_ETSI;
else if (region == NL80211_DFS_JP)
*... | nl80211_set_dfs_domain | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void nl80211_set_ht40_mode(hostapd_hw_modes *mode, int start, int end) {
int c;
hostapd_channel_data *chan;
for (c = 0; c < mode->num_channels; ++c) {
chan = &mode->channels[c];
if (start < chan->freq - 9 && end > chan->freq + 9)
chan->flag |= 0x40u;
}
} | static void nl80211_set_ht40_mode(struct hostapd_hw_modes *mode, int start,
int end) {
int c;
for (c = 0; c < mode->num_channels; c++) {
struct hostapd_channel_data *chan = &mode->channels[c];
if (chan->freq - 10 >= start && chan->freq + 10 <= end)
chan->flag |= HOST... | nl80211_set_ht40_mode | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void nl80211_set_ht40_mode_sec(hostapd_hw_modes *mode, int start, int end) {
int c;
hostapd_channel_data *chan;
for (c = 0; c < mode->num_channels; ++c) {
chan = &mode->channels[c];
if ((chan->flag & 0x40) != 0) {
if (start < chan->freq - 29 && end >= chan->freq - 10)
chan->flag |= 0x20u;
... | static void nl80211_set_ht40_mode_sec(struct hostapd_hw_modes *mode, int start,
int end) {
int c;
for (c = 0; c < mode->num_channels; c++) {
struct hostapd_channel_data *chan = &mode->channels[c];
if (!(chan->flag & HOSTAPD_CHAN_HT40))
continue;
if (chan->fre... | nl80211_set_ht40_mode_sec | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int nl80211_set_iface_id(nl_msg *msg, i802_bss *bss) {
if ((*((_BYTE *)bss + 65) & 0x20) != 0)
return nla_put_u64(msg, 153, bss->wdev_id);
else
return nla_put_u32(msg, 3, (unsigned int)bss->ifindex);
} | static int nl80211_set_iface_id(struct nl_msg *msg, struct i802_bss *bss) {
if (bss->wdev_id_set)
return nla_put_u64(msg, NL80211_ATTR_WDEV, bss->wdev_id);
return nla_put_u32(msg, NL80211_ATTR_IFINDEX, bss->ifindex);
} | nl80211_set_iface_id | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int nl80211_set_mac_addr(void *priv, const u8 *addr) {
unsigned char *addra;
wpa_driver_nl80211_data *drv;
addra = (unsigned char *)addr;
drv = *(wpa_driver_nl80211_data **)priv;
if (!addr)
addra = drv->perm_addr;
if (linux_set_iface_flags(drv->global->ioctl_sock, (const char *)priv + 32,
... | static int nl80211_set_mac_addr(void *priv, const u8 *addr) {
struct i802_bss *bss = priv;
struct wpa_driver_nl80211_data *drv = bss->drv;
int new_addr = addr != NULL;
if (TEST_FAIL())
return -1;
if (!addr)
addr = drv->perm_addr;
if (linux_set_iface_flags(drv->global->ioctl_sock, bss->ifname, 0) ... | nl80211_set_mac_addr | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int nl80211_set_mode(wpa_driver_nl80211_data *drv, int ifindex,
nl80211_iftype mode) {
const char *v3;
char *v5;
int ret;
nl_msg *msg;
ret = -105;
v3 = nl80211_iftype_str(mode);
wpa_printf(2, "nl80211: Set mode ifindex %d iftype %d (%s)", ifindex, mode,
v3);
msg = nl80... | static int nl80211_set_mode(struct wpa_driver_nl80211_data *drv, int ifindex,
enum nl80211_iftype mode) {
struct nl_msg *msg;
int ret = -ENOBUFS;
wpa_printf(MSG_DEBUG, "nl80211: Set mode ifindex %d iftype %d (%s)", ifindex,
mode, nl80211_iftype_str(mode));
msg = nl8021... | nl80211_set_mode | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int nl80211_set_multicast_to_unicast(i802_bss *bss, int multicast_to_unicast) {
const char *v3;
char *v4;
const char *v5;
int ret;
wpa_driver_nl80211_data *drv;
nl_msg *msg;
drv = bss->drv;
msg = nl80211_bss_msg(bss, 0, 0x79u);
if (!msg || multicast_to_unicast && (unsigned int)nla_put_flag(msg, 244))... | static int nl80211_set_multicast_to_unicast(struct i802_bss *bss,
int multicast_to_unicast) {
struct wpa_driver_nl80211_data *drv = bss->drv;
struct nl_msg *msg;
int ret;
msg = nl80211_bss_msg(bss, 0, NL80211_CMD_SET_MULTICAST_TO_UNICAST);
if (!msg || (multicast_to... | nl80211_set_multicast_to_unicast | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int nl80211_set_p2p_powersave(void *priv, int legacy_ps, int opp_ps,
int ctwindow) {
wpa_printf(2,
"nl80211: set_p2p_powersave (legacy_ps=%d opp_ps=%d ctwindow=%d)",
legacy_ps, opp_ps, ctwindow);
if (opp_ps != -1 || ctwindow != -1)
return -1;
if (legacy_... | static int nl80211_set_p2p_powersave(void *priv, int legacy_ps, int opp_ps,
int ctwindow) {
struct i802_bss *bss = priv;
wpa_printf(MSG_DEBUG,
"nl80211: set_p2p_powersave (legacy_ps=%d "
"opp_ps=%d ctwindow=%d)",
legacy_ps, opp_ps, ctwindo... | nl80211_set_p2p_powersave | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int nl80211_set_p2pdev(i802_bss *bss, int start) {
uint8_t v2;
char *v3;
const char *v4;
int ret;
nl_msg *msg;
if (start)
v2 = 89;
else
v2 = 90;
msg = nl80211_cmd_msg(bss, 0, v2);
ret = send_and_recv_msgs(bss->drv, msg, 0, 0, 0, 0);
v3 = strerror(-ret);
if (start)
v4 = "Start";
else... | static int nl80211_set_p2pdev(struct i802_bss *bss, int start) {
struct nl_msg *msg;
int ret;
msg = nl80211_cmd_msg(bss, 0,
start ? NL80211_CMD_START_P2P_DEVICE
: NL80211_CMD_STOP_P2P_DEVICE);
ret = send_and_recv_msgs(bss->drv, msg, NULL, NULL, NULL, NULL);... | nl80211_set_p2pdev | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int nl80211_set_param(void *priv, const char *param) {
u64 flags;
wpa_driver_nl80211_data *drv;
drv = *(wpa_driver_nl80211_data **)priv;
if (!param)
return 0;
wpa_printf(2, "nl80211: driver param='%s'", param);
if (strstr(param, "use_monitor=1"))
*((_BYTE *)drv + 825) |= 1u;
if (strstr(param, "fo... | static int nl80211_set_param(void *priv, const char *param) {
struct i802_bss *bss = priv;
struct wpa_driver_nl80211_data *drv = bss->drv;
if (param == NULL)
return 0;
wpa_printf(MSG_DEBUG, "nl80211: driver param='%s'", param);
#ifdef CONFIG_P2P
if (os_strstr(param, "use_p2p_group_interface=1")) {
w... | nl80211_set_param | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int nl80211_set_pmk(wpa_driver_nl80211_data *drv, const u8 *key, size_t key_len,
const u8 *addr) {
char *v5;
const u8 *addra;
int ret;
nl_msg *msg;
addra = addr;
if (addr || !drv->associated) {
if (!addr)
return -1;
} else {
addra = drv->bssid;
}
wpa_printf(2,
... | static int nl80211_set_pmk(struct wpa_driver_nl80211_data *drv, const u8 *key,
size_t key_len, const u8 *addr) {
struct nl_msg *msg = NULL;
int ret;
if (!addr && drv->associated)
addr = drv->bssid;
else if (!addr)
return -1;
wpa_printf(MSG_DEBUG, "nl80211: Set PMK to the d... | nl80211_set_pmk | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int nl80211_set_power_save(i802_bss *bss, int enabled) {
char *v3;
const char *v4;
int ret;
nl_msg *msg;
msg = nl80211_bss_msg(bss, 0, 0x3Du);
if (msg && !nla_put_u32(msg, 93, enabled != 0)) {
ret = send_and_recv_msgs(bss->drv, msg, 0, 0, 0, 0);
if (ret < 0) {
v3 = strerror(-ret);
if (e... | static int nl80211_set_power_save(struct i802_bss *bss, int enabled) {
struct nl_msg *msg;
int ret;
if (!(msg = nl80211_bss_msg(bss, 0, NL80211_CMD_SET_POWER_SAVE)) ||
nla_put_u32(msg, NL80211_ATTR_PS_STATE,
enabled ? NL80211_PS_ENABLED : NL80211_PS_DISABLED)) {
nlmsg_free(msg);
r... | nl80211_set_power_save | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int nl80211_set_qos_map(void *priv, const u8 *qos_map_set, u8 qos_map_set_len) {
int ret;
wpa_driver_nl80211_data *drv;
nl_msg *msg;
drv = *(wpa_driver_nl80211_data **)priv;
wpa_hexdump(2, "nl80211: Setting QoS Map", qos_map_set, qos_map_set_len);
msg = nl80211_drv_msg(drv, 0, 0x68u);
if (msg && !(unsign... | static int nl80211_set_qos_map(void *priv, const u8 *qos_map_set,
u8 qos_map_set_len) {
struct i802_bss *bss = priv;
struct wpa_driver_nl80211_data *drv = bss->drv;
struct nl_msg *msg;
int ret;
wpa_hexdump(MSG_DEBUG, "nl80211: Setting QoS Map", qos_map_set,
qos_ma... | nl80211_set_qos_map | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int nl80211_set_regulatory_flags(wpa_driver_nl80211_data *drv,
phy_info_arg *results) {
nl_msg *msg;
msg = (nl_msg *)nlmsg_alloc(drv, (const char *)results);
if (!msg)
return -12;
nl80211_cmd(drv, msg, 0, 0x1Fu);
if ((drv->capa.flags & 0x80000000000000LL) == 0 ||
!n... | static int nl80211_set_regulatory_flags(struct wpa_driver_nl80211_data *drv,
struct phy_info_arg *results) {
struct nl_msg *msg;
msg = nlmsg_alloc();
if (!msg)
return -ENOMEM;
nl80211_cmd(drv, msg, 0, NL80211_CMD_GET_REG);
if (drv->capa.flags & WPA_DRIVER_FLAGS_SE... | nl80211_set_regulatory_flags | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void nl80211_set_rekey_info(void *priv, const u8 *kek, size_t kek_len,
const u8 *kck, size_t kck_len,
const u8 *replay_ctr) {
unsigned int kek_lena;
wpa_driver_nl80211_data *drv;
nl_msg *msg;
nlattr *replay_nested;
kek_lena = kek_len;
drv = *(wpa_driv... | static void nl80211_set_rekey_info(void *priv, const u8 *kek, size_t kek_len,
const u8 *kck, size_t kck_len,
const u8 *replay_ctr) {
struct i802_bss *bss = priv;
struct wpa_driver_nl80211_data *drv = bss->drv;
struct nlattr *replay_nested;
st... | nl80211_set_rekey_info | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void nl80211_set_vht_mode(hostapd_hw_modes *mode, int start, int end,
int max_bw) {
int flag;
int v5;
int v6;
int v7;
int c;
hostapd_channel_data *chan;
for (c = 0; c < mode->num_channels; ++c) {
chan = &mode->channels[c];
if (start < chan->freq - 9 && end > chan->freq +... | static void nl80211_set_vht_mode(struct hostapd_hw_modes *mode, int start,
int end, int max_bw) {
int c;
for (c = 0; c < mode->num_channels; c++) {
struct hostapd_channel_data *chan = &mode->channels[c];
if (chan->freq - 10 >= start && chan->freq + 70 <= end)
chan->fl... | nl80211_set_vht_mode | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int nl80211_set_wowlan(void *priv, const wowlan_triggers *triggers) {
int ret;
wpa_driver_nl80211_data *drv;
nl_msg *msg;
nlattr *wowlan_triggers;
drv = *(wpa_driver_nl80211_data **)priv;
wpa_printf(2, "nl80211: Setting wowlan");
msg = nl80211_cmd_msg((i802_bss *)priv, 0, 0x4Au);
if (!msg || (wowlan_tr... | static int nl80211_set_wowlan(void *priv,
const struct wowlan_triggers *triggers) {
struct i802_bss *bss = priv;
struct wpa_driver_nl80211_data *drv = bss->drv;
struct nl_msg *msg;
struct nlattr *wowlan_triggers;
int ret;
wpa_printf(MSG_DEBUG, "nl80211: Setting wowlan");
if... | nl80211_set_wowlan | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int nl80211_setup_ap(i802_bss *bss) {
wpa_driver_nl80211_data *drv;
drv = bss->drv;
wpa_printf(2, "nl80211: Setup AP(%s) - device_ap_sme=%d use_monitor=%d",
bss->ifname, (*((_BYTE *)bss->drv + 824) & 8) != 0,
*((_BYTE *)bss->drv + 825) & 1);
if ((*((_BYTE *)drv + 824) & 8) == 0)
w... | static int nl80211_setup_ap(struct i802_bss *bss) {
struct wpa_driver_nl80211_data *drv = bss->drv;
wpa_printf(MSG_DEBUG,
"nl80211: Setup AP(%s) - device_ap_sme=%d use_monitor=%d",
bss->ifname, drv->device_ap_sme, drv->use_monitor);
if (!drv->device_ap_sme)
wpa_driver_nl80211_probe... | nl80211_setup_ap | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int nl80211_signal_monitor(void *priv, int threshold, int hysteresis) {
wpa_driver_nl80211_data *drv;
nl_msg *msg;
nlattr *cqm;
drv = *(wpa_driver_nl80211_data **)priv;
wpa_printf(2, "nl80211: Signal monitor threshold=%d hysteresis=%d", threshold,
hysteresis);
msg = nl80211_bss_msg((i802_bss *... | static int nl80211_signal_monitor(void *priv, int threshold, int hysteresis) {
struct i802_bss *bss = priv;
struct wpa_driver_nl80211_data *drv = bss->drv;
struct nl_msg *msg;
struct nlattr *cqm;
wpa_printf(MSG_DEBUG,
"nl80211: Signal monitor threshold=%d "
"hysteresis=%d",
... | nl80211_signal_monitor | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int nl80211_signal_poll(void *priv, wpa_signal_info *si_0) {
int res;
int resa;
wpa_driver_nl80211_data *drv;
drv = *(wpa_driver_nl80211_data **)priv;
memset(si_0, 0, sizeof(wpa_signal_info));
res = nl80211_get_link_signal(drv, si_0);
if (res) {
if (drv->nlmode != nl80211_iftype_NL80211_IFTYPE_ADHOC ... | static int nl80211_signal_poll(void *priv, struct wpa_signal_info *si) {
struct i802_bss *bss = priv;
struct wpa_driver_nl80211_data *drv = bss->drv;
int res;
os_memset(si, 0, sizeof(*si));
res = nl80211_get_link_signal(drv, si);
if (res) {
if (drv->nlmode != NL80211_IFTYPE_ADHOC &&
drv->nlmode... | nl80211_signal_poll | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void nl80211_spurious_frame(i802_bss *bss, nlattr **tb, int wds) {
wpa_driver_nl80211_data *drv;
wpa_event_data event;
unsigned long v6;
v6 = __readfsqword(0x28u);
drv = bss->drv;
if (tb[6]) {
memset(&event, 0, sizeof(event));
event.disassoc_info.addr = bss->addr;
event.ft_ies.ies_len = nla_dat... | static void nl80211_spurious_frame(struct i802_bss *bss, struct nlattr **tb,
int wds) {
struct wpa_driver_nl80211_data *drv = bss->drv;
union wpa_event_data event;
if (!tb[NL80211_ATTR_MAC])
return;
os_memset(&event, 0, sizeof(event));
event.rx_from_unknown.bssid = bss... | nl80211_spurious_frame | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void nl80211_sta_opmode_change_event(wpa_driver_nl80211_data *drv,
nlattr **tb) {
unsigned char u8;
wpa_event_data ed;
unsigned long v4;
v4 = __readfsqword(0x28u);
if (!tb[6] || !tb[159] && !tb[213] && !tb[262])
return;
ed.ft_ies.ies_len = 0xA00000004LL;
ed.interf... | static void nl80211_sta_opmode_change_event(struct wpa_driver_nl80211_data *drv,
struct nlattr **tb) {
union wpa_event_data ed;
u8 smps_mode, max_bw;
if (!tb[NL80211_ATTR_MAC] ||
(!tb[NL80211_ATTR_CHANNEL_WIDTH] && !tb[NL80211_ATTR_SMPS_MODE] &&
!tb[NL8021... | nl80211_sta_opmode_change_event | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int nl80211_start_radar_detection(void *priv, hostapd_freq_params *freq) {
char *v3;
int ret;
wpa_driver_nl80211_data *drv;
nl_msg *msg;
drv = *(wpa_driver_nl80211_data **)priv;
wpa_printf(2,
"nl80211: Start radar detection (CAC) %d MHz (ht_enabled=%d, "
"vht_enabled=%d, he_enable... | static int nl80211_start_radar_detection(void *priv,
struct hostapd_freq_params *freq) {
struct i802_bss *bss = priv;
struct wpa_driver_nl80211_data *drv = bss->drv;
struct nl_msg *msg;
int ret;
wpa_printf(MSG_DEBUG,
"nl80211: Start radar detection (CAC) ... | nl80211_start_radar_detection | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void nl80211_stop_ap(wpa_driver_nl80211_data *drv, nlattr **tb) {
wpa_supplicant_event(drv->ctx, wpa_event_type_EVENT_INTERFACE_UNAVAILABLE, 0);
} | static void nl80211_stop_ap(struct wpa_driver_nl80211_data *drv,
struct nlattr **tb) {
wpa_supplicant_event(drv->ctx, EVENT_INTERFACE_UNAVAILABLE, NULL);
} | nl80211_stop_ap | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int nl80211_switch_channel(void *priv, csa_settings *settings) {
const char *v2;
const char *v3;
const char *v4;
char *v6;
u16 csa_c_off_bcn;
u16 csa_c_off_presp;
int ret;
int reta;
int csa_off_len;
int i;
wpa_driver_nl80211_data *drv;
nl_msg *msg;
nlattr *beacon_csa;
drv = *(wpa_driver_nl8... | static int nl80211_switch_channel(void *priv, struct csa_settings *settings) {
struct nl_msg *msg;
struct i802_bss *bss = priv;
struct wpa_driver_nl80211_data *drv = bss->drv;
struct nlattr *beacon_csa;
int ret = -ENOBUFS;
int csa_off_len = 0;
int i;
wpa_printf(
MSG_DEBUG,
"nl80211: Channel... | nl80211_switch_channel | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void nl80211_tdls_oper_event(wpa_driver_nl80211_data *drv, nlattr **tb) {
unsigned char u8;
wpa_event_data data;
unsigned long v4;
v4 = __readfsqword(0x28u);
wpa_printf(2, "nl80211: TDLS operation event");
if (!tb[6] || !tb[138])
return;
memset(&data, 0, sizeof(data));
data.ibss_rsn_start = *(ibss_... | static void nl80211_tdls_oper_event(struct wpa_driver_nl80211_data *drv,
struct nlattr **tb) {
union wpa_event_data data;
wpa_printf(MSG_DEBUG, "nl80211: TDLS operation event");
if (!tb[NL80211_ATTR_MAC] || !tb[NL80211_ATTR_TDLS_OPERATION])
return;
os_memset(&data, 0, ... | nl80211_tdls_oper_event | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void nl80211_teardown_ap(i802_bss *bss) {
wpa_driver_nl80211_data *drv;
drv = bss->drv;
wpa_printf(2, "nl80211: Teardown AP(%s) - device_ap_sme=%d use_monitor=%d",
bss->ifname, (*((_BYTE *)bss->drv + 824) & 8) != 0,
*((_BYTE *)bss->drv + 825) & 1);
if ((*((_BYTE *)drv + 824) & 8) != 0... | static void nl80211_teardown_ap(struct i802_bss *bss) {
struct wpa_driver_nl80211_data *drv = bss->drv;
wpa_printf(MSG_DEBUG,
"nl80211: Teardown AP(%s) - device_ap_sme=%d use_monitor=%d",
bss->ifname, drv->device_ap_sme, drv->use_monitor);
if (drv->device_ap_sme) {
wpa_driver_nl8021... | nl80211_teardown_ap | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int nl80211_tx_control_port(void *priv, const u8 *dest, u16 proto,
const u8 *buf, size_t len, int no_encrypt) {
char *v7;
unsigned int lena;
int ret;
u64 cookie;
i802_bss *bss;
nl_msg *msg;
wpa_driver_nl80211_data *drv;
nl80211_ack_ext_arg ext_arg;
unsigned long v18;
len... | static int nl80211_tx_control_port(void *priv, const u8 *dest, u16 proto,
const u8 *buf, size_t len, int no_encrypt) {
struct nl80211_ack_ext_arg ext_arg;
struct i802_bss *bss = priv;
struct nl_msg *msg;
u64 cookie = 0;
int ret;
wpa_printf(MSG_DEBUG,
"nl80211... | nl80211_tx_control_port | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void nl80211_unmask_11b_rates(i802_bss *bss) {
wpa_driver_nl80211_data *drv;
drv = bss->drv;
if (!is_p2p_net_interface(bss->drv->nlmode) &&
(*((_BYTE *)drv + 824) & 1) != 0) {
wpa_printf(2,
"nl80211: Interface %s mode is for non-P2P, but 11b rates were "
"disabled - re-ena... | static void nl80211_unmask_11b_rates(struct i802_bss *bss) {
struct wpa_driver_nl80211_data *drv = bss->drv;
if (is_p2p_net_interface(drv->nlmode) || !drv->disabled_11b_rates)
return;
wpa_printf(MSG_DEBUG,
"nl80211: Interface %s mode is for non-P2P, but 11b rates were "
"disabled -... | nl80211_unmask_11b_rates | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int nl80211_update_connection_params(void *priv,
wpa_driver_associate_params *params,
wpa_drv_update_connect_params_mask mask) {
char *v4;
char maska;
int ret;
nl80211_auth_type type;
nl_msg *msg;
wpa_driver_nl80211_data *drv;
mask... | static int
nl80211_update_connection_params(void *priv,
struct wpa_driver_associate_params *params,
enum wpa_drv_update_connect_params_mask mask) {
struct i802_bss *bss = priv;
struct wpa_driver_nl80211_data *drv = bss->drv;
struct nl_msg *msg;
i... | nl80211_update_connection_params | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int nl80211_update_dh_ie(void *priv, const u8 *peer_mac, u16 reason_code,
const u8 *ie, size_t ie_len) {
char *v6;
unsigned int ie_lena;
int ret;
wpa_driver_nl80211_data *drv;
nl_msg *msg;
ie_lena = ie_len;
drv = *(wpa_driver_nl80211_data **)priv;
wpa_printf(
2,
"nl... | static int nl80211_update_dh_ie(void *priv, const u8 *peer_mac, u16 reason_code,
const u8 *ie, size_t ie_len) {
int ret;
struct nl_msg *msg;
struct i802_bss *bss = priv;
struct wpa_driver_nl80211_data *drv = bss->drv;
wpa_printf(MSG_DEBUG, "nl80211: Updating DH IE peer: " MACS... | nl80211_update_dh_ie | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void nl80211_update_scan_res_noise(wpa_scan_res *res,
nl80211_noise_info *info) {
unsigned int i;
for (i = 0; res && i < info->count; ++i) {
if (info->freq[i] == res->freq && (res->flags & 2) != 0) {
res->noise = info->noise[i];
res->flags &= ~2u;
}
}
} | static void nl80211_update_scan_res_noise(struct wpa_scan_res *res,
struct nl80211_noise_info *info) {
unsigned int i;
for (i = 0; res && i < info->count; i++) {
if ((int)info->freq[i] != res->freq ||
!(res->flags & WPA_SCAN_NOISE_INVALID))
continue;
... | nl80211_update_scan_res_noise | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int nl80211_vendor_cmd(void *priv, unsigned int vendor_id, unsigned int subcmd,
const u8 *data, size_t data_len, nested_attr nested_attr,
wpabuf *buf) {
unsigned int v7;
unsigned int data_lena;
int nla_flag;
int ret;
wpa_driver_nl80211_data *drv;
nl_msg *msg;
... | static int nl80211_vendor_cmd(void *priv, unsigned int vendor_id,
unsigned int subcmd, const u8 *data,
size_t data_len, enum nested_attr nested_attr,
struct wpabuf *buf) {
struct i802_bss *bss = priv;
struct wpa_driver_nl80211... | nl80211_vendor_cmd | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void nl80211_vendor_event(wpa_driver_nl80211_data *drv, nlattr **tb) {
u32 wiphy;
u32 vendor_id;
u32 subcmd;
int wiphy_idx;
u8 *data;
size_t len;
wiphy = 0;
data = 0;
len = 0;
if (tb[195] && tb[196]) {
vendor_id = nla_get_u32(tb[195]);
subcmd = nla_get_u32(tb[196]);
if (tb[1])
wip... | static void nl80211_vendor_event(struct wpa_driver_nl80211_data *drv,
struct nlattr **tb) {
u32 vendor_id, subcmd, wiphy = 0;
int wiphy_idx;
u8 *data = NULL;
size_t len = 0;
if (!tb[NL80211_ATTR_VENDOR_ID] || !tb[NL80211_ATTR_VENDOR_SUBCMD])
return;
vendor_id = nla_get... | nl80211_vendor_event | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void nl80211_vendor_event_qca(wpa_driver_nl80211_data *drv, u32 subcmd,
u8 *data, size_t len) {
if (subcmd == 1)
wpa_hexdump(2, "nl80211: QCA test event", data, len);
else
wpa_printf(2, "nl80211: Ignore unsupported QCA vendor event %u", subcmd);
} | static void nl80211_vendor_event_qca(struct wpa_driver_nl80211_data *drv,
u32 subcmd, u8 *data, size_t len) {
switch (subcmd) {
case QCA_NL80211_VENDOR_SUBCMD_TEST:
wpa_hexdump(MSG_DEBUG, "nl80211: QCA test event", data, len);
break;
#ifdef CONFIG_DRIVER_NL80211_QCA
ca... | nl80211_vendor_event_qca | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int nl80211_vif_addr(wpa_driver_nl80211_data *drv, u8 *new_addr) {
unsigned int idx;
if (!drv->global)
return -1;
memcpy(new_addr, drv->first_bss->addr, 6u);
for (idx = 0; idx <= 0x3F; ++idx) {
*new_addr = drv->first_bss->addr[0] | 2;
*new_addr ^= 4 * (_BYTE)idx;
if (!nl80211_addr_in_use(drv->g... | static int nl80211_vif_addr(struct wpa_driver_nl80211_data *drv, u8 *new_addr) {
unsigned int idx;
if (!drv->global)
return -1;
os_memcpy(new_addr, drv->first_bss->addr, ETH_ALEN);
for (idx = 0; idx < 64; idx++) {
new_addr[0] = drv->first_bss->addr[0] | 0x02;
new_addr[0] ^= idx << 2;
if (!nl80... | nl80211_vif_addr | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int nl80211_wdev_handler(nl_msg *msg, void *arg) {
long v2;
unsigned int v3;
long v4;
const void *v5;
genlmsghdr *gnlh;
nlattr *tb[302];
unsigned long v9;
v9 = __readfsqword(0x28u);
v2 = nlmsg_hdr(msg);
gnlh = (genlmsghdr *)nlmsg_data(v2);
v3 = genlmsg_attrlen(gnlh, 0);
v4 = genlmsg_attrdata(gn... | static int nl80211_wdev_handler(struct nl_msg *msg, void *arg) {
struct genlmsghdr *gnlh = nlmsg_data(nlmsg_hdr(msg));
struct nlattr *tb[NL80211_ATTR_MAX + 1];
struct wdev_info *wi = arg;
nla_parse(tb, NL80211_ATTR_MAX, genlmsg_attrdata(gnlh, 0),
genlmsg_attrlen(gnlh, 0), NULL);
if (tb[NL80211_AT... | nl80211_wdev_handler | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int nl80211_write_to_file(const char *name, unsigned int val) {
int *v2;
char *v3;
int v5;
int *v6;
char *v7;
int ret;
int reta;
int level;
int fd;
char tmp[136];
unsigned long v13;
v13 = __readfsqword(0x28u);
ret = 0;
fd = open(name, 2);
if (fd >= 0) {
v5 = snprintf(tmp, 0x80u, "%u\n... | static int nl80211_write_to_file(const char *name, unsigned int val) {
int fd, len;
char tmp[128];
int ret = 0;
fd = open(name, O_RDWR);
if (fd < 0) {
int level;
if (errno == ENOENT) {
ret = 0;
level = MSG_DEBUG;
} else {
ret = -1;
level = MSG_ERROR;
}
wpa_printf(... | nl80211_write_to_file | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int nl_add_key(nl_msg *msg, wpa_alg alg, int key_idx, int defkey, const u8 *seq,
size_t seq_len, const u8 *key, size_t key_len) {
unsigned char key_idxa;
u32 suite;
nlattr *key_attr;
key_idxa = key_idx;
key_attr = (nlattr *)nla_nest_start(msg, 80);
if (!key_attr)
return -1;
suite = wpa... | static int nl_add_key(struct nl_msg *msg, enum wpa_alg alg, int key_idx,
int defkey, const u8 *seq, size_t seq_len, const u8 *key,
size_t key_len) {
struct nlattr *key_attr = nla_nest_start(msg, NL80211_ATTR_KEY);
u32 suite;
if (!key_attr)
return -1;
suite = wpa... | nl_add_key | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
nl_sock *nl_create_handle(nl_cb *cb, const char *dbg) {
nl_sock *handle;
handle = (nl_sock *)nl_socket_alloc_cb(cb);
if (handle) {
if ((unsigned int)genl_connect(handle)) {
wpa_printf(5, "nl80211: Failed to connect to generic netlink (%s)", dbg);
nl_socket_free(handle);
return 0;
} else... | static struct nl_sock *nl_create_handle(struct nl_cb *cb, const char *dbg) {
struct nl_sock *handle;
handle = nl_socket_alloc_cb(cb);
if (handle == NULL) {
wpa_printf(MSG_ERROR,
"nl80211: Failed to allocate netlink "
"callbacks (%s)",
dbg);
return NULL;
}
... | nl_create_handle | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void nl_destroy_handles(nl_sock **handle) {
if (*handle) {
nl_socket_free(*handle);
*handle = 0;
}
} | static void nl_destroy_handles(struct nl_sock **handle) {
if (*handle == NULL)
return;
nl_socket_free(*handle);
*handle = NULL;
} | nl_destroy_handles | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int nl_get_multicast_id(nl80211_global *global, const char *family,
const char *group) {
int ret;
nl_msg *msg;
family_data res;
unsigned long v7;
v7 = __readfsqword(0x28u);
res.group = group;
res.id = -2;
msg = (nl_msg *)nlmsg_alloc(global, family);
if (!msg)
return -12;
... | static int nl_get_multicast_id(struct nl80211_global *global,
const char *family, const char *group) {
struct nl_msg *msg;
int ret;
struct family_data res = {group, -ENOENT};
msg = nlmsg_alloc();
if (!msg)
return -ENOMEM;
if (!genlmsg_put(msg, 0, 0, global->nlctrl_id, 0, ... | nl_get_multicast_id | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int no_seq_check(nl_msg *msg, void *arg) { return 0; } | static int no_seq_check(struct nl_msg *msg, void *arg) { return NL_OK; } | no_seq_check | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void none_driver_deinit(void *priv) { free(priv); } | static void none_driver_deinit(void *priv) {
struct none_driver_data *drv = priv;
os_free(drv);
} | none_driver_deinit | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void none_driver_hapd_deinit(void *priv) { free(priv); } | static void none_driver_hapd_deinit(void *priv) {
struct none_driver_data *drv = priv;
os_free(drv);
} | none_driver_hapd_deinit | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void *none_driver_hapd_init(hostapd_data *hapd, wpa_init_params *params) {
none_driver_data *drv;
drv = (none_driver_data *)os_zalloc(0x10u);
if (drv) {
drv->hapd = hapd;
return drv;
} else {
wpa_printf(5, "Could not allocate memory for none driver data");
return 0;
}
} | static void *none_driver_hapd_init(struct hostapd_data *hapd,
struct wpa_init_params *params) {
struct none_driver_data *drv;
drv = os_zalloc(sizeof(struct none_driver_data));
if (drv == NULL) {
wpa_printf(MSG_ERROR, "Could not allocate memory for none "
... | none_driver_hapd_init | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void *none_driver_init(void *ctx, const char *ifname) {
none_driver_data *drv;
drv = (none_driver_data *)os_zalloc(0x10u);
if (drv) {
drv->ctx = ctx;
return drv;
} else {
wpa_printf(5, "Could not allocate memory for none driver data");
return 0;
}
} | static void *none_driver_init(void *ctx, const char *ifname) {
struct none_driver_data *drv;
drv = os_zalloc(sizeof(struct none_driver_data));
if (drv == NULL) {
wpa_printf(MSG_ERROR, "Could not allocate memory for none "
"driver data");
return NULL;
}
drv->ctx = ctx;
ret... | none_driver_init | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void notify_mgmt_frame(hostapd_data *hapd, const u8 *buf, size_t len) {
int hex_len;
char *hex;
hex_len = 2 * len + 1;
hex = (char *)malloc(hex_len);
if (hex) {
wpa_snprintf_hex(hex, hex_len, buf, len);
wpa_msg_ctrl(hapd->msg_ctx, 3, "AP-MGMT-FRAME-RECEIVED buf=%s", hex);
free(hex);
}
} | static void notify_mgmt_frame(struct hostapd_data *hapd, const u8 *buf,
size_t len) {
int hex_len = len * 2 + 1;
char *hex = os_malloc(hex_len);
if (hex) {
wpa_snprintf_hex(hex, hex_len, buf, len);
wpa_msg_ctrl(hapd->msg_ctx, MSG_INFO, AP_MGMT_FRAME_RECEIVED "buf=%s", hex);... | notify_mgmt_frame | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
u32 num_chan_to_bw(int num_chans) {
if ((unsigned int)num_chans <= 8 && ((1LL << num_chans) & 0x114) != 0)
return 20 * num_chans;
else
return 20;
} | u32 num_chan_to_bw(int num_chans) {
switch (num_chans) {
case 2:
case 4:
case 8:
return num_chans * 20;
default:
return 20;
}
} | num_chan_to_bw | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void ocsp_debug_print_resp(OCSP_RESPONSE *rsp_0) {
long v1;
int res;
BIO *out;
size_t rlen;
char *txt;
if (wpa_debug_level <= 2) {
v1 = BIO_s_mem();
out = (BIO *)BIO_new(v1);
if (out) {
OCSP_RESPONSE_print(out, rsp_0, 0);
rlen = BIO_ctrl_pending(out);
txt = (char *)malloc(rlen... | static void ocsp_debug_print_resp(OCSP_RESPONSE *rsp) {
#ifndef CONFIG_NO_STDOUT_DEBUG
BIO *out;
size_t rlen;
char *txt;
int res;
if (wpa_debug_level > MSG_DEBUG)
return;
out = BIO_new(BIO_s_mem());
if (!out)
return;
OCSP_RESPONSE_print(out, rsp, 0);
rlen = BIO_ctrl_pending(out);
txt = os... | ocsp_debug_print_resp | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int ocsp_resp_cb(SSL *s, void *arg) {
const char *v3;
X509 *peer_issuer;
X509 *peer_cert;
long v6;
const char *v7;
const char *v8;
int status;
int reason;
int res;
int len;
const unsigned char *p;
ASN1_GENERALIZEDTIME *produced_at;
ASN1_GENERALIZEDTIME *this_update;
ASN1_GENERALIZEDTIME *nex... | static int ocsp_resp_cb(SSL *s, void *arg) {
struct tls_connection *conn = arg;
const unsigned char *p;
int len, status, reason, res;
OCSP_RESPONSE *rsp;
OCSP_BASICRESP *basic;
OCSP_CERTID *id;
ASN1_GENERALIZEDTIME *produced_at, *this_update, *next_update;
X509_STORE *store;
STACK_OF(X509) *certs = NU... | ocsp_resp_cb | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int ocsp_status_cb(SSL *s, void *arg) {
size_t len;
char *resp;
char *tmp;
unsigned long v6;
v6 = __readfsqword(0x28u);
if (tls_global->ocsp_stapling_response) {
resp = os_readfile(tls_global->ocsp_stapling_response, &len);
if (resp) {
wpa_printf(2, "OpenSSL: OCSP status callback - send cache... | static int ocsp_status_cb(SSL *s, void *arg) {
char *tmp;
char *resp;
size_t len;
if (tls_global->ocsp_stapling_response == NULL) {
wpa_printf(MSG_DEBUG,
"OpenSSL: OCSP status callback - no response configured");
return SSL_TLSEXT_ERR_OK;
}
resp = os_readfile(tls_global->ocsp_stapli... | ocsp_status_cb | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int ocv_derive_all_parameters(oci_info *oci) {
int v2;
const oper_class_map *op_class_map;
oci->freq = ieee80211_chan_to_freq(0, oci->op_class, oci->channel);
if (oci->freq >= 0) {
op_class_map = get_oper_class(0, oci->op_class);
if (op_class_map) {
oci->chanwidth = oper_class_bw_to_int(op_class_... | int ocv_derive_all_parameters(struct oci_info *oci) {
const struct oper_class_map *op_class_map;
oci->freq = ieee80211_chan_to_freq(NULL, oci->op_class, oci->channel);
if (oci->freq < 0) {
wpa_printf(
MSG_INFO,
"Error interpreting OCI: unrecognized opclass/channel pair (%d/%d)",
oci->... | ocv_derive_all_parameters | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int ocv_insert_extended_oci(wpa_channel_info *ci, u8 *pos) {
u8 *v2;
u8 *v3;
u8 *posa;
wpa_channel_info *cia;
cia = ci;
posa = pos + 1;
*pos = -1;
v2 = posa++;
*v2 = 4;
v3 = posa++;
*v3 = 54;
return ocv_insert_oci(cia, &posa);
} | int ocv_insert_extended_oci(struct wpa_channel_info *ci, u8 *pos) {
*pos++ = WLAN_EID_EXTENSION;
*pos++ = 1 + OCV_OCI_LEN;
*pos++ = WLAN_EID_EXT_OCV_OCI;
return ocv_insert_oci(ci, &pos);
} | ocv_insert_extended_oci | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int ocv_insert_oci(wpa_channel_info *ci, u8 **argpos) {
u8 *v3;
u8 *v4;
u8 *v5;
u8 op_class;
u8 channel;
u8 *pos;
unsigned long v9;
v9 = __readfsqword(0x28u);
pos = *argpos;
if (ieee80211_chaninfo_to_channel(ci->frequency, ci->chanwidth,
ci->sec_channel, &op_clas... | int ocv_insert_oci(struct wpa_channel_info *ci, u8 **argpos) {
u8 op_class, channel;
u8 *pos = *argpos;
if (ieee80211_chaninfo_to_channel(ci->frequency, ci->chanwidth,
ci->sec_channel, &op_class, &channel) < 0) {
wpa_printf(MSG_WARNING,
"Cannot determine ope... | ocv_insert_oci | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int ocv_insert_oci_kde(wpa_channel_info *ci, u8 **argpos) {
u8 *v2;
u8 *pos;
pos = *argpos + 1;
**argpos = -35;
v2 = pos++;
*v2 = 7;
WPA_PUT_BE32_5(pos, 0xFAC0Du);
*argpos = pos + 4;
return ocv_insert_oci(ci, argpos);
} | int ocv_insert_oci_kde(struct wpa_channel_info *ci, u8 **argpos) {
u8 *pos = *argpos;
*pos++ = WLAN_EID_VENDOR_SPECIFIC;
*pos++ = RSN_SELECTOR_LEN + 3;
RSN_SELECTOR_PUT(pos, RSN_KEY_DATA_OCI);
pos += RSN_SELECTOR_LEN;
*argpos = pos;
return ocv_insert_oci(ci, argpos);
} | ocv_insert_oci_kde | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int ocv_oci_add(wpa_state_machine *sm, u8 **argpos, unsigned int freq) {
wpa_channel_info ci;
unsigned long v5;
v5 = __readfsqword(0x28u);
if (!wpa_auth_uses_ocv(sm))
return 0;
if (!wpa_channel_info_1(sm->wpa_auth, &ci))
return ocv_insert_oci_kde(&ci, argpos);
wpa_printf(4, "Failed to get channel i... | static int ocv_oci_add(struct wpa_state_machine *sm, u8 **argpos,
unsigned int freq) {
#ifdef CONFIG_OCV
struct wpa_channel_info ci;
if (!wpa_auth_uses_ocv(sm))
return 0;
if (wpa_channel_info(sm->wpa_auth, &ci) != 0) {
wpa_printf(MSG_WARNING, "Failed to get channel info for OCI el... | ocv_oci_add | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int ocv_oci_len(wpa_state_machine *sm) {
if (wpa_auth_uses_ocv(sm))
return 9;
else
return 0;
} | static int ocv_oci_len(struct wpa_state_machine *sm) {
#ifdef CONFIG_OCV
if (wpa_auth_uses_ocv(sm))
return OCV_OCI_KDE_LEN;
#endif
return 0;
} | ocv_oci_len | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
oci_verify_result ocv_verify_tx_params(const u8 *oci_ie, size_t oci_ie_len,
wpa_channel_info *ci, int tx_chanwidth,
int tx_seg1_idx) {
oci_info oci;
unsigned long v10;
v10 = __readfsqword(0x28u);
if (oci_ie) {
if (oci_ie_len == 3... | enum oci_verify_result ocv_verify_tx_params(const u8 *oci_ie, size_t oci_ie_len,
struct wpa_channel_info *ci,
int tx_chanwidth, int tx_seg1_idx) {
struct oci_info oci;
if (!oci_ie) {
os_snprintf(ocv_errorstr, sizeof(ocv_err... | ocv_verify_tx_params | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int omac1_aes_128_vector(const u8 *key, size_t num_elem, const u8 **addr,
const size_t *len, u8 *mac) {
return omac1_aes_vector(key, 0x10u, num_elem, addr, len, mac);
} | int omac1_aes_128_vector(const u8 *key, size_t num_elem, const u8 *addr[],
const size_t *len, u8 *mac) {
return omac1_aes_vector(key, 16, num_elem, addr, len, mac);
} | omac1_aes_128_vector | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int omac1_aes_256(const u8 *key, const u8 *data, size_t data_len, u8 *mac) {
size_t data_lena;
const u8 *dataa;
const u8 *keya;
keya = key;
dataa = data;
data_lena = data_len;
return omac1_aes_vector(key, 0x20u, 1u, &dataa, &data_lena, mac);
} | int omac1_aes_256(const u8 *key, const u8 *data, size_t data_len, u8 *mac) {
return omac1_aes_vector(key, 32, 1, &data, &data_len, mac);
} | omac1_aes_256 | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int op_class_to_bandwidth(u8 op_class) {
int result;
switch (op_class) {
case 0x51u:
case 0x52u:
result = 20;
break;
case 0x53u:
case 0x54u:
result = 40;
break;
case 0x73u:
result = 20;
break;
case 0x74u:
case 0x75u:
result = 40;
break;
case 0x76u:
result = 20;
... | int op_class_to_bandwidth(u8 op_class) {
switch (op_class) {
case 81:
case 82:
return 20;
case 83:
case 84:
return 40;
case 115:
return 20;
case 116:
case 117:
return 40;
case 118:
return 20;
case 119:
case 120:
return 40;
case 121:
return 20;
case 122:
case 123:
... | op_class_to_bandwidth | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int op_class_to_ch_width(u8 op_class) {
int result;
switch (op_class) {
case 0x51u:
case 0x52u:
result = 0;
break;
case 0x53u:
case 0x54u:
result = 0;
break;
case 0x73u:
result = 0;
break;
case 0x74u:
case 0x75u:
result = 0;
break;
case 0x76u:
result = 0;
bre... | int op_class_to_ch_width(u8 op_class) {
switch (op_class) {
case 81:
case 82:
return CHANWIDTH_USE_HT;
case 83:
case 84:
return CHANWIDTH_USE_HT;
case 115:
return CHANWIDTH_USE_HT;
case 116:
case 117:
return CHANWIDTH_USE_HT;
case 118:
return CHANWIDTH_USE_HT;
case 119:
case 12... | op_class_to_ch_width | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int openssl_cert_tod(X509 *cert) {
stack_index_t i;
int tod;
CERTIFICATEPOLICIES *ext;
POLICYINFO *policy;
char buf[104];
unsigned long v7;
v7 = __readfsqword(0x28u);
tod = 0;
ext = (CERTIFICATEPOLICIES *)X509_get_ext_d2i(cert, 89, 0, 0);
if (!ext)
return 0;
for (i = 0; i < sk_POLICYINFO_num(... | static int openssl_cert_tod(X509 *cert) {
CERTIFICATEPOLICIES *ext;
stack_index_t i;
char buf[100];
int res;
int tod = 0;
ext = X509_get_ext_d2i(cert, NID_certificate_policies, NULL, NULL);
if (!ext)
return 0;
for (i = 0; i < sk_POLICYINFO_num(ext); i++) {
POLICYINFO *policy;
policy = sk_... | openssl_cert_tod | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
wpabuf *openssl_connection_handshake(tls_connection *conn,
const wpabuf *in_data,
wpabuf **appl_data) {
int v4;
size_t v5;
wpabuf *out_data;
char *buf;
if (appl_data)
*appl_data = 0;
out_data = openssl_handshake(conn, in_data);
... | static struct wpabuf *openssl_connection_handshake(struct tls_connection *conn,
const struct wpabuf *in_data,
struct wpabuf **appl_data) {
struct wpabuf *out_data;
if (appl_data)
*appl_data = NULL;
out_data... | openssl_connection_handshake | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
const char *openssl_content_type(int content_type) {
const char *result;
if (content_type == 257)
return "inner content type";
if (content_type > 257)
return "?";
if (content_type > 24) {
if (content_type == 256)
return "TLS header info";
return "?";
}
if (content_type < 20)
retur... | static const char *openssl_content_type(int content_type) {
switch (content_type) {
case 20:
return "change cipher spec";
case 21:
return "alert";
case 22:
return "handshake";
case 23:
return "application data";
case 24:
return "heartbeat";
case 256:
return "TLS header info";
cas... | openssl_content_type | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void openssl_debug_dump_certificate(int i, X509 *cert) {
long subject_name;
size_t v3;
const u8 *v4;
const char *v5;
ASN1_INTEGER *ser;
EVP_PKEY *pkey;
char serial_num[128];
char buf[264];
unsigned long v10;
v10 = __readfsqword(0x28u);
if (cert) {
subject_name = X509_get_subject_name(cert);
... | static void openssl_debug_dump_certificate(int i, X509 *cert) {
char buf[256];
EVP_PKEY *pkey;
ASN1_INTEGER *ser;
char serial_num[128];
if (!cert)
return;
X509_NAME_oneline(X509_get_subject_name(cert), buf, sizeof(buf));
ser = X509_get_serialNumber(cert);
if (ser)
wpa_snprintf_hex_uppercase(s... | openssl_debug_dump_certificate | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void openssl_debug_dump_certificate_chains(SSL_CTX *ssl_ctx) {
int res;
for (res = SSL_CTX_ctrl(ssl_ctx, 117, 1, 0); res == 1;
res = SSL_CTX_ctrl(ssl_ctx, 117, 2, 0))
openssl_debug_dump_certificates(ssl_ctx);
SSL_CTX_ctrl(ssl_ctx, 117, 1, 0);
} | static void openssl_debug_dump_certificate_chains(SSL_CTX *ssl_ctx) {
#if !defined(LIBRESSL_VERSION_NUMBER) && !defined(BORINGSSL_API_VERSION)
int res;
for (res = SSL_CTX_set_current_cert(ssl_ctx, SSL_CERT_SET_FIRST); res == 1;
res = SSL_CTX_set_current_cert(ssl_ctx, SSL_CERT_SET_NEXT))
openssl_debug_du... | openssl_debug_dump_certificate_chains | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void openssl_debug_dump_certificates(SSL_CTX *ssl_ctx) {
X509 *v1;
X509 *v2;
int i;
stack_st_X509 *certs[2];
certs[1] = (stack_st_X509 *)__readfsqword(0x28u);
wpa_printf(2, "OpenSSL: Configured certificate chain");
if (SSL_CTX_ctrl(ssl_ctx, 115, 0, certs) == 1) {
for (i = sk_X509_num(certs[0]); i > 0... | static void openssl_debug_dump_certificates(SSL_CTX *ssl_ctx) {
STACK_OF(X509) * certs;
wpa_printf(MSG_DEBUG, "OpenSSL: Configured certificate chain");
if (SSL_CTX_get0_chain_certs(ssl_ctx, &certs) == 1) {
int i;
for (i = sk_X509_num(certs); i > 0; i--)
openssl_debug_dump_certificate(i, sk_X509_va... | openssl_debug_dump_certificates | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void openssl_debug_dump_cipher_list(SSL_CTX *ssl_ctx) {
unsigned int i;
SSL *ssl;
const char *cipher;
ssl = (SSL *)SSL_new(ssl_ctx);
if (ssl) {
wpa_printf(2, "OpenSSL: Enabled cipher suites in priority order");
for (i = 0;; ++i) {
cipher = (const char *)SSL_get_cipher_list(ssl, i);
if (!c... | static void openssl_debug_dump_cipher_list(SSL_CTX *ssl_ctx) {
SSL *ssl;
int i;
ssl = SSL_new(ssl_ctx);
if (!ssl)
return;
wpa_printf(MSG_DEBUG, "OpenSSL: Enabled cipher suites in priority order");
for (i = 0;; i++) {
const char *cipher;
cipher = SSL_get_cipher_list(ssl, i);
if (!cipher)
... | openssl_debug_dump_cipher_list | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void openssl_debug_dump_ctx(SSL_CTX *ssl_ctx) {
openssl_debug_dump_cipher_list(ssl_ctx);
openssl_debug_dump_certificate_chains(ssl_ctx);
} | static void openssl_debug_dump_ctx(SSL_CTX *ssl_ctx) {
openssl_debug_dump_cipher_list(ssl_ctx);
openssl_debug_dump_certificate_chains(ssl_ctx);
} | openssl_debug_dump_ctx | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
wpabuf *openssl_get_appl_data(tls_connection *conn, size_t max_len) {
unsigned int v3;
void *v4;
int res;
int err;
wpabuf *appl_data;
appl_data = wpabuf_alloc(max_len + 100);
if (!appl_data)
return 0;
v3 = wpabuf_size_0(appl_data);
v4 = wpabuf_mhead_10(appl_data);
res = SSL_read(conn->ssl, v4, ... | static struct wpabuf *openssl_get_appl_data(struct tls_connection *conn,
size_t max_len) {
struct wpabuf *appl_data;
int res;
appl_data = wpabuf_alloc(max_len + 100);
if (appl_data == NULL)
return NULL;
res = SSL_read(conn->ssl, wpabuf_mhead(appl_data), wpabuf... | openssl_get_appl_data | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int openssl_get_keyblock_size(SSL *ssl) {
long v2;
long v3;
int mac_key_len;
int fixed_iv_len;
int cipher;
int digest;
int enc_key_len;
const SSL_CIPHER *ssl_cipher;
const EVP_CIPHER *c;
const EVP_MD *h;
ssl_cipher = (const SSL_CIPHER *)SSL_get_current_cipher(ssl);
if (!ssl_cipher)
return -... | static int openssl_get_keyblock_size(SSL *ssl) {
#if OPENSSL_VERSION_NUMBER < 0x10100000L || \
(defined(LIBRESSL_VERSION_NUMBER) && \
LIBRESSL_VERSION_NUMBER < 0x20700000L)
const EVP_CIPHER *c;
const EVP_MD *h;
int md_size;
if (s... | openssl_get_keyblock_size | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
wpabuf *openssl_handshake(tls_connection *conn, const wpabuf *in_data) {
unsigned int v2;
const void *v3;
long current_cipher;
const char *name;
void *v7;
int v8;
unsigned int res;
int resa;
int err;
tls_context *context;
wpabuf *out_data;
tls_event_data_0 ev;
unsigned long v15;
v15 = __rea... | static struct wpabuf *openssl_handshake(struct tls_connection *conn,
const struct wpabuf *in_data) {
int res;
struct wpabuf *out_data;
if (in_data && wpabuf_len(in_data) > 0 &&
BIO_write(conn->ssl_in, wpabuf_head(in_data), wpabuf_len(in_data)) < 0) {
tls_show_err... | openssl_handshake | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
const char *openssl_handshake_type(int content_type, const u8 *buf,
size_t len) {
const char *result;
if (content_type == 257 && buf && len == 1)
return openssl_content_type(*buf);
if (content_type != 22 || !buf || !len)
return (const char *)&unk_1FA6D0;
if (*buf > 0x... | static const char *openssl_handshake_type(int content_type, const u8 *buf,
size_t len) {
if (content_type == 257 && buf && len == 1)
return openssl_content_type(buf[0]);
if (content_type != 22 || !buf || len == 0)
return "";
switch (buf[0]) {
case 0:
return ... | openssl_handshake_type | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
const char *openssl_pkey_type_str(const EVP_PKEY *pkey) {
unsigned int v2;
int v3;
if (!pkey)
return "NULL";
v2 = EVP_PKEY_id(pkey);
v3 = EVP_PKEY_type(v2);
if (v3 == 408)
return "EC";
if (v3 > 408)
return "?";
if (v3 == 116)
return "DSA";
if (v3 > 116)
return "?";
if (v3 == 6)
... | static const char *openssl_pkey_type_str(const EVP_PKEY *pkey) {
if (!pkey)
return "NULL";
switch (EVP_PKEY_type(EVP_PKEY_id(pkey))) {
case EVP_PKEY_RSA:
return "RSA";
case EVP_PKEY_DSA:
return "DSA";
case EVP_PKEY_DH:
return "DH";
case EVP_PKEY_EC:
return "EC";
}
return "?";
} | openssl_pkey_type_str | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void openssl_tls_cert_event(tls_connection *conn, X509 *err_cert, int depth,
const char *subject) {
size_t v4;
const u8 *v5;
int v6;
int type;
int alt;
int alta;
int num_altsubject;
stack_index_t i;
wpabuf *cert;
char *pos;
tls_context *context;
ASN1_INTEGER *ser;
c... | static void openssl_tls_cert_event(struct tls_connection *conn, X509 *err_cert,
int depth, const char *subject) {
struct wpabuf *cert = NULL;
union tls_event_data ev;
struct tls_context *context = conn->context;
char *altsubject[TLS_MAX_ALT_SUBJECT];
int alt, num_altsubject ... | openssl_tls_cert_event | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void openssl_tls_fail_event(tls_connection *conn, X509 *err_cert, int err,
int depth, const char *subject, const char *err_str,
tls_fail_reason reason) {
tls_fail_reason v7;
wpabuf *cert;
tls_context *context;
tls_event_data_0 ev;
unsigned long v15;
v... | static void openssl_tls_fail_event(struct tls_connection *conn, X509 *err_cert,
int err, int depth, const char *subject,
const char *err_str,
enum tls_fail_reason reason) {
union tls_event_data ev;
struct wpabuf... | openssl_tls_fail_event | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.