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 |
|---|---|---|---|---|---|---|---|
void ap_ap_hash_del(hostapd_iface *iface, ap_info *ap) {
ap_info *s;
s = iface->ap_hash[ap->addr[5]];
if (s) {
if (!memcmp(s->addr, ap->addr, 6u)) {
iface->ap_hash[ap->addr[5]] = s->hnext;
} else {
while (s->hnext && memcmp(s->hnext->addr, ap->addr, 6u))
s = s->hnext;
if (s->hne... | static void ap_ap_hash_del(struct hostapd_iface *iface, struct ap_info *ap) {
struct ap_info *s;
s = iface->ap_hash[STA_HASH(ap->addr)];
if (s == NULL)
return;
if (os_memcmp(s->addr, ap->addr, ETH_ALEN) == 0) {
iface->ap_hash[STA_HASH(ap->addr)] = s->hnext;
return;
}
while (s->hnext != NULL &&... | ap_ap_hash_del | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void ap_ap_list_add(hostapd_iface *iface, ap_info *ap) {
if (iface->ap_list) {
ap->prev = iface->ap_list->prev;
iface->ap_list->prev = ap;
} else {
ap->prev = ap;
}
ap->next = iface->ap_list;
iface->ap_list = ap;
} | static void ap_ap_list_add(struct hostapd_iface *iface, struct ap_info *ap) {
if (iface->ap_list) {
ap->prev = iface->ap_list->prev;
iface->ap_list->prev = ap;
} else
ap->prev = ap;
ap->next = iface->ap_list;
iface->ap_list = ap;
} | ap_ap_list_add | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void ap_ap_list_del(hostapd_iface *iface, ap_info *ap) {
if (ap == iface->ap_list)
iface->ap_list = ap->next;
else
ap->prev->next = ap->next;
if (ap->next) {
ap->next->prev = ap->prev;
} else if (iface->ap_list) {
iface->ap_list->prev = ap->prev;
}
} | static void ap_ap_list_del(struct hostapd_iface *iface, struct ap_info *ap) {
if (iface->ap_list == ap)
iface->ap_list = ap->next;
else
ap->prev->next = ap->next;
if (ap->next)
ap->next->prev = ap->prev;
else if (iface->ap_list)
iface->ap_list->prev = ap->prev;
} | ap_ap_list_del | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int ap_check_sa_query_timeout(hostapd_data *hapd, sta_info *sta) {
os_reltime now;
os_reltime passed;
unsigned long v5;
v5 = __readfsqword(0x28u);
os_get_reltime(&now);
os_reltime_sub_2(&now, &sta->sa_query_start, &passed);
if ((unsigned int)((1000000 * passed.sec + passed.usec) / 1024) <=
hapd->co... | int ap_check_sa_query_timeout(struct hostapd_data *hapd, struct sta_info *sta) {
u32 tu;
struct os_reltime now, passed;
os_get_reltime(&now);
os_reltime_sub(&now, &sta->sa_query_start, &passed);
tu = (passed.sec * 1000000 + passed.usec) / 1024;
if (hapd->conf->assoc_sa_query_max_timeout < tu) {
hostapd_... | ap_check_sa_query_timeout | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void ap_copy_sta_supp_op_classes(sta_info *sta, const u8 *supp_op_classes,
size_t supp_op_classes_len) {
if (supp_op_classes) {
free(sta->supp_op_classes);
sta->supp_op_classes = (u8 *)malloc(supp_op_classes_len + 1);
if (sta->supp_op_classes) {
*sta->supp_op_classes... | void ap_copy_sta_supp_op_classes(struct sta_info *sta,
const u8 *supp_op_classes,
size_t supp_op_classes_len) {
if (!supp_op_classes)
return;
os_free(sta->supp_op_classes);
sta->supp_op_classes = os_malloc(1 + supp_op_classes_len);
if (!sta->... | ap_copy_sta_supp_op_classes | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int ap_for_each_sta(hostapd_data *hapd,
int (*cb)(hostapd_data *, sta_info *, void *), void *ctx) {
sta_info *sta;
for (sta = hapd->sta_list; sta; sta = sta->next) {
if (cb(hapd, sta, ctx))
return 1;
}
return 0;
} | int ap_for_each_sta(struct hostapd_data *hapd,
int (*cb)(struct hostapd_data *hapd, struct sta_info *sta,
void *ctx),
void *ctx) {
struct sta_info *sta;
for (sta = hapd->sta_list; sta; sta = sta->next) {
if (cb(hapd, sta, ctx))
return ... | ap_for_each_sta | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void ap_free_ap(hostapd_iface *iface, ap_info *ap) {
ap_ap_hash_del(iface, ap);
ap_ap_list_del(iface, ap);
--iface->num_ap;
free(ap);
} | static void ap_free_ap(struct hostapd_iface *iface, struct ap_info *ap) {
ap_ap_hash_del(iface, ap);
ap_ap_list_del(iface, ap);
iface->num_ap--;
os_free(ap);
} | ap_free_ap | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void ap_free_sta(hostapd_data *hapd, sta_info *sta) {
int set_beacon;
int i;
set_beacon = 0;
accounting_sta_stop(hapd, sta);
ap_sta_set_authorized(hapd, sta, 0);
hostapd_set_sta_flags(hapd, sta);
if ((sta->flags & 0x804000) != 0)
hostapd_set_wds_sta(hapd, 0, sta->addr, sta->aid, 0);
if (sta->ipaddr... | void ap_free_sta(struct hostapd_data *hapd, struct sta_info *sta) {
int set_beacon = 0;
accounting_sta_stop(hapd, sta);
ap_sta_set_authorized(hapd, sta, 0);
hostapd_set_sta_flags(hapd, sta);
if (sta->flags & (WLAN_STA_WDS | WLAN_STA_MULTI_AP))
hostapd_set_wds_sta(hapd, NULL, sta->addr, sta->aid, 0);
... | ap_free_sta | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
ap_info *ap_get_ap(hostapd_iface *iface, const u8 *ap) {
ap_info *s;
for (s = iface->ap_hash[ap[5]]; s && memcmp(s->addr, ap, 6u); s = s->hnext)
;
return s;
} | static struct ap_info *ap_get_ap(struct hostapd_iface *iface, const u8 *ap) {
struct ap_info *s;
s = iface->ap_hash[STA_HASH(ap)];
while (s != NULL && os_memcmp(s->addr, ap, ETH_ALEN) != 0)
s = s->hnext;
return s;
} | ap_get_ap | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
sta_info *ap_get_sta(hostapd_data *hapd, const u8 *sta) {
sta_info *s;
for (s = hapd->sta_hash[sta[5]]; s && memcmp(s->addr, sta, 6u); s = s->hnext)
;
return s;
} | struct sta_info *ap_get_sta(struct hostapd_data *hapd, const u8 *sta) {
struct sta_info *s;
s = hapd->sta_hash[STA_HASH(sta)];
while (s != NULL && os_memcmp(s->addr, sta, 6) != 0)
s = s->hnext;
return s;
} | ap_get_sta | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void ap_handle_session_timer(void *eloop_ctx, void *timeout_ctx) {
wpa_printf(2, "%s: Session timer for STA %02x:%02x:%02x:%02x:%02x:%02x",
*((const char **)eloop_ctx + 2),
*((unsigned char *)timeout_ctx + 16),
*((unsigned char *)timeout_ctx + 17),
*((unsigned char ... | static void ap_handle_session_timer(void *eloop_ctx, void *timeout_ctx) {
struct hostapd_data *hapd = eloop_ctx;
struct sta_info *sta = timeout_ctx;
wpa_printf(MSG_DEBUG, "%s: Session timer for STA " MACSTR, hapd->conf->iface,
MAC2STR(sta->addr));
if (!(sta->flags & (WLAN_STA_AUTH | WLAN_STA_ASSOC... | ap_handle_session_timer | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void ap_handle_session_warning_timer(void *eloop_ctx, void *timeout_ctx) {
wpa_printf(
2,
"%s: WNM: Session warning time reached for %02x:%02x:%02x:%02x:%02x:%02x",
*((const char **)eloop_ctx + 2), *((unsigned char *)timeout_ctx + 16),
*((unsigned char *)timeout_ctx + 17),
*((unsigned ch... | static void ap_handle_session_warning_timer(void *eloop_ctx,
void *timeout_ctx) {
#ifdef CONFIG_WNM_AP
struct hostapd_data *hapd = eloop_ctx;
struct sta_info *sta = timeout_ctx;
wpa_printf(MSG_DEBUG, "%s: WNM: Session warning time reached for " MACSTR,
hap... | ap_handle_session_warning_timer | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void ap_handle_timer(void *eloop_ctx, void *timeout_ctx) {
int v2;
const char *v3;
int v4;
unsigned int v5;
short v6;
_BOOL4 deauth;
int fuzz;
int inactive_sec;
u16 reason;
unsigned long next_time;
next_time = 0;
wpa_printf(2,
"%s: %s: %02x:%02x:%02x:%02x:%02x:%02x flags=0x%x timeo... | void ap_handle_timer(void *eloop_ctx, void *timeout_ctx) {
struct hostapd_data *hapd = eloop_ctx;
struct sta_info *sta = timeout_ctx;
unsigned long next_time = 0;
int reason;
wpa_printf(MSG_DEBUG, "%s: %s: " MACSTR " flags=0x%x timeout_next=%d",
hapd->conf->iface, __func__, MAC2STR(sta->addr), s... | ap_handle_timer | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void ap_ht2040_timeout(void *eloop_data, void *user_data) {
wpa_printf(3, "Switching to 40 MHz operation");
*(_DWORD *)(*((_QWORD *)eloop_data + 3) + 336LL) =
*((_DWORD *)eloop_data + 592);
ieee802_11_set_beacons((hostapd_iface *)eloop_data);
} | void ap_ht2040_timeout(void *eloop_data, void *user_data) {
struct hostapd_iface *iface = eloop_data;
wpa_printf(MSG_INFO, "Switching to 40 MHz operation");
iface->conf->secondary_channel = iface->secondary_ch;
ieee802_11_set_beacons(iface);
} | ap_ht2040_timeout | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void ap_ht40_scan_retry(void *eloop_data, void *user_data) {
int v2;
char *v3;
int ret;
wpa_driver_scan_params params;
unsigned long v6;
v6 = __readfsqword(0x28u);
memset(¶ms, 0, sizeof(params));
if (**((_DWORD **)eloop_data + 278) == 1)
ieee80211n_scan_channels_2g4((hostapd_iface *)eloop_data,... | static void ap_ht40_scan_retry(void *eloop_data, void *user_data) {
#define HT2040_COEX_SCAN_RETRY 15
struct hostapd_iface *iface = eloop_data;
struct wpa_driver_scan_params params;
int ret;
os_memset(¶ms, 0, sizeof(params));
if (iface->current_mode->mode == HOSTAPD_MODE_IEEE80211G)
ieee80211n_scan_c... | ap_ht40_scan_retry | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int ap_list_beacon_olbc(hostapd_iface *iface, ap_info *ap) {
int i;
int rate;
if (!iface->current_mode ||
iface->current_mode->mode != hostapd_hw_mode_HOSTAPD_MODE_IEEE80211G ||
iface->conf->channel != ap->channel) {
return 0;
}
if (ap->erp != -1 && (ap->erp & 1) != 0)
return 1;
for (i ... | static int ap_list_beacon_olbc(struct hostapd_iface *iface,
struct ap_info *ap) {
int i;
if (iface->current_mode == NULL ||
iface->current_mode->mode != HOSTAPD_MODE_IEEE80211G ||
iface->conf->channel != ap->channel)
return 0;
if (ap->erp != -1 && (ap->erp & ERP_IN... | ap_list_beacon_olbc | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void ap_list_deinit(hostapd_iface *iface) { hostapd_free_aps(iface); } | void ap_list_deinit(struct hostapd_iface *iface) { hostapd_free_aps(iface); } | ap_list_deinit | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int ap_list_init(hostapd_iface *iface) { return 0; } | int ap_list_init(struct hostapd_iface *iface) { return 0; } | ap_list_init | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void ap_list_process_beacon(hostapd_iface *iface, const ieee80211_mgmt *mgmt,
ieee802_11_elems *elems, hostapd_frame_info *fi) {
int new_ap;
int set_beacon;
ap_info *ap;
new_ap = 0;
set_beacon = 0;
if (iface->conf->ap_table_max_size > 0) {
ap = ap_get_ap(iface, mgmt->bssid);... | void ap_list_process_beacon(struct hostapd_iface *iface,
const struct ieee80211_mgmt *mgmt,
struct ieee802_11_elems *elems,
struct hostapd_frame_info *fi) {
struct ap_info *ap;
int new_ap = 0;
int set_beacon = 0;
if (iface->con... | ap_list_process_beacon | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void ap_list_timer(hostapd_iface *iface) {
int set_beacon;
int olbc;
int olbc_ht;
ap_info *ap;
ap_info *apa;
os_reltime now;
unsigned long v7;
v7 = __readfsqword(0x28u);
set_beacon = 0;
if (iface->ap_list) {
os_get_reltime(&now);
while (iface->ap_list) {
ap = iface->ap_list->prev;
... | void ap_list_timer(struct hostapd_iface *iface) {
struct os_reltime now;
struct ap_info *ap;
int set_beacon = 0;
if (!iface->ap_list)
return;
os_get_reltime(&now);
while (iface->ap_list) {
ap = iface->ap_list->prev;
if (!os_reltime_expired(&now, &ap->last_beacon,
i... | ap_list_timer | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void ap_sa_query_timer(void *eloop_ctx, void *timeout_ctx) {
u8 *nbuf;
u8 *trans_id;
wpa_printf(
2, "%s: SA Query timer for STA %02x:%02x:%02x:%02x:%02x:%02x (count=%d)",
*((const char **)eloop_ctx + 2), *((unsigned char *)timeout_ctx + 16),
*((unsigned char *)timeout_ctx + 17),
*((unsign... | static void ap_sa_query_timer(void *eloop_ctx, void *timeout_ctx) {
struct hostapd_data *hapd = eloop_ctx;
struct sta_info *sta = timeout_ctx;
unsigned int timeout, sec, usec;
u8 *trans_id, *nbuf;
wpa_printf(MSG_DEBUG, "%s: SA Query timer for STA " MACSTR " (count=%d)",
hapd->conf->iface, MAC2ST... | ap_sa_query_timer | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
sta_info *ap_sta_add(hostapd_data *hapd, const u8 *addr) {
int i;
sta_info *sta;
sta_info *staa;
sta = ap_get_sta(hapd, addr);
if (sta)
return sta;
wpa_printf(2, " New STA");
if (hapd->num_sta < hapd->conf->max_num_sta) {
staa = (sta_info *)os_zalloc(0x238u);
if (staa) {
staa->acct_int... | struct sta_info *ap_sta_add(struct hostapd_data *hapd, const u8 *addr) {
struct sta_info *sta;
int i;
sta = ap_get_sta(hapd, addr);
if (sta)
return sta;
wpa_printf(MSG_DEBUG, " New STA");
if (hapd->num_sta >= hapd->conf->max_num_sta) {
wpa_printf(MSG_DEBUG, "no more room for new STAs (%d/%d)", h... | ap_sta_add | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int ap_sta_bind_vlan(hostapd_data *hapd, sta_info *sta) {
int ret;
int old_vlanid;
hostapd_bss_config *iface;
hostapd_vlan *vlan;
vlan = 0;
old_vlanid = sta->vlan_id_bound;
if ((sta->flags & 0x4000) != 0 && !sta->vlan_id) {
wpa_printf(2,
"Do not override WDS VLAN assignment for STA "
... | int ap_sta_bind_vlan(struct hostapd_data *hapd, struct sta_info *sta) {
#ifndef CONFIG_NO_VLAN
const char *iface;
struct hostapd_vlan *vlan = NULL;
int ret;
int old_vlanid = sta->vlan_id_bound;
if ((sta->flags & WLAN_STA_WDS) && sta->vlan_id == 0) {
wpa_printf(MSG_DEBUG, "Do not override WDS VLAN assignm... | ap_sta_bind_vlan | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void ap_sta_clear_disconnect_timeouts(hostapd_data *hapd, sta_info *sta) {
if (eloop_cancel_timeout((eloop_timeout_handler)ap_sta_deauth_cb_timeout,
hapd, sta) > 0)
wpa_printf(2,
"%s: Removed ap_sta_deauth_cb_timeout timeout for "
"%02x:%02x:%02x:%02x:%02x:... | void ap_sta_clear_disconnect_timeouts(struct hostapd_data *hapd,
struct sta_info *sta) {
if (eloop_cancel_timeout(ap_sta_deauth_cb_timeout, hapd, sta) > 0)
wpa_printf(MSG_DEBUG,
"%s: Removed ap_sta_deauth_cb_timeout timeout for " MACSTR,
hapd->co... | ap_sta_clear_disconnect_timeouts | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void ap_sta_deauth_cb(hostapd_data *hapd, sta_info *sta) {
if ((sta->flags & 0x40000000) != 0) {
sta->flags &= ~0x40000000u;
eloop_cancel_timeout((eloop_timeout_handler)ap_sta_deauth_cb_timeout, hapd,
sta);
ap_sta_deauth_cb_timeout(hapd, sta);
} else {
wpa_printf(2, "Ignore ... | void ap_sta_deauth_cb(struct hostapd_data *hapd, struct sta_info *sta) {
if (!(sta->flags & WLAN_STA_PENDING_DEAUTH_CB)) {
wpa_printf(MSG_DEBUG, "Ignore deauth cb for test frame");
return;
}
sta->flags &= ~WLAN_STA_PENDING_DEAUTH_CB;
eloop_cancel_timeout(ap_sta_deauth_cb_timeout, hapd, sta);
ap_sta_de... | ap_sta_deauth_cb | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void ap_sta_deauth_cb_timeout(void *eloop_ctx, void *timeout_ctx) {
wpa_printf(
2, "%s: Deauthentication callback for STA %02x:%02x:%02x:%02x:%02x:%02x",
*((const char **)eloop_ctx + 2), *((unsigned char *)timeout_ctx + 16),
*((unsigned char *)timeout_ctx + 17),
*((unsigned char *)timeout_ctx ... | static void ap_sta_deauth_cb_timeout(void *eloop_ctx, void *timeout_ctx) {
struct hostapd_data *hapd = eloop_ctx;
struct sta_info *sta = timeout_ctx;
wpa_printf(MSG_DEBUG, "%s: Deauthentication callback for STA " MACSTR,
hapd->conf->iface, MAC2STR(sta->addr));
ap_sta_remove(hapd, sta);
mlme_deau... | ap_sta_deauth_cb_timeout | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void ap_sta_deauthenticate(hostapd_data *hapd, sta_info *sta, u16 reason) {
if (hapd->iface->current_mode &&
hapd->iface->current_mode->mode ==
hostapd_hw_mode_HOSTAPD_MODE_IEEE80211AD) {
ap_sta_disassociate(hapd, sta, reason);
} else {
wpa_printf(2, "%s: deauthenticate STA %02x:%02x:%02x:%0... | void ap_sta_deauthenticate(struct hostapd_data *hapd, struct sta_info *sta,
u16 reason) {
if (hapd->iface->current_mode &&
hapd->iface->current_mode->mode == HOSTAPD_MODE_IEEE80211AD) {
ap_sta_disassociate(hapd, sta, reason);
return;
}
wpa_printf(MSG_DEBUG, "%s: deauthen... | ap_sta_deauthenticate | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void ap_sta_delayed_1x_auth_fail_cb(void *eloop_ctx, void *timeout_ctx) {
u16 reason;
wpa_msg(*((void **)eloop_ctx + 297), 2,
"IEEE 802.1X: Scheduled disconnection of "
"%02x:%02x:%02x:%02x:%02x:%02x after EAP-Failure",
*((unsigned char *)timeout_ctx + 16),
*((unsigned char ... | static void ap_sta_delayed_1x_auth_fail_cb(void *eloop_ctx, void *timeout_ctx) {
struct hostapd_data *hapd = eloop_ctx;
struct sta_info *sta = timeout_ctx;
u16 reason;
wpa_dbg(hapd->msg_ctx, MSG_DEBUG,
"IEEE 802.1X: Scheduled disconnection of " MACSTR
" after EAP-Failure",
MAC2STR... | ap_sta_delayed_1x_auth_fail_cb | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void ap_sta_delayed_1x_auth_fail_disconnect(hostapd_data *hapd, sta_info *sta) {
wpa_msg(hapd->msg_ctx, 2,
"IEEE 802.1X: Force disconnection of %02x:%02x:%02x:%02x:%02x:%02x "
"after EAP-Failure in 10 ms",
sta->addr[0], sta->addr[1], sta->addr[2], sta->addr[3], sta->addr[4],
st... | void ap_sta_delayed_1x_auth_fail_disconnect(struct hostapd_data *hapd,
struct sta_info *sta) {
wpa_dbg(hapd->msg_ctx, MSG_DEBUG,
"IEEE 802.1X: Force disconnection of " MACSTR
" after EAP-Failure in 10 ms",
MAC2STR(sta->addr));
eloop_cancel_t... | ap_sta_delayed_1x_auth_fail_disconnect | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void ap_sta_disassoc_cb(hostapd_data *hapd, sta_info *sta) {
if ((sta->flags & 0x20000000) != 0) {
sta->flags &= ~0x20000000u;
eloop_cancel_timeout((eloop_timeout_handler)ap_sta_disassoc_cb_timeout,
hapd, sta);
ap_sta_disassoc_cb_timeout(hapd, sta);
} else {
wpa_printf(2, "I... | void ap_sta_disassoc_cb(struct hostapd_data *hapd, struct sta_info *sta) {
if (!(sta->flags & WLAN_STA_PENDING_DISASSOC_CB)) {
wpa_printf(MSG_DEBUG, "Ignore disassoc cb for test frame");
return;
}
sta->flags &= ~WLAN_STA_PENDING_DISASSOC_CB;
eloop_cancel_timeout(ap_sta_disassoc_cb_timeout, hapd, sta);
... | ap_sta_disassoc_cb | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void ap_sta_disassoc_cb_timeout(void *eloop_ctx, void *timeout_ctx) {
wpa_printf(
2, "%s: Disassociation callback for STA %02x:%02x:%02x:%02x:%02x:%02x",
*((const char **)eloop_ctx + 2), *((unsigned char *)timeout_ctx + 16),
*((unsigned char *)timeout_ctx + 17),
*((unsigned char *)timeout_ctx ... | static void ap_sta_disassoc_cb_timeout(void *eloop_ctx, void *timeout_ctx) {
struct hostapd_data *hapd = eloop_ctx;
struct sta_info *sta = timeout_ctx;
wpa_printf(MSG_DEBUG, "%s: Disassociation callback for STA " MACSTR,
hapd->conf->iface, MAC2STR(sta->addr));
ap_sta_remove(hapd, sta);
mlme_disa... | ap_sta_disassoc_cb_timeout | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void ap_sta_disassociate(hostapd_data *hapd, sta_info *sta, u16 reason) {
wpa_printf(2, "%s: disassociate STA %02x:%02x:%02x:%02x:%02x:%02x",
hapd->conf->iface, sta->addr[0], sta->addr[1], sta->addr[2],
sta->addr[3], sta->addr[4], sta->addr[5]);
sta->last_seq_ctrl = -1;
if (hapd->iface->... | void ap_sta_disassociate(struct hostapd_data *hapd, struct sta_info *sta,
u16 reason) {
wpa_printf(MSG_DEBUG, "%s: disassociate STA " MACSTR, hapd->conf->iface,
MAC2STR(sta->addr));
sta->last_seq_ctrl = WLAN_INVALID_MGMT_SEQ;
if (hapd->iface->current_mode &&
hapd->iface... | ap_sta_disassociate | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void ap_sta_disconnect(hostapd_data *hapd, sta_info *sta, const u8 *addr,
u16 reason) {
sta_info *staa;
staa = sta;
if (sta) {
wpa_printf(2, "%s: %s STA %02x:%02x:%02x:%02x:%02x:%02x reason=%u",
hapd->conf->iface, "ap_sta_disconnect", sta->addr[0],
sta->ad... | void ap_sta_disconnect(struct hostapd_data *hapd, struct sta_info *sta,
const u8 *addr, u16 reason) {
if (sta)
wpa_printf(MSG_DEBUG, "%s: %s STA " MACSTR " reason=%u", hapd->conf->iface,
__func__, MAC2STR(sta->addr), reason);
else if (addr)
wpa_printf(MSG_DEBUG, "%s: %s... | ap_sta_disconnect | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int ap_sta_flags_txt(u32 flags, char *buf, size_t buflen) {
const char *v3;
const char *v4;
const char *v5;
const char *v6;
const char *v7;
const char *v8;
const char *v9;
const char *v10;
const char *v11;
const char *v12;
const char *v13;
const char *v14;
const char *v16;
const char *v17;
... | int ap_sta_flags_txt(u32 flags, char *buf, size_t buflen) {
int res;
buf[0] = '\0';
res =
os_snprintf(buf, buflen, "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s",
(flags & WLAN_STA_AUTH ? "[AUTH]" : ""),
(flags & WLAN_STA_ASSOC ? "[ASSOC]" : ""),
(flags & W... | ap_sta_flags_txt | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int ap_sta_get_free_vlan_id(hostapd_data *hapd) {
int vlan_id;
hostapd_vlan *vlan;
vlan_id = 4096;
retry:
for (vlan = hapd->conf->vlan; vlan; vlan = vlan->next) {
if (vlan_id == vlan->vlan_id) {
++vlan_id;
goto retry;
}
}
return vlan_id;
} | static int ap_sta_get_free_vlan_id(struct hostapd_data *hapd) {
struct hostapd_vlan *vlan;
int vlan_id = MAX_VLAN_ID + 2;
retry:
for (vlan = hapd->conf->vlan; vlan; vlan = vlan->next) {
if (vlan->vlan_id == vlan_id) {
vlan_id++;
goto retry;
}
}
return vlan_id;
} | ap_sta_get_free_vlan_id | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void ap_sta_hash_add(hostapd_data *hapd, sta_info *sta) {
sta->hnext = hapd->sta_hash[sta->addr[5]];
hapd->sta_hash[sta->addr[5]] = sta;
} | void ap_sta_hash_add(struct hostapd_data *hapd, struct sta_info *sta) {
sta->hnext = hapd->sta_hash[STA_HASH(sta->addr)];
hapd->sta_hash[STA_HASH(sta->addr)] = sta;
} | ap_sta_hash_add | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void ap_sta_hash_del(hostapd_data *hapd, sta_info *sta) {
sta_info *s;
s = hapd->sta_hash[sta->addr[5]];
if (s) {
if (!memcmp(s->addr, sta->addr, 6u)) {
hapd->sta_hash[sta->addr[5]] = s->hnext;
} else {
while (s->hnext && memcmp(s->hnext->addr, sta->addr, 6u))
s = s->hnext;
if (... | static void ap_sta_hash_del(struct hostapd_data *hapd, struct sta_info *sta) {
struct sta_info *s;
s = hapd->sta_hash[STA_HASH(sta->addr)];
if (s == NULL)
return;
if (os_memcmp(s->addr, sta->addr, 6) == 0) {
hapd->sta_hash[STA_HASH(sta->addr)] = s->hnext;
return;
}
while (s->hnext != NULL &&
... | ap_sta_hash_del | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void ap_sta_ip6addr_del(hostapd_data *hapd, sta_info *sta) {
sta_ip6addr_del(hapd, sta);
} | void ap_sta_ip6addr_del(struct hostapd_data *hapd, struct sta_info *sta) {
sta_ip6addr_del(hapd, sta);
} | ap_sta_ip6addr_del | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void ap_sta_list_del(hostapd_data *hapd, sta_info *sta) {
sta_info *tmp;
if (sta == hapd->sta_list) {
hapd->sta_list = sta->next;
} else {
for (tmp = hapd->sta_list; tmp && sta != tmp->next; tmp = tmp->next)
;
if (tmp)
tmp->next = sta->next;
else
wpa_printf(
2, "Could ... | static void ap_sta_list_del(struct hostapd_data *hapd, struct sta_info *sta) {
struct sta_info *tmp;
if (hapd->sta_list == sta) {
hapd->sta_list = sta->next;
return;
}
tmp = hapd->sta_list;
while (tmp != NULL && tmp->next != sta)
tmp = tmp->next;
if (tmp == NULL) {
wpa_printf(MSG_DEBUG,
... | ap_sta_list_del | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void ap_sta_no_session_timeout(hostapd_data *hapd, sta_info *sta) {
eloop_cancel_timeout((eloop_timeout_handler)ap_handle_session_timer, hapd,
sta);
} | void ap_sta_no_session_timeout(struct hostapd_data *hapd,
struct sta_info *sta) {
eloop_cancel_timeout(ap_handle_session_timer, hapd, sta);
} | ap_sta_no_session_timeout | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int ap_sta_pending_delayed_1x_auth_fail_disconnect(hostapd_data *hapd,
sta_info *sta) {
return eloop_is_timeout_registered(
(eloop_timeout_handler)ap_sta_delayed_1x_auth_fail_cb, hapd, sta);
} | int ap_sta_pending_delayed_1x_auth_fail_disconnect(struct hostapd_data *hapd,
struct sta_info *sta) {
return eloop_is_timeout_registered(ap_sta_delayed_1x_auth_fail_cb, hapd, sta);
} | ap_sta_pending_delayed_1x_auth_fail_disconnect | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int ap_sta_re_add(hostapd_data *hapd, sta_info *sta) {
ap_sta_set_authorized(hapd, sta, 0);
hostapd_drv_sta_remove(hapd, sta->addr);
sta->flags &= 0xFFFFFFDC;
if (hostapd_sta_add(hapd, sta->addr, 0, 0, sta->supported_rates,
sta->supported_rates_len, 0, 0, 0, 0, 0, 0, sta->flags, 0,
... | int ap_sta_re_add(struct hostapd_data *hapd, struct sta_info *sta) {
ap_sta_set_authorized(hapd, sta, 0);
hostapd_drv_sta_remove(hapd, sta->addr);
sta->flags &= ~(WLAN_STA_ASSOC | WLAN_STA_AUTH | WLAN_STA_AUTHORIZED);
if (hostapd_sta_add(hapd, sta->addr, 0, 0, sta->supported_rates,
sta->... | ap_sta_re_add | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int ap_sta_remove(hostapd_data *hapd, sta_info *sta) {
ieee802_1x_notify_port_enabled(sta->eapol_sm, 0);
if (sta->ipaddr)
hostapd_drv_br_delete_ip_neigh(hapd, 4u, (const u8 *)&sta->ipaddr);
ap_sta_ip6addr_del(hapd, sta);
wpa_printf(
2, "%s: Removing STA %02x:%02x:%02x:%02x:%02x:%02x from kernel driver... | static int ap_sta_remove(struct hostapd_data *hapd, struct sta_info *sta) {
ieee802_1x_notify_port_enabled(sta->eapol_sm, 0);
if (sta->ipaddr)
hostapd_drv_br_delete_ip_neigh(hapd, 4, (u8 *)&sta->ipaddr);
ap_sta_ip6addr_del(hapd, sta);
wpa_printf(MSG_DEBUG, "%s: Removing STA " MACSTR " from kernel driver",... | ap_sta_remove | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void ap_sta_remove_in_other_bss(hostapd_data *hapd, sta_info *sta) {
size_t i;
hostapd_iface *iface;
hostapd_data *bss;
sta_info *sta2;
iface = hapd->iface;
for (i = 0; i < iface->num_bss; ++i) {
bss = iface->bss[i];
if (bss != hapd && bss) {
sta2 = ap_get_sta(bss, sta->addr);
if (sta2)... | static void ap_sta_remove_in_other_bss(struct hostapd_data *hapd,
struct sta_info *sta) {
struct hostapd_iface *iface = hapd->iface;
size_t i;
for (i = 0; i < iface->num_bss; i++) {
struct hostapd_data *bss = iface->bss[i];
struct sta_info *sta2;
if (bss == hap... | ap_sta_remove_in_other_bss | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void ap_sta_replenish_timeout(hostapd_data *hapd, sta_info *sta,
u32 session_timeout) {
if (eloop_replenish_timeout(session_timeout, 0,
(eloop_timeout_handler)ap_handle_session_timer,
hapd, sta) == 1)
hostapd_logger(hapd, st... | void ap_sta_replenish_timeout(struct hostapd_data *hapd, struct sta_info *sta,
u32 session_timeout) {
if (eloop_replenish_timeout(session_timeout, 0, ap_handle_session_timer, hapd,
sta) == 1) {
hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_IEEE80211,
... | ap_sta_replenish_timeout | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void ap_sta_reset_steer_flag_timer(void *eloop_ctx, void *timeout_ctx) {
if ((*((_BYTE *)timeout_ctx + 99) & 2) != 0) {
wpa_printf(
2, "%s: Reset steering flag for STA %02x:%02x:%02x:%02x:%02x:%02x",
*((const char **)eloop_ctx + 2), *((unsigned char *)timeout_ctx + 16),
*((unsigned char *)... | void ap_sta_reset_steer_flag_timer(void *eloop_ctx, void *timeout_ctx) {
struct hostapd_data *hapd = eloop_ctx;
struct sta_info *sta = timeout_ctx;
if (sta->agreed_to_steer) {
wpa_printf(MSG_DEBUG, "%s: Reset steering flag for STA " MACSTR,
hapd->conf->iface, MAC2STR(sta->addr));
sta->agre... | ap_sta_reset_steer_flag_timer | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void ap_sta_session_timeout(hostapd_data *hapd, sta_info *sta,
u32 session_timeout) {
hostapd_logger(hapd, sta->addr, 1u, 1,
"setting session timeout to %d seconds", session_timeout);
eloop_cancel_timeout((eloop_timeout_handler)ap_handle_session_timer, hapd,
... | void ap_sta_session_timeout(struct hostapd_data *hapd, struct sta_info *sta,
u32 session_timeout) {
hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_IEEE80211, HOSTAPD_LEVEL_DEBUG,
"setting session timeout to %d "
"seconds",
session_timeout)... | ap_sta_session_timeout | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void ap_sta_session_warning_timeout(hostapd_data *hapd, sta_info *sta,
int warning_time) {
eloop_cancel_timeout((eloop_timeout_handler)ap_handle_session_warning_timer,
hapd, sta);
eloop_register_timeout(warning_time, 0,
(eloop_timeo... | void ap_sta_session_warning_timeout(struct hostapd_data *hapd,
struct sta_info *sta, int warning_time) {
eloop_cancel_timeout(ap_handle_session_warning_timer, hapd, sta);
eloop_register_timeout(warning_time, 0, ap_handle_session_warning_timer, hapd,
sta);... | ap_sta_session_warning_timeout | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void ap_sta_set_authorized(hostapd_data *hapd, sta_info *sta, int authorized) {
u32 v3;
const char *keyid;
char buf[112];
char keyid_buf[112];
char ip_addr[104];
unsigned long v9;
v9 = __readfsqword(0x28u);
if ((authorized == 0) == ((sta->flags & 0x20) != 0)) {
if (authorized)
v3 = sta->flags... | void ap_sta_set_authorized(struct hostapd_data *hapd, struct sta_info *sta,
int authorized) {
const u8 *dev_addr = NULL;
char buf[100];
#ifdef CONFIG_P2P
u8 addr[ETH_ALEN];
u8 ip_addr_buf[4];
#endif
if (!!authorized == !!(sta->flags & WLAN_STA_AUTHORIZED))
return;
if (author... | ap_sta_set_authorized | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int ap_sta_set_vlan(hostapd_data *hapd, sta_info *sta,
vlan_description *vlan_desc) {
const char *v4;
const char *v5;
int untagged;
vlan_description *p_vlan_desc;
int vlan_id;
int ret;
int old_vlan_id;
hostapd_vlan *vlan;
hostapd_vlan *wildcard_vlan;
vlan = 0;
wildcard_vlan = ... | int ap_sta_set_vlan(struct hostapd_data *hapd, struct sta_info *sta,
struct vlan_description *vlan_desc) {
struct hostapd_vlan *vlan = NULL, *wildcard_vlan = NULL;
int old_vlan_id, vlan_id = 0, ret = 0;
if (hapd->conf->ssid.per_sta_vif && !sta->vlan_id) {
} else if (hapd->conf->ssid.dynami... | ap_sta_set_vlan | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void ap_sta_start_sa_query(hostapd_data *hapd, sta_info *sta) {
ap_sa_query_timer(hapd, sta);
} | void ap_sta_start_sa_query(struct hostapd_data *hapd, struct sta_info *sta) {
ap_sa_query_timer(hapd, sta);
} | ap_sta_start_sa_query | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void ap_sta_stop_sa_query(hostapd_data *hapd, sta_info *sta) {
eloop_cancel_timeout((eloop_timeout_handler)ap_sa_query_timer, hapd, sta);
free(sta->sa_query_trans_id);
sta->sa_query_trans_id = 0;
sta->sa_query_count = 0;
} | void ap_sta_stop_sa_query(struct hostapd_data *hapd, struct sta_info *sta) {
eloop_cancel_timeout(ap_sa_query_timer, hapd, sta);
os_free(sta->sa_query_trans_id);
sta->sa_query_trans_id = NULL;
sta->sa_query_count = 0;
} | ap_sta_stop_sa_query | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
const char *ap_sta_wpa_get_keyid(hostapd_data *hapd, sta_info *sta) {
int pmk_len;
hostapd_wpa_psk *psk;
hostapd_ssid *ssid;
const u8 *pmk;
unsigned long v7;
v7 = __readfsqword(0x28u);
ssid = &hapd->conf->ssid;
pmk = wpa_auth_get_pmk(sta->wpa_sm, &pmk_len);
if (!pmk || pmk_len != 32)
return 0;
... | const char *ap_sta_wpa_get_keyid(struct hostapd_data *hapd,
struct sta_info *sta) {
struct hostapd_wpa_psk *psk;
struct hostapd_ssid *ssid;
const u8 *pmk;
int pmk_len;
ssid = &hapd->conf->ssid;
pmk = wpa_auth_get_pmk(sta->wpa_sm, &pmk_len);
if (!pmk || pmk_len != PMK_LEN... | ap_sta_wpa_get_keyid | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int ap_sta_wps_cancel(hostapd_data *hapd, sta_info *sta, void *ctx) {
if (!sta || (sta->flags & 0x1000) == 0)
return 0;
ap_sta_deauthenticate(hapd, sta, 2u);
wpa_printf(2, "WPS: %s: Deauth sta=%02x:%02x:%02x:%02x:%02x:%02x",
"ap_sta_wps_cancel", sta->addr[0], sta->addr[1], sta->addr[2],
... | int ap_sta_wps_cancel(struct hostapd_data *hapd, struct sta_info *sta,
void *ctx) {
if (sta && (sta->flags & WLAN_STA_WPS)) {
ap_sta_deauthenticate(hapd, sta, WLAN_REASON_PREV_AUTH_NOT_VALID);
wpa_printf(MSG_DEBUG, "WPS: %s: Deauth sta=" MACSTR, __func__,
MAC2STR(sta->addr... | ap_sta_wps_cancel | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
unsigned long asn1_bit_string_to_long(const u8 *buf, size_t len) {
u8 *v2;
u8 *v3;
unsigned long val;
u8 *pos;
val = 0;
pos = (u8 *)(buf + 1);
if (len > 1) {
pos = (u8 *)(buf + 2);
val = rotate_bits(buf[1]);
}
if (len > 2) {
v2 = pos++;
val |= (unsigned long)rotate_bits(*v2) << 8;
}... | unsigned long asn1_bit_string_to_long(const u8 *buf, size_t len) {
unsigned long val = 0;
const u8 *pos = buf;
pos++;
if (len >= 2)
val |= rotate_bits(*pos++);
if (len >= 3)
val |= ((unsigned long)rotate_bits(*pos++)) << 8;
if (len >= 4)
val |= ((unsigned long)rotate_bits(*pos++)) << 16;
if ... | asn1_bit_string_to_long | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
wpabuf *asn1_build_alg_id(const asn1_oid *oid, const wpabuf *params) {
size_t len;
wpabuf *buf;
len = 100;
if (params)
len = wpabuf_len_69(params) + 100;
buf = wpabuf_alloc(len);
if (!buf)
return 0;
asn1_put_oid(buf, oid);
if (params)
wpabuf_put_buf_19(buf, params);
return asn1_encaps(buf... | struct wpabuf *asn1_build_alg_id(const struct asn1_oid *oid,
const struct wpabuf *params) {
struct wpabuf *buf;
size_t len;
len = 100;
if (params)
len += wpabuf_len(params);
buf = wpabuf_alloc(len);
if (!buf)
return NULL;
asn1_put_oid(buf, oid);
if (params)
... | asn1_build_alg_id | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
wpabuf *asn1_encaps(wpabuf *buf, u8 a2, u8 tag) {
size_t v4;
size_t v5;
wpabuf *res;
if (!buf)
return 0;
v4 = wpabuf_len_69(buf);
res = wpabuf_alloc(v4 + 10);
if (res) {
v5 = wpabuf_len_69(buf);
asn1_put_hdr(res, a2, 1, tag, v5);
wpabuf_put_buf_19(res, buf);
}
wpabuf_clear_free(buf);
... | struct wpabuf *asn1_encaps(struct wpabuf *buf, u8 class, u8 tag) {
struct wpabuf *res;
if (!buf)
return NULL;
res = wpabuf_alloc(10 + wpabuf_len(buf));
if (res) {
asn1_put_hdr(res, class, 1, tag, wpabuf_len(buf));
wpabuf_put_buf(res, buf);
}
wpabuf_clear_free(buf);
return res;
} | asn1_encaps | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int asn1_get_alg_id(const u8 *buf, size_t len, asn1_oid *oid, const u8 **params,
size_t *params_len, const u8 **next) {
const u8 *pos;
const u8 *end;
asn1_hdr hdr;
unsigned long v13;
v13 = __readfsqword(0x28u);
pos = buf;
end = &buf[len];
if (asn1_get_sequence(buf, len, &hdr, next) ... | int asn1_get_alg_id(const u8 *buf, size_t len, struct asn1_oid *oid,
const u8 **params, size_t *params_len, const u8 **next) {
const u8 *pos = buf, *end = buf + len;
struct asn1_hdr hdr;
if (asn1_get_sequence(pos, end - pos, &hdr, next) < 0 ||
asn1_get_oid(hdr.payload, hdr.length, oid, ... | asn1_get_alg_id | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int asn1_get_integer(const u8 *buf, size_t len, int *integer, const u8 **next) {
const u8 *v5;
int value;
size_t left;
const u8 *pos;
asn1_hdr hdr;
unsigned long v12;
v12 = __readfsqword(0x28u);
if (asn1_get_next(buf, len, &hdr) >= 0 && hdr.length &&
asn1_is_integer(&hdr)) {
*next = &hdr.payl... | int asn1_get_integer(const u8 *buf, size_t len, int *integer, const u8 **next) {
struct asn1_hdr hdr;
size_t left;
const u8 *pos;
int value;
if (asn1_get_next(buf, len, &hdr) < 0 || hdr.length == 0 ||
!asn1_is_integer(&hdr)) {
asn1_unexpected(&hdr, "ASN.1: Expected INTEGER");
return -1;
}
... | asn1_get_integer | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int asn1_get_next(const u8 *buf, size_t len, asn1_hdr *hdr) {
unsigned char *v4;
u8 *v5;
const u8 *v6;
signed char tmpb;
u8 tmp;
u8 tmpa;
const u8 *pos;
const u8 *posa;
size_t ext_len;
const u8 *end;
memset(hdr, 0, sizeof(asn1_hdr));
end = &buf[len];
if (buf >= &buf[len]) {
wpa_printf(2, ... | int asn1_get_next(const u8 *buf, size_t len, struct asn1_hdr *hdr) {
const u8 *pos, *end;
u8 tmp;
os_memset(hdr, 0, sizeof(*hdr));
pos = buf;
end = buf + len;
if (pos >= end) {
wpa_printf(MSG_DEBUG, "ASN.1: No room for Identifier");
return -1;
}
hdr->identifier = *pos++;
hdr->class = hdr->id... | asn1_get_next | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int asn1_get_oid(const u8 *buf, size_t len, asn1_oid *oid, const u8 **next) {
asn1_hdr hdr;
unsigned long v8;
v8 = __readfsqword(0x28u);
if (asn1_get_next(buf, len, &hdr) >= 0 && hdr.length && asn1_is_oid(&hdr)) {
*next = &hdr.payload[hdr.length];
return asn1_parse_oid(hdr.payload, hdr.length, oid);
... | int asn1_get_oid(const u8 *buf, size_t len, struct asn1_oid *oid,
const u8 **next) {
struct asn1_hdr hdr;
if (asn1_get_next(buf, len, &hdr) < 0 || hdr.length == 0 ||
!asn1_is_oid(&hdr)) {
asn1_unexpected(&hdr, "ASN.1: Expected OID");
return -1;
}
*next = hdr.payload + hdr.length... | asn1_get_oid | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int asn1_get_sequence(const u8 *buf, size_t len, asn1_hdr *hdr,
const u8 **next) {
if (asn1_get_next(buf, len, hdr) < 0 || !asn1_is_sequence(hdr)) {
asn1_unexpected(hdr, "ASN.1: Expected SEQUENCE");
return -1;
} else {
if (next)
*next = &hdr->payload[hdr->length];
return ... | int asn1_get_sequence(const u8 *buf, size_t len, struct asn1_hdr *hdr,
const u8 **next) {
if (asn1_get_next(buf, len, hdr) < 0 || !asn1_is_sequence(hdr)) {
asn1_unexpected(hdr, "ASN.1: Expected SEQUENCE");
return -1;
}
if (next)
*next = hdr->payload + hdr->length;
return 0;
} | asn1_get_sequence | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int asn1_oid_equal(const asn1_oid *a, const asn1_oid *b) {
size_t i;
if (a->len != b->len)
return 0;
for (i = 0; i < a->len; ++i) {
if (a->oid[i] != b->oid[i])
return 0;
}
return 1;
} | int asn1_oid_equal(const struct asn1_oid *a, const struct asn1_oid *b) {
size_t i;
if (a->len != b->len)
return 0;
for (i = 0; i < a->len; i++) {
if (a->oid[i] != b->oid[i])
return 0;
}
return 1;
} | asn1_oid_equal | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void asn1_oid_to_str(const asn1_oid *oid, char *buf, size_t len) {
const char *v3;
int ret;
char *pos;
size_t i;
pos = buf;
if (len) {
*buf = 0;
for (i = 0; i < oid->len; ++i) {
v3 = i ? "." : (const char *)&unk_1FE9AA;
ret = snprintf(pos, &buf[len] - pos, "%s%lu", v3, oid->oid[i]);
... | void asn1_oid_to_str(const struct asn1_oid *oid, char *buf, size_t len) {
char *pos = buf;
size_t i;
int ret;
if (len == 0)
return;
buf[0] = '\0';
for (i = 0; i < oid->len; i++) {
ret = os_snprintf(pos, buf + len - pos, "%s%lu", i == 0 ? "" : ".",
oid->oid[i]);
if (os_sn... | asn1_oid_to_str | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int asn1_parse_oid(const u8 *buf, size_t len, asn1_oid *oid) {
char *v4;
size_t v5;
const u8 *pos;
unsigned long val;
const u8 *end;
memset(oid, 0, sizeof(asn1_oid));
pos = buf;
end = &buf[len];
while (pos < end) {
val = 0;
do {
if (pos >= end)
return -1;
v4 = (char *)pos+... | int asn1_parse_oid(const u8 *buf, size_t len, struct asn1_oid *oid) {
const u8 *pos, *end;
unsigned long val;
u8 tmp;
os_memset(oid, 0, sizeof(*oid));
pos = buf;
end = buf + len;
while (pos < end) {
val = 0;
do {
if (pos >= end)
return -1;
tmp = *pos++;
val = (val << ... | asn1_parse_oid | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void asn1_print_hdr(const asn1_hdr *hdr, const char *title) {
wpa_printf(2, "%sclass %d constructed %d tag 0x%x", title, hdr->class,
hdr->constructed, hdr->tag);
} | void asn1_print_hdr(const struct asn1_hdr *hdr, const char *title) {
wpa_printf(MSG_DEBUG, "%sclass %d constructed %d tag 0x%x", title, hdr->class,
hdr->constructed, hdr->tag);
} | asn1_print_hdr | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void asn1_put_hdr(wpabuf *buf, u8 a2, int constructed, u8 tag, size_t len) {
char v5;
if (constructed)
v5 = 32;
else
v5 = 0;
wpabuf_put_u8_38(buf, v5 | (a2 << 6) | tag);
asn1_put_len(buf, len);
} | void asn1_put_hdr(struct wpabuf *buf, u8 class, int constructed, u8 tag,
size_t len) {
wpabuf_put_u8(buf, class << 6 | (constructed ? 0x20 : 0x00) | tag);
asn1_put_len(buf, len);
} | asn1_put_hdr | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void asn1_put_integer(wpabuf *buf, int val) {
int zeros;
u8 bin[4];
unsigned long v4;
v4 = __readfsqword(0x28u);
WPA_PUT_BE32_23(bin, val);
for (zeros = 0; zeros <= 2 && !bin[zeros]; ++zeros)
;
wpabuf_put_u8_38(buf, 2u);
wpabuf_put_u8_38(buf, 4 - zeros);
wpabuf_put_data_48(buf, &bin[zeros], 4 - z... | void asn1_put_integer(struct wpabuf *buf, int val) {
u8 bin[4];
int zeros;
WPA_PUT_BE32(bin, val);
zeros = 0;
while (zeros < 3 && bin[zeros] == 0)
zeros++;
wpabuf_put_u8(buf, ASN1_TAG_INTEGER);
wpabuf_put_u8(buf, 4 - zeros);
wpabuf_put_data(buf, &bin[zeros], 4 - zeros);
} | asn1_put_integer | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void asn1_put_len(wpabuf *buf, size_t len) {
if (len > 0x7F) {
if (len > 0xFF) {
if (len > 0xFFFF) {
if (len > 0xFFFFFF) {
wpabuf_put_u8_38(buf, 0x84u);
wpabuf_put_be32_11(buf, len);
} else {
wpabuf_put_u8_38(buf, 0x83u);
wpabuf_put_be24_2(buf, len);
... | static void asn1_put_len(struct wpabuf *buf, size_t len) {
if (len <= 0x7f) {
wpabuf_put_u8(buf, len);
} else if (len <= 0xff) {
wpabuf_put_u8(buf, 0x80 | 1);
wpabuf_put_u8(buf, len);
} else if (len <= 0xffff) {
wpabuf_put_u8(buf, 0x80 | 2);
wpabuf_put_be16(buf, len);
} else if (len <= 0xfff... | asn1_put_len | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void asn1_put_octet_string(wpabuf *buf, const wpabuf *val) {
size_t v2;
wpabuf_put_u8_38(buf, 4u);
v2 = wpabuf_len_69(val);
asn1_put_len(buf, v2);
wpabuf_put_buf_19(buf, val);
} | void asn1_put_octet_string(struct wpabuf *buf, const struct wpabuf *val) {
wpabuf_put_u8(buf, ASN1_TAG_OCTETSTRING);
asn1_put_len(buf, wpabuf_len(val));
wpabuf_put_buf(buf, val);
} | asn1_put_octet_string | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void asn1_put_oid(wpabuf *buf, const asn1_oid *oid) {
char v2;
int idx;
size_t i;
unsigned long val;
u8 *len;
u8 bytes[8];
unsigned long v8;
v8 = __readfsqword(0x28u);
if (oid->len > 1) {
wpabuf_put_u8_38(buf, 6u);
len = (u8 *)wpabuf_put(buf, 1u);
wpabuf_put_u8_38(buf, 40 * oid->oid[0] + ... | void asn1_put_oid(struct wpabuf *buf, const struct asn1_oid *oid) {
u8 *len;
size_t i;
if (oid->len < 2)
return;
wpabuf_put_u8(buf, ASN1_TAG_OID);
len = wpabuf_put(buf, 1);
wpabuf_put_u8(buf, 40 * oid->oid[0] + oid->oid[1]);
for (i = 2; i < oid->len; i++) {
unsigned long val = oid->oid[i];
u8... | asn1_put_oid | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void asn1_put_sequence(wpabuf *buf, const wpabuf *payload) {
size_t v2;
v2 = wpabuf_len_69(payload);
asn1_put_hdr(buf, 0, 1, 0x10u, v2);
wpabuf_put_buf_19(buf, payload);
} | void asn1_put_sequence(struct wpabuf *buf, const struct wpabuf *payload) {
asn1_put_hdr(buf, ASN1_CLASS_UNIVERSAL, 1, ASN1_TAG_SEQUENCE,
wpabuf_len(payload));
wpabuf_put_buf(buf, payload);
} | asn1_put_sequence | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void asn1_put_set(wpabuf *buf, const wpabuf *payload) {
size_t v2;
v2 = wpabuf_len_69(payload);
asn1_put_hdr(buf, 0, 1, 0x11u, v2);
wpabuf_put_buf_19(buf, payload);
} | void asn1_put_set(struct wpabuf *buf, const struct wpabuf *payload) {
asn1_put_hdr(buf, ASN1_CLASS_UNIVERSAL, 1, ASN1_TAG_SET, wpabuf_len(payload));
wpabuf_put_buf(buf, payload);
} | asn1_put_set | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void asn1_put_utf8string(wpabuf *buf, const char *val) {
size_t v2;
v2 = strlen(val);
asn1_put_hdr(buf, 0, 0, 0xCu, v2);
wpabuf_put_str_9(buf, val);
} | void asn1_put_utf8string(struct wpabuf *buf, const char *val) {
asn1_put_hdr(buf, ASN1_CLASS_UNIVERSAL, 0, ASN1_TAG_UTF8STRING,
os_strlen(val));
wpabuf_put_str(buf, val);
} | asn1_put_utf8string | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void asn1_unexpected(const asn1_hdr *hdr, const char *title) {
wpa_printf(2, "%s - found class %d constructed %d tag 0x%x", title,
hdr->class, hdr->constructed, hdr->tag);
} | void asn1_unexpected(const struct asn1_hdr *hdr, const char *title) {
wpa_printf(MSG_DEBUG, "%s - found class %d constructed %d tag 0x%x", title,
hdr->class, hdr->constructed, hdr->tag);
} | asn1_unexpected | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int asn1_valid_der(asn1_hdr *hdr) {
if (hdr->class)
return 1;
if (hdr->tag == 1 && !asn1_valid_der_boolean(hdr))
return 0;
if (hdr->tag == 5 && hdr->length)
return 0;
if (hdr->constructed &&
(hdr->tag == 1 || hdr->tag == 2 || hdr->tag == 5 || hdr->tag == 6 ||
hdr->tag == 13 || hdr->tag ... | static int asn1_valid_der(struct asn1_hdr *hdr) {
if (hdr->class != ASN1_CLASS_UNIVERSAL)
return 1;
if (hdr->tag == ASN1_TAG_BOOLEAN && !asn1_valid_der_boolean(hdr))
return 0;
if (hdr->tag == ASN1_TAG_NULL && hdr->length != 0)
return 0;
if (hdr->constructed &&
(hdr->tag == ASN1_TAG_BOOLEAN ||... | asn1_valid_der | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int asn1_valid_der_boolean(asn1_hdr *hdr) {
if (hdr->length == 1) {
if (!*hdr->payload || *hdr->payload == 0xFF) {
return 1;
} else {
wpa_printf(2,
"ASN.1: Invalid BOOLEAN value 0x%x (DER requires 0 or 0xff)",
*hdr->payload);
return 0;
}
} else {
w... | static int asn1_valid_der_boolean(struct asn1_hdr *hdr) {
if (hdr->length != 1) {
wpa_printf(MSG_DEBUG, "ASN.1: Unexpected BOOLEAN length (%u)", hdr->length);
return 0;
}
if (hdr->payload[0] != 0 && hdr->payload[0] != 0xff) {
wpa_printf(MSG_DEBUG,
"ASN.1: Invalid BOOLEAN value 0x%x (D... | asn1_valid_der_boolean | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
wpabuf *auth_build_sae_commit(hostapd_data *hapd, sta_info *sta, int update,
int status_code) {
sae_data *sae;
size_t v6;
size_t v7;
wpabuf *anti_clogging_token;
int use_pt;
sae_password_entry *pw;
sae_pt *pt;
const sae_pk *pk;
wpabuf *buf;
const char *rx_id;
const ch... | static struct wpabuf *auth_build_sae_commit(struct hostapd_data *hapd,
struct sta_info *sta, int update,
int status_code) {
struct wpabuf *buf;
const char *password = NULL;
struct sae_password_entry *pw;
const char *rx_id = ... | auth_build_sae_commit | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
wpabuf *auth_build_sae_confirm(hostapd_data *hapd, sta_info *sta) {
wpabuf *buf;
buf = wpabuf_alloc(0x42u);
if (!buf)
return 0;
if (sae_write_confirm(sta->sae, buf) >= 0)
return buf;
wpabuf_free(buf);
return 0;
} | static struct wpabuf *auth_build_sae_confirm(struct hostapd_data *hapd,
struct sta_info *sta) {
struct wpabuf *buf;
buf = wpabuf_alloc(SAE_CONFIRM_MAX_LEN);
if (buf == NULL)
return NULL;
#ifdef CONFIG_SAE_PK
#ifdef CONFIG_TESTING_OPTIONS
if (sta->sae->tmp)
... | auth_build_sae_confirm | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
wpabuf *auth_build_token_req(hostapd_data *hapd, int group, const u8 *addr,
int h2e) {
os_time_t usec;
u8 p_idx;
u16 token_idx;
wpabuf *buf;
u8 *token;
os_reltime now;
const u8 *addrs[2];
size_t len[2];
u8 idx[2];
unsigned long v16;
v16 = __readfsqword(0x28u);
os_ge... | static struct wpabuf *auth_build_token_req(struct hostapd_data *hapd, int group,
const u8 *addr, int h2e) {
struct wpabuf *buf;
u8 *token;
struct os_reltime now;
u8 idx[2];
const u8 *addrs[2];
size_t len[2];
u8 p_idx;
u16 token_idx;
os_get_reltime(&now);
i... | auth_build_token_req | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
const char *auth_key_tx_state_txt(int s) {
if (!s)
return "NO_KEY_TRANSMIT";
if (s == 1)
return "KEY_TRANSMIT";
return "Unknown";
} | static inline const char *auth_key_tx_state_txt(int s) {
switch (s) {
case AUTH_KEY_TX_NO_KEY_TRANSMIT:
return "NO_KEY_TRANSMIT";
case AUTH_KEY_TX_KEY_TRANSMIT:
return "KEY_TRANSMIT";
default:
return "Unknown";
}
} | auth_key_tx_state_txt | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
const char *auth_pae_state_txt(int s) {
const char *result;
switch (s) {
case 0:
result = "INITIALIZE";
break;
case 1:
result = "DISCONNECTED";
break;
case 2:
result = "CONNECTING";
break;
case 3:
result = "AUTHENTICATING";
break;
case 4:
result = "AUTHENTICATED";
... | static inline const char *auth_pae_state_txt(int s) {
switch (s) {
case AUTH_PAE_INITIALIZE:
return "INITIALIZE";
case AUTH_PAE_DISCONNECTED:
return "DISCONNECTED";
case AUTH_PAE_CONNECTING:
return "CONNECTING";
case AUTH_PAE_AUTHENTICATING:
return "AUTHENTICATING";
case AUTH_PAE_AUTHENTICAT... | auth_pae_state_txt | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int auth_sae_init_committed(hostapd_data *hapd, sta_info *sta) {
if (!sta->sae || !sta->sae->tmp)
return -1;
if (sta->sae->state)
return -1;
if (auth_sae_send_commit(hapd, sta, hapd->own_addr, 0, -1))
return -1;
sae_set_state(sta, sae_state_SAE_COMMITTED, "Init and sent commit");
sta->sae->sync = ... | int auth_sae_init_committed(struct hostapd_data *hapd, struct sta_info *sta) {
int ret;
if (!sta->sae || !sta->sae->tmp)
return -1;
if (sta->sae->state != SAE_NOTHING)
return -1;
ret = auth_sae_send_commit(hapd, sta, hapd->own_addr, 0, -1);
if (ret)
return -1;
sae_set_state(sta, SAE_COMMITTE... | auth_sae_init_committed | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void auth_sae_process_commit(void *eloop_ctx, void *user_ctx) {
hostapd_sae_commit_queue *v2;
unsigned int queue_len;
hostapd_sae_commit_queue *q;
if (dl_list_empty_14((const dl_list *)((char *)eloop_ctx + 3512)))
v2 = 0;
else
v2 = (hostapd_sae_commit_queue *)*((_QWORD *)eloop_ctx + 439);
q = v2;
... | void auth_sae_process_commit(void *eloop_ctx, void *user_ctx) {
struct hostapd_data *hapd = eloop_ctx;
struct hostapd_sae_commit_queue *q;
unsigned int queue_len;
q = dl_list_first(&hapd->sae_commit_queue, struct hostapd_sae_commit_queue,
list);
if (!q)
return;
wpa_printf(MSG_DEBUG,... | auth_sae_process_commit | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void auth_sae_queue(hostapd_data *hapd, const ieee80211_mgmt *mgmt, size_t len,
int rssi) {
unsigned int queue_len;
hostapd_sae_commit_queue *q2;
hostapd_sae_commit_queue *q;
queue_len = dl_list_len_5(&hapd->sae_commit_queue);
if (queue_len <= 0xE) {
wpa_printf(2,
"SAE:... | static void auth_sae_queue(struct hostapd_data *hapd,
const struct ieee80211_mgmt *mgmt, size_t len,
int rssi) {
struct hostapd_sae_commit_queue *q, *q2;
unsigned int queue_len;
const struct ieee80211_mgmt *mgmt2;
queue_len = dl_list_len(&hapd->sae_commit_q... | auth_sae_queue | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int auth_sae_queued_addr(hostapd_data *hapd, const u8 *addr) {
hostapd_data *q;
for (q = (hostapd_data *)hapd->sae_commit_queue.next;
q != (hostapd_data *)&hapd->sae_commit_queue;
q = (hostapd_data *)q->iface) {
if (!memcmp(addr, (char *)&q->sta_list + 2, 6u))
return 1;
}
return 0;
} | static int auth_sae_queued_addr(struct hostapd_data *hapd, const u8 *addr) {
struct hostapd_sae_commit_queue *q;
const struct ieee80211_mgmt *mgmt;
dl_list_for_each(q, &hapd->sae_commit_queue, struct hostapd_sae_commit_queue,
list) {
mgmt = (const struct ieee80211_mgmt *)q->msg;
if (os... | auth_sae_queued_addr | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void auth_sae_retransmit_timer(void *eloop_ctx, void *eloop_data) {
const char *v2;
int v3;
int ret;
if (!sae_check_big_sync((hostapd_data *)eloop_ctx, (sta_info *)eloop_data)) {
++*(_DWORD *)(*((_QWORD *)eloop_data + 58) + 76LL);
v2 = sae_state_txt((sae_state) * *((_DWORD **)eloop_data + 58));
wpa... | static void auth_sae_retransmit_timer(void *eloop_ctx, void *eloop_data) {
struct hostapd_data *hapd = eloop_ctx;
struct sta_info *sta = eloop_data;
int ret;
if (sae_check_big_sync(hapd, sta))
return;
sta->sae->sync++;
wpa_printf(MSG_DEBUG,
"SAE: Auth SAE retransmit timer for " MACSTR " (s... | auth_sae_retransmit_timer | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int auth_sae_send_commit(hostapd_data *hapd, sta_info *sta, const u8 *bssid,
int update, int status_code) {
size_t v6;
const u8 *v7;
u16 status;
int reply_res;
wpabuf *data;
data = auth_build_sae_commit(hapd, sta, update, status_code);
if (!data && sta->sae->tmp && sta->sae->tmp-... | static int auth_sae_send_commit(struct hostapd_data *hapd, struct sta_info *sta,
const u8 *bssid, int update, int status_code) {
struct wpabuf *data;
int reply_res;
u16 status;
data = auth_build_sae_commit(hapd, sta, update, status_code);
if (!data && sta->sae->tmp && sta->sae... | auth_sae_send_commit | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int auth_sae_send_confirm(hostapd_data *hapd, sta_info *sta, const u8 *bssid) {
size_t v4;
const u8 *v5;
int reply_res;
wpabuf *data;
data = auth_build_sae_confirm(hapd, sta);
if (!data)
return 1;
v4 = wpabuf_len_72(data);
v5 = (const u8 *)wpabuf_head_72(data);
reply_res = send_auth_reply(hapd, s... | static int auth_sae_send_confirm(struct hostapd_data *hapd,
struct sta_info *sta, const u8 *bssid) {
struct wpabuf *data;
int reply_res;
data = auth_build_sae_confirm(hapd, sta);
if (data == NULL)
return WLAN_STATUS_UNSPECIFIED_FAILURE;
reply_res = send_auth_reply(hapd, ... | auth_sae_send_confirm | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void authsrv_deinit(hostapd_data *hapd) {
radius_server_deinit(hapd->radius_srv);
hapd->radius_srv = 0;
if (hapd->ssl_ctx) {
tls_deinit(hapd->ssl_ctx);
hapd->ssl_ctx = 0;
}
if (hapd->eap_sim_db_priv) {
eap_sim_db_deinit(hapd->eap_sim_db_priv);
hapd->eap_sim_db_priv = 0;
}
eap_server_config... | void authsrv_deinit(struct hostapd_data *hapd) {
#ifdef RADIUS_SERVER
radius_server_deinit(hapd->radius_srv);
hapd->radius_srv = NULL;
#endif
#ifdef EAP_TLS_FUNCS
if (hapd->ssl_ctx) {
tls_deinit(hapd->ssl_ctx);
hapd->ssl_ctx = NULL;
}
#endif
#ifdef EAP_SIM_DB
if (hapd->eap_sim_db_priv) {
eap_sim... | authsrv_deinit | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
eap_config *authsrv_eap_config(hostapd_data *hapd) {
eap_config *cfg;
cfg = (eap_config *)os_zalloc(0xA8u);
if (!cfg)
return 0;
cfg->eap_server = hapd->conf->eap_server;
cfg->ssl_ctx = hapd->ssl_ctx;
cfg->msg_ctx = hapd->msg_ctx;
cfg->eap_sim_db_priv = hapd->eap_sim_db_priv;
cfg->tls_session_lifeti... | static struct eap_config *authsrv_eap_config(struct hostapd_data *hapd) {
struct eap_config *cfg;
cfg = os_zalloc(sizeof(*cfg));
if (!cfg)
return NULL;
cfg->eap_server = hapd->conf->eap_server;
cfg->ssl_ctx = hapd->ssl_ctx;
cfg->msg_ctx = hapd->msg_ctx;
cfg->eap_sim_db_priv = hapd->eap_sim_db_priv;
... | authsrv_eap_config | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int authsrv_init(hostapd_data *hapd) {
tls_config conf;
tls_connection_params params;
unsigned long v4;
v4 = __readfsqword(0x28u);
if (!hapd->conf->eap_server ||
!hapd->conf->ca_cert && !hapd->conf->server_cert &&
!hapd->conf->private_key && !hapd->conf->dh_file &&
!hapd->conf->serv... | int authsrv_init(struct hostapd_data *hapd) {
#ifdef EAP_TLS_FUNCS
if (hapd->conf->eap_server &&
(hapd->conf->ca_cert || hapd->conf->server_cert ||
hapd->conf->private_key || hapd->conf->dh_file ||
hapd->conf->server_cert2 || hapd->conf->private_key2)) {
struct tls_config conf;
struct tls_... | authsrv_init | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void authsrv_tls_event(void *ctx, tls_event ev, tls_event_data *data) {
const char *serial_num;
if (ev == tls_event_TLS_ALERT) {
if (data->cert_fail.depth)
wpa_printf(2, "authsrv: local TLS alert: %s", data->alert.description);
else
wpa_printf(2, "authsrv: remote TLS alert: %s", data->alert.des... | static void authsrv_tls_event(void *ctx, enum tls_event ev,
union tls_event_data *data) {
switch (ev) {
case TLS_CERT_CHAIN_SUCCESS:
wpa_printf(MSG_DEBUG, "authsrv: remote certificate verification success");
break;
case TLS_CERT_CHAIN_FAILURE:
wpa_printf(MSG_INFO,
... | authsrv_tls_event | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
const char *band_freq(mb_band_id band) {
return fst_get_str_name(band, band_names_1, 6u);
} | static const char *band_freq(enum mb_band_id band) {
static const char *band_names[] = {
[MB_BAND_ID_WIFI_2_4GHZ] = "2.4GHZ",
[MB_BAND_ID_WIFI_5GHZ] = "5GHZ",
[MB_BAND_ID_WIFI_60GHZ] = "60GHZ",
};
return fst_get_str_name(band, band_names, ARRAY_SIZE(band_names));
} | band_freq | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
unsigned char *base64_decode(const char *src, size_t len, size_t *out_len) {
return base64_gen_decode(
src, len, out_len,
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/");
} | unsigned char *base64_decode(const char *src, size_t len, size_t *out_len) {
return base64_gen_decode(src, len, out_len, base64_table);
} | base64_decode | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
char *base64_encode(const void *src, size_t len, size_t *out_len) {
return base64_gen_encode(
(const unsigned char *)src, len, out_len,
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", 3);
} | char *base64_encode(const void *src, size_t len, size_t *out_len) {
return base64_gen_encode(src, len, out_len, base64_table,
BASE64_PAD | BASE64_LF);
} | base64_encode | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
char *base64_encode_no_lf(const void *src, size_t len, size_t *out_len) {
return base64_gen_encode(
(const unsigned char *)src, len, out_len,
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", 1);
} | char *base64_encode_no_lf(const void *src, size_t len, size_t *out_len) {
return base64_gen_encode(src, len, out_len, base64_table, BASE64_PAD);
} | base64_encode_no_lf | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
unsigned char *base64_gen_decode(const char *src, size_t len, size_t *out_len,
const char *table) {
_BYTE *v5;
unsigned char val;
unsigned char tmp;
int pad;
unsigned char *pos;
size_t i;
size_t ia;
size_t ib;
size_t count;
size_t counta;
size_t extra_pad;
unsign... | static unsigned char *base64_gen_decode(const char *src, size_t len,
size_t *out_len, const char *table) {
unsigned char dtable[256], *out, *pos, block[4], tmp;
size_t i, count, olen;
int pad = 0;
size_t extra_pad;
os_memset(dtable, 0x80, 256);
for (i = 0; i < sizeof... | base64_gen_decode | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
char *base64_gen_encode(const unsigned char *src, size_t len, size_t *out_len,
const char *table, int add_pad) {
_BYTE *v6;
char *v7;
char *v8;
char *v9;
char *v10;
_BYTE *v11;
char *v12;
char *v13;
char add_pada;
int line_len;
char *pos;
char *posa;
const unsigned char... | static char *base64_gen_encode(const unsigned char *src, size_t len,
size_t *out_len, const char *table,
int add_pad) {
char *out, *pos;
const unsigned char *end, *in;
size_t olen;
int line_len;
if (len >= SIZE_MAX / 4)
return NULL;
olen = l... | base64_gen_encode | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
unsigned char *base64_url_decode(const char *src, size_t len, size_t *out_len) {
return base64_gen_decode(
src, len, out_len,
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_");
} | unsigned char *base64_url_decode(const char *src, size_t len, size_t *out_len) {
return base64_gen_decode(src, len, out_len, base64_url_table);
} | base64_url_decode | 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.