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 |
|---|---|---|---|---|---|---|---|
TNC_Result
TNC_TNCS_ProvideRecommendation(TNC_IMVID imvID, TNC_ConnectionID connectionID,
TNC_IMV_Action_Recommendation recommendation,
TNC_IMV_Evaluation_Result evaluation) {
IMV_Action_Recommendation recommendationa;
tncs_data *tncs;
recommendationa... | static TNC_Result
TNC_TNCS_ProvideRecommendation(TNC_IMVID imvID, TNC_ConnectionID connectionID,
TNC_IMV_Action_Recommendation recommendation,
TNC_IMV_Evaluation_Result evaluation) {
struct tncs_data *tncs;
wpa_printf(MSG_DEBUG,
"TNC: TNC_T... | TNC_TNCS_ProvideRecommendation | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
TNC_Result TNC_TNCS_ReportMessageTypes(TNC_IMVID imvID,
TNC_MessageTypeList supportedTypes,
TNC_UInt32 typeCount) {
TNC_UInt32 i;
tnc_if_imv *imv;
wpa_printf(2, "TNC: TNC_TNCS_ReportMessageTypes(imvID=%lu typeCount=%lu)",
... | static TNC_Result
TNC_TNCS_ReportMessageTypes(TNC_IMVID imvID, TNC_MessageTypeList supportedTypes,
TNC_UInt32 typeCount) {
TNC_UInt32 i;
struct tnc_if_imv *imv;
wpa_printf(MSG_DEBUG,
"TNC: TNC_TNCS_ReportMessageTypes(imvID=%lu "
"typeCount=%lu)",
... | TNC_TNCS_ReportMessageTypes | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
TNC_Result TNC_TNCS_RequestHandshakeRetry(TNC_IMVID imvID,
TNC_ConnectionID connectionID,
TNC_RetryReason reason) {
wpa_printf(2, "TNC: TNC_TNCS_RequestHandshakeRetry");
return 0;
} | static TNC_Result TNC_TNCS_RequestHandshakeRetry(TNC_IMVID imvID,
TNC_ConnectionID connectionID,
TNC_RetryReason reason) {
wpa_printf(MSG_DEBUG, "TNC: TNC_TNCS_RequestHandshakeRetry");
return TNC_RESULT_SUCCESS;
} | TNC_TNCS_RequestHandshakeRetry | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
TNC_Result TNC_TNCS_SendMessage(TNC_IMVID imvID, TNC_ConnectionID connectionID,
TNC_BufferReference message,
TNC_UInt32 messageLength,
TNC_MessageType messageType) {
u8 *v6;
int v7;
int messageTypea;
size_t b64len;
... | static TNC_Result TNC_TNCS_SendMessage(TNC_IMVID imvID,
TNC_ConnectionID connectionID,
TNC_BufferReference message,
TNC_UInt32 messageLength,
TNC_MessageType messag... | TNC_TNCS_SendMessage | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
TNC_Result TNC_TNCS_SetAttribute(TNC_IMVID imvID, TNC_ConnectionID connectionID,
TNC_AttributeID attribureID,
TNC_UInt32 bufferLength,
TNC_BufferReference buffer) {
wpa_printf(2, "TNC: TNC_TNCS_SetAttribute");
return ... | static TNC_Result TNC_TNCS_SetAttribute(TNC_IMVID imvID,
TNC_ConnectionID connectionID,
TNC_AttributeID attribureID,
TNC_UInt32 bufferLength,
TNC_BufferReferenc... | TNC_TNCS_SetAttribute | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void accounting_deinit(hostapd_data *hapd) { accounting_report_state(hapd, 0); } | void accounting_deinit(struct hostapd_data *hapd) {
accounting_report_state(hapd, 0);
} | accounting_deinit | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int accounting_init(hostapd_data *hapd) {
if (radius_gen_session_id((u8 *)&hapd->acct_session_id, 8u) < 0)
return -1;
if (radius_client_register(
hapd->radius, RADIUS_ACCT,
(RadiusRxResult (*)(radius_msg *, radius_msg *, const u8 *, size_t,
void *))accounting_re... | int accounting_init(struct hostapd_data *hapd) {
if (radius_gen_session_id((u8 *)&hapd->acct_session_id,
sizeof(hapd->acct_session_id)) < 0)
return -1;
if (radius_client_register(hapd->radius, RADIUS_ACCT, accounting_receive,
hapd))
return -1;
radi... | accounting_init | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void accounting_interim_error_cb(const u8 *addr, void *ctx) {
int v2;
unsigned int i;
int wait_time;
sta_info *sta;
sta = ap_get_sta((hostapd_data *)ctx, addr);
if (sta) {
if (++sta->acct_interim_errors <= 0xA) {
if (sta->acct_interim_errors == 1) {
wait_time = 0;
v2 = eloop_deple... | static void accounting_interim_error_cb(const u8 *addr, void *ctx) {
struct hostapd_data *hapd = ctx;
struct sta_info *sta;
unsigned int i, wait_time;
int res;
sta = ap_get_sta(hapd, addr);
if (!sta)
return;
sta->acct_interim_errors++;
if (sta->acct_interim_errors > 10) {
wpa_printf(MSG_DEBUG,
... | accounting_interim_error_cb | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void accounting_interim_update(void *eloop_ctx, void *timeout_ctx) {
hostap_sta_driver_data data;
unsigned long v3;
v3 = __readfsqword(0x28u);
if (*((_DWORD *)timeout_ctx + 40)) {
accounting_sta_interim((hostapd_data *)eloop_ctx, (sta_info *)timeout_ctx);
eloop_register_timeout(*((_DWORD *)timeout_ctx ... | static void accounting_interim_update(void *eloop_ctx, void *timeout_ctx) {
struct hostapd_data *hapd = eloop_ctx;
struct sta_info *sta = timeout_ctx;
int interval;
if (sta->acct_interim_interval) {
accounting_sta_interim(hapd, sta);
interval = sta->acct_interim_interval;
} else {
struct hostap_s... | accounting_interim_update | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
radius_msg *accounting_msg(hostapd_data *hapd, sta_info *sta, int status_type) {
u8 id;
u32 v5;
size_t v6;
const u8 *v7;
size_t v8;
__uint32_t v9;
int i;
size_t len;
u8 *val;
radius_msg *msg;
wpabuf *b;
os_time now;
char buf[136];
unsigned long v18;
v18 = __readfsqword(0x28u);
id = radi... | static struct radius_msg *accounting_msg(struct hostapd_data *hapd,
struct sta_info *sta,
int status_type) {
struct radius_msg *msg;
char buf[128];
u8 *val;
size_t len;
int i;
struct wpabuf *b;
struct os_time now;
msg = r... | accounting_msg | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
RadiusRxResult accounting_receive(radius_msg *msg, radius_msg *req,
const u8 *shared_secret,
size_t shared_secret_len, void *data) {
if (radius_msg_get_hdr(msg)->code == 5) {
if (radius_msg_verify(msg, shared_secret, shared_secret_len, req, 0)) {... | static RadiusRxResult accounting_receive(struct radius_msg *msg,
struct radius_msg *req,
const u8 *shared_secret,
size_t shared_secret_len, void *data) {
if (radius_msg_get_hdr(msg)->code != RADI... | accounting_receive | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void accounting_report_state(hostapd_data *hapd, int on) {
int v2;
size_t v3;
radius_msg *msg;
u8 buf[24];
unsigned long v6;
v6 = __readfsqword(0x28u);
if (hapd->conf->radius->acct_server && hapd->radius) {
v2 = on ? 7 : 8;
msg = accounting_msg(hapd, 0, v2);
if (msg) {
if (hapd->acct_se... | static void accounting_report_state(struct hostapd_data *hapd, int on) {
struct radius_msg *msg;
if (!hapd->conf->radius->acct_server || hapd->radius == NULL)
return;
msg = accounting_msg(hapd, NULL,
on ? RADIUS_ACCT_STATUS_TYPE_ACCOUNTING_ON
: RADIUS_ACCT_ST... | accounting_report_state | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int accounting_sta_get_id(hostapd_data *hapd, sta_info *sta) {
return radius_gen_session_id((u8 *)&sta->acct_session_id, 8u);
} | int accounting_sta_get_id(struct hostapd_data *hapd, struct sta_info *sta) {
return radius_gen_session_id((u8 *)&sta->acct_session_id,
sizeof(sta->acct_session_id));
} | accounting_sta_get_id | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void accounting_sta_interim(hostapd_data *hapd, sta_info *sta) {
if (sta->acct_session_started)
accounting_sta_report(hapd, sta, 0);
} | static void accounting_sta_interim(struct hostapd_data *hapd,
struct sta_info *sta) {
if (sta->acct_session_started)
accounting_sta_report(hapd, sta, 0);
} | accounting_sta_interim | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void accounting_sta_report(hostapd_data *hapd, sta_info *sta, int stop) {
int v3;
RadiusType v4;
u32 cause;
u64 bytes;
u64 bytesa;
radius_msg *msg;
os_reltime now_r;
os_reltime diff;
hostap_sta_driver_data data;
unsigned long v14;
v14 = __readfsqword(0x28u);
cause = sta->acct_terminate_cause;
... | static void accounting_sta_report(struct hostapd_data *hapd,
struct sta_info *sta, int stop) {
struct radius_msg *msg;
int cause = sta->acct_terminate_cause;
struct hostap_sta_driver_data data;
struct os_reltime now_r, diff;
u64 bytes;
if (!hapd->conf->radius->acct_server)... | accounting_sta_report | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void accounting_sta_start(hostapd_data *hapd, sta_info *sta) {
radius_msg *msg;
if (!sta->acct_session_started) {
hostapd_logger(hapd, sta->addr, 4u, 2,
"starting accounting session %016llX", sta->acct_session_id);
os_get_reltime(&sta->acct_session_start);
sta->last_rx_bytes_hi = 0;
... | void accounting_sta_start(struct hostapd_data *hapd, struct sta_info *sta) {
struct radius_msg *msg;
int interval;
if (sta->acct_session_started)
return;
hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_RADIUS, HOSTAPD_LEVEL_INFO,
"starting accounting session %016llX",
(uns... | accounting_sta_start | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void accounting_sta_stop(hostapd_data *hapd, sta_info *sta) {
if (sta->acct_session_started) {
accounting_sta_report(hapd, sta, 1);
eloop_cancel_timeout((eloop_timeout_handler)accounting_interim_update, hapd,
sta);
hostapd_logger(hapd, sta->addr, 4u, 2, "stopped accounting session... | void accounting_sta_stop(struct hostapd_data *hapd, struct sta_info *sta) {
if (sta->acct_session_started) {
accounting_sta_report(hapd, sta, 1);
eloop_cancel_timeout(accounting_interim_update, hapd, sta);
hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_RADIUS, HOSTAPD_LEVEL_INFO,
"stopp... | accounting_sta_stop | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int accounting_sta_update_stats(hostapd_data *hapd, sta_info *sta,
hostap_sta_driver_data *data) {
if (hostapd_drv_read_sta_data(hapd, data, sta->addr))
return -1;
if (!data->bytes_64bit) {
if (sta->last_rx_bytes_lo > data->rx_bytes)
++sta->last_rx_bytes_hi;
sta->la... | static int accounting_sta_update_stats(struct hostapd_data *hapd,
struct sta_info *sta,
struct hostap_sta_driver_data *data) {
if (hostapd_drv_read_sta_data(hapd, data, sta->addr))
return -1;
if (!data->bytes_64bit) {
if (sta->l... | accounting_sta_update_stats | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int ack_handler(nl_msg *msg, void *arg) {
*(_DWORD *)arg = 0;
return 2;
} | static int ack_handler(struct nl_msg *msg, void *arg) {
int *err = arg;
*err = 0;
return NL_STOP;
} | ack_handler | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int ack_handler_cookie(nl_msg *msg, void *arg) {
long v2;
u64 *cookie;
nlattr *attrs;
unsigned int attr_len;
nlattr *tb[5];
unsigned long v8;
v8 = __readfsqword(0x28u);
cookie = (u64 *)*((_QWORD *)arg + 1);
**(_DWORD **)arg = 0;
v2 = nlmsg_hdr(msg);
attrs = (nlattr *)(nlmsg_data(v2) + 20);
if (... | static int ack_handler_cookie(struct nl_msg *msg, void *arg) {
struct nl80211_ack_ext_arg *ext_arg = arg;
struct nlattr *tb[NLMSGERR_ATTR_MAX + 1];
u64 *cookie = ext_arg->ext_data;
struct nlattr *attrs;
size_t ack_len, attr_len;
*ext_arg->err = 0;
ack_len = sizeof(struct nlmsghdr) + sizeof(int) + sizeof(... | ack_handler_cookie | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void acs_adjust_center_freq(hostapd_iface *iface) {
u8 oper_chwidth_5;
int offset;
wpa_printf(2, "ACS: Adjusting VHT center frequency");
oper_chwidth_5 = hostapd_get_oper_chwidth_5(iface->conf);
if (oper_chwidth_5 == 2) {
LOBYTE(offset) = 14;
} else {
if (oper_chwidth_5 > 2u) {
LABEL_9:
w... | static void acs_adjust_center_freq(struct hostapd_iface *iface) {
int offset;
wpa_printf(MSG_DEBUG, "ACS: Adjusting VHT center frequency");
switch (hostapd_get_oper_chwidth(iface->conf)) {
case CHANWIDTH_USE_HT:
offset = 2 * iface->conf->secondary_channel;
break;
case CHANWIDTH_80MHZ:
offset = 6... | acs_adjust_center_freq | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void acs_clean_chan_surveys(hostapd_channel_data *chan) {
freq_survey *survey;
freq_survey *tmp;
if (!dl_list_empty_15(&chan->survey_list)) {
survey = (freq_survey *)&chan->survey_list.next[-4].prev;
tmp = (freq_survey *)&chan->survey_list.next->next[-4].prev;
while (&survey->list != &chan->survey_li... | static void acs_clean_chan_surveys(struct hostapd_channel_data *chan) {
struct freq_survey *survey, *tmp;
if (dl_list_empty(&chan->survey_list))
return;
dl_list_for_each_safe(survey, tmp, &chan->survey_list, struct freq_survey,
list) {
dl_list_del(&survey->list);
os_free(surv... | acs_clean_chan_surveys | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void acs_cleanup(hostapd_iface *iface) {
int i;
for (i = 0; i < iface->num_hw_features; ++i)
acs_cleanup_mode(&iface->hw_features[i]);
iface->chans_surveyed = 0;
iface->acs_num_completed_scans = 0;
} | void acs_cleanup(struct hostapd_iface *iface) {
int i;
for (i = 0; i < iface->num_hw_features; i++)
acs_cleanup_mode(&iface->hw_features[i]);
iface->chans_surveyed = 0;
iface->acs_num_completed_scans = 0;
} | acs_cleanup | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void acs_cleanup_mode(hostapd_hw_modes *mode) {
int flag;
int i;
hostapd_channel_data *chan;
for (i = 0; i < mode->num_channels; ++i) {
chan = &mode->channels[i];
if ((chan->flag & 0x80) != 0)
acs_clean_chan_surveys(chan);
dl_list_init_15(&chan->survey_list);
flag = chan->flag;
LOBYTE... | static void acs_cleanup_mode(struct hostapd_hw_modes *mode) {
int i;
struct hostapd_channel_data *chan;
for (i = 0; i < mode->num_channels; i++) {
chan = &mode->channels[i];
if (chan->flag & HOSTAPD_CHAN_SURVEY_LIST_INITIALIZED)
acs_clean_chan_surveys(chan);
dl_list_init(&chan->survey_list);
... | acs_cleanup_mode | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void acs_fail(hostapd_iface *iface) {
wpa_printf(5, "ACS: Failed to start");
acs_cleanup(iface);
hostapd_disable_iface(iface);
} | static void acs_fail(struct hostapd_iface *iface) {
wpa_printf(MSG_ERROR, "ACS: Failed to start");
acs_cleanup(iface);
hostapd_disable_iface(iface);
} | acs_fail | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
hostapd_channel_data *acs_find_chan(hostapd_iface *iface, int freq) {
int i;
hostapd_hw_modes *mode;
hostapd_channel_data *chan;
for (i = 0; i < iface->num_hw_features; ++i) {
mode = &iface->hw_features[i];
if (!hostapd_hw_skip_mode(iface, mode)) {
chan = acs_find_chan_mode(mode, freq);
if ... | static struct hostapd_channel_data *acs_find_chan(struct hostapd_iface *iface,
int freq) {
int i;
struct hostapd_hw_modes *mode;
struct hostapd_channel_data *chan;
for (i = 0; i < iface->num_hw_features; i++) {
mode = &iface->hw_features[i];
if (!hostap... | acs_find_chan | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
hostapd_channel_data *acs_find_chan_mode(hostapd_hw_modes *mode, int freq) {
int i;
hostapd_channel_data *chan;
for (i = 0; i < mode->num_channels; ++i) {
chan = &mode->channels[i];
if ((chan->flag & 1) == 0 && freq == chan->freq)
return &mode->channels[i];
}
return 0;
} | static struct hostapd_channel_data *
acs_find_chan_mode(struct hostapd_hw_modes *mode, int freq) {
struct hostapd_channel_data *chan;
int i;
for (i = 0; i < mode->num_channels; i++) {
chan = &mode->channels[i];
if (chan->flag & HOSTAPD_CHAN_DISABLED)
continue;
if (chan->freq == freq)
re... | acs_find_chan_mode | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
hostapd_channel_data *acs_find_ideal_chan(hostapd_iface *iface) {
u8 oper_chwidth_5;
u32 v3;
int i;
unsigned int n_chans;
unsigned int bw;
hostapd_channel_data *ideal_chan;
hostapd_channel_data *rand_chan;
hostapd_hw_modes *mode;
long double ideal_factor;
unsigned long v11;
v11 = __readfsqword(0x... | static struct hostapd_channel_data *
acs_find_ideal_chan(struct hostapd_iface *iface) {
struct hostapd_channel_data *ideal_chan = NULL, *rand_chan = NULL;
long double ideal_factor = 0;
int i;
int n_chans = 1;
u32 bw;
struct hostapd_hw_modes *mode;
if (is_6ghz_op_class(iface->conf->op_class)) {
bw = o... | acs_find_ideal_chan | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void acs_find_ideal_chan_mode(hostapd_iface *iface, hostapd_hw_modes *mode,
int n_chans, u32 bw,
hostapd_channel_data **rand_chan,
hostapd_channel_data **ideal_chan,
long double *ideal_factor) {
int... | static void acs_find_ideal_chan_mode(struct hostapd_iface *iface,
struct hostapd_hw_modes *mode, int n_chans,
u32 bw,
struct hostapd_channel_data **rand_chan,
struct hostap... | acs_find_ideal_chan_mode | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
hostapd_chan_status acs_init(hostapd_iface *iface) {
wpa_printf(3,
"ACS: Automatic channel selection started, this may take a bit");
if ((iface->drv_flags & 0x200000000LL) != 0) {
wpa_printf(3, "ACS: Offloading to driver");
if (hostapd_drv_do_acs(*iface->bss))
return hostapd_chan_status_H... | enum hostapd_chan_status acs_init(struct hostapd_iface *iface) {
wpa_printf(MSG_INFO,
"ACS: Automatic channel selection started, this may take a bit");
if (iface->drv_flags & WPA_DRIVER_FLAGS_ACS_OFFLOAD) {
wpa_printf(MSG_INFO, "ACS: Offloading to driver");
if (hostapd_drv_do_acs(iface->bss[0]... | acs_init | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int acs_request_scan(hostapd_iface *iface) {
int i;
int ia;
int num_channels;
int *freq;
hostapd_hw_modes *mode;
hostapd_hw_modes *modea;
wpa_driver_scan_params params;
unsigned long v9;
v9 = __readfsqword(0x28u);
memset(¶ms, 0, sizeof(params));
num_channels = 0;
for (i = 0; i < iface->num_... | static int acs_request_scan(struct hostapd_iface *iface) {
struct wpa_driver_scan_params params;
int i, *freq;
int num_channels;
struct hostapd_hw_modes *mode;
os_memset(¶ms, 0, sizeof(params));
num_channels = 0;
for (i = 0; i < iface->num_hw_features; i++) {
mode = &iface->hw_features[i];
i... | acs_request_scan | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int *acs_request_scan_add_freqs(hostapd_iface *iface, hostapd_hw_modes *mode,
int *freq) {
int *v3;
int i;
hostapd_channel_data *chan;
for (i = 0; i < mode->num_channels; ++i) {
chan = &mode->channels[i];
if ((chan->flag & 1) == 0 && is_in_chanlist_0(iface, chan) &&
... | static int *acs_request_scan_add_freqs(struct hostapd_iface *iface,
struct hostapd_hw_modes *mode,
int *freq) {
struct hostapd_channel_data *chan;
int i;
for (i = 0; i < mode->num_channels; i++) {
chan = &mode->channels[i];
if ... | acs_request_scan_add_freqs | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void acs_scan_complete(hostapd_iface *iface) {
iface->scan_cb = 0;
wpa_printf(2, "ACS: Using survey based algorithm (acs_num_scans=%d)",
iface->conf->acs_num_scans);
if (hostapd_drv_get_survey_0(*iface->bss, 0)) {
wpa_printf(5, "ACS: Failed to get survey data");
} else {
if (++iface->acs_nu... | static void acs_scan_complete(struct hostapd_iface *iface) {
int err;
iface->scan_cb = NULL;
wpa_printf(MSG_DEBUG, "ACS: Using survey based algorithm (acs_num_scans=%d)",
iface->conf->acs_num_scans);
err = hostapd_drv_get_survey(iface->bss[0], 0);
if (err) {
wpa_printf(MSG_ERROR, "ACS: Fai... | acs_scan_complete | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void acs_study(hostapd_iface *iface) {
int err;
hostapd_channel_data *ideal_chan;
err = acs_study_options(iface);
if (err >= 0) {
ideal_chan = acs_find_ideal_chan(iface);
if (ideal_chan) {
iface->conf->channel = ideal_chan->chan;
iface->freq = ideal_chan->freq;
if (iface->conf->ieee80... | static void acs_study(struct hostapd_iface *iface) {
struct hostapd_channel_data *ideal_chan;
int err;
err = acs_study_options(iface);
if (err < 0) {
wpa_printf(MSG_ERROR, "ACS: All study options have failed");
goto fail;
}
ideal_chan = acs_find_ideal_chan(iface);
if (!ideal_chan) {
wpa_prin... | acs_study | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int acs_study_options(hostapd_iface *iface) {
if (acs_study_survey_based(iface))
return -1;
else
return 0;
} | static int acs_study_options(struct hostapd_iface *iface) {
if (acs_study_survey_based(iface) == 0)
return 0;
return -1;
} | acs_study_options | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int acs_study_survey_based(hostapd_iface *iface) {
wpa_printf(2, "ACS: Trying survey-based ACS");
if (iface->chans_surveyed) {
if (acs_surveys_are_sufficient(iface)) {
acs_survey_all_chans_interference_factor(iface);
return 0;
} else {
wpa_printf(5, "ACS: Surveys have insufficient data");
... | static int acs_study_survey_based(struct hostapd_iface *iface) {
wpa_printf(MSG_DEBUG, "ACS: Trying survey-based ACS");
if (!iface->chans_surveyed) {
wpa_printf(MSG_ERROR, "ACS: Unable to collect survey data");
return -1;
}
if (!acs_surveys_are_sufficient(iface)) {
wpa_printf(MSG_ERROR, "ACS: Surv... | acs_study_survey_based | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void acs_survey_all_chans_interference_factor(hostapd_iface *iface) {
int i;
hostapd_hw_modes *mode;
for (i = 0; i < iface->num_hw_features; ++i) {
mode = &iface->hw_features[i];
if (!hostapd_hw_skip_mode(iface, mode))
acs_survey_mode_interference_factor(iface, mode);
}
} | static void
acs_survey_all_chans_interference_factor(struct hostapd_iface *iface) {
int i;
struct hostapd_hw_modes *mode;
for (i = 0; i < iface->num_hw_features; i++) {
mode = &iface->hw_features[i];
if (!hostapd_hw_skip_mode(iface, mode))
acs_survey_mode_interference_factor(iface, mode);
}
} | acs_survey_all_chans_interference_factor | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void acs_survey_chan_interference_factor(hostapd_iface *iface,
hostapd_channel_data *chan) {
long double v2;
unsigned int i;
unsigned int count;
freq_survey *survey;
i = 0;
count = 0;
if (!dl_list_empty_15(&chan->survey_list) && (chan->flag & 1) == 0) {
chan->... | static void
acs_survey_chan_interference_factor(struct hostapd_iface *iface,
struct hostapd_channel_data *chan) {
struct freq_survey *survey;
unsigned int i = 0;
long double int_factor = 0;
unsigned count = 0;
if (dl_list_empty(&chan->survey_list) || (chan->flag & HOSTAPD_... | acs_survey_chan_interference_factor | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
long double acs_survey_interference_factor(freq_survey *survey, s8 min_nf) {
double v3;
double v4;
long double v5;
long double y;
long double busy;
long double total;
if ((survey->filled & 4) != 0) {
busy = (long double)survey->channel_time_busy;
} else {
if ((survey->filled & 8) == 0) {
... | static long double acs_survey_interference_factor(struct freq_survey *survey,
s8 min_nf) {
long double factor, busy, total;
if (survey->filled & SURVEY_HAS_CHAN_TIME_BUSY)
busy = survey->channel_time_busy;
else if (survey->filled & SURVEY_HAS_CHAN_TIME_RX)
... | acs_survey_interference_factor | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int acs_survey_is_sufficient(freq_survey *survey) {
if ((survey->filled & 1) != 0) {
if ((survey->filled & 2) != 0) {
if ((survey->filled & 4) != 0 || (survey->filled & 8) != 0) {
return 1;
} else {
wpa_printf(3, "ACS: Survey is missing RX and busy time (at least one "
... | static int acs_survey_is_sufficient(struct freq_survey *survey) {
if (!(survey->filled & SURVEY_HAS_NF)) {
wpa_printf(MSG_INFO, "ACS: Survey is missing noise floor");
return 0;
}
if (!(survey->filled & SURVEY_HAS_CHAN_TIME)) {
wpa_printf(MSG_INFO, "ACS: Survey is missing channel time");
return 0;... | acs_survey_is_sufficient | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int acs_survey_list_is_sufficient(hostapd_channel_data *chan) {
int ret;
freq_survey *survey;
ret = -1;
for (survey = (freq_survey *)&chan->survey_list.next[-4].prev;
&survey->list != &chan->survey_list;
survey = (freq_survey *)&survey->list.next[-4].prev) {
if (acs_survey_is_sufficient(surve... | static int acs_survey_list_is_sufficient(struct hostapd_channel_data *chan) {
struct freq_survey *survey;
int ret = -1;
dl_list_for_each(survey, &chan->survey_list, struct freq_survey, list) {
if (acs_survey_is_sufficient(survey)) {
ret = 1;
break;
}
ret = 0;
}
if (ret == -1)
ret... | acs_survey_list_is_sufficient | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void acs_survey_mode_interference_factor(hostapd_iface *iface,
hostapd_hw_modes *mode) {
int i;
hostapd_channel_data *chan;
for (i = 0; i < mode->num_channels; ++i) {
chan = &mode->channels[i];
if (acs_usable_chan(chan) && is_in_chanlist_0(iface, chan) &&
... | static void acs_survey_mode_interference_factor(struct hostapd_iface *iface,
struct hostapd_hw_modes *mode) {
int i;
struct hostapd_channel_data *chan;
for (i = 0; i < mode->num_channels; i++) {
chan = &mode->channels[i];
if (!acs_usable_chan(chan))
... | acs_survey_mode_interference_factor | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int acs_surveys_are_sufficient(hostapd_iface *iface) {
int i;
hostapd_hw_modes *mode;
for (i = 0; i < iface->num_hw_features; ++i) {
mode = &iface->hw_features[i];
if (!hostapd_hw_skip_mode(iface, mode) &&
acs_surveys_are_sufficient_mode(mode))
return 1;
}
return 0;
} | static int acs_surveys_are_sufficient(struct hostapd_iface *iface) {
int i;
struct hostapd_hw_modes *mode;
for (i = 0; i < iface->num_hw_features; i++) {
mode = &iface->hw_features[i];
if (!hostapd_hw_skip_mode(iface, mode) &&
acs_surveys_are_sufficient_mode(mode))
return 1;
}
return 0... | acs_surveys_are_sufficient | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int acs_surveys_are_sufficient_mode(hostapd_hw_modes *mode) {
int i;
hostapd_channel_data *chan;
for (i = 0; i < mode->num_channels; ++i) {
chan = &mode->channels[i];
if ((chan->flag & 1) == 0 && acs_survey_list_is_sufficient(chan))
return 1;
}
return 0;
} | static int acs_surveys_are_sufficient_mode(struct hostapd_hw_modes *mode) {
int i;
struct hostapd_channel_data *chan;
for (i = 0; i < mode->num_channels; i++) {
chan = &mode->channels[i];
if (!(chan->flag & HOSTAPD_CHAN_DISABLED) &&
acs_survey_list_is_sufficient(chan))
return 1;
}
retu... | acs_surveys_are_sufficient_mode | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int acs_usable_bw160_chan(const hostapd_channel_data *chan) {
unsigned int i;
int allowed[10];
unsigned long v4;
v4 = __readfsqword(0x28u);
allowed[0] = 5180;
allowed[1] = 5500;
allowed[2] = 5955;
allowed[3] = 6115;
allowed[4] = 6275;
allowed[5] = 6435;
allowed[6] = 6595;
allowed[7] = 6755;
a... | static int acs_usable_bw160_chan(const struct hostapd_channel_data *chan) {
const int allowed[] = {5180, 5500, 5955, 6115, 6275, 6435, 6595, 6755, 6915};
unsigned int i;
for (i = 0; i < ARRAY_SIZE(allowed); i++)
if (chan->freq == allowed[i])
return 1;
return 0;
} | acs_usable_bw160_chan | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int acs_usable_bw40_chan(const hostapd_channel_data *chan) {
unsigned int i;
int allowed[42];
unsigned long v4;
v4 = __readfsqword(0x28u);
allowed[0] = 5180;
allowed[1] = 5220;
allowed[2] = 5260;
allowed[3] = 5300;
allowed[4] = 5500;
allowed[5] = 5540;
allowed[6] = 5580;
allowed[7] = 5620;
al... | static int acs_usable_bw40_chan(const struct hostapd_channel_data *chan) {
const int allowed[] = {5180, 5220, 5260, 5300, 5500, 5540, 5580, 5620, 5660,
5745, 5785, 4920, 4960, 5955, 5995, 6035, 6075, 6115,
6155, 6195, 6235, 6275, 6315, 6355, 6395, 6435, 6475,
... | acs_usable_bw40_chan | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int acs_usable_bw80_chan(const hostapd_channel_data *chan) {
unsigned int i;
int allowed[22];
unsigned long v4;
v4 = __readfsqword(0x28u);
allowed[0] = 5180;
allowed[1] = 5260;
allowed[2] = 5500;
allowed[3] = 5580;
allowed[4] = 5660;
allowed[5] = 5745;
allowed[6] = 5955;
allowed[7] = 6035;
al... | static int acs_usable_bw80_chan(const struct hostapd_channel_data *chan) {
const int allowed[] = {5180, 5260, 5500, 5580, 5660, 5745, 5955,
6035, 6115, 6195, 6275, 6355, 6435, 6515,
6595, 6675, 6755, 6835, 6915, 6995};
unsigned int i;
for (i = 0; i < ARRAY_SIZE(a... | acs_usable_bw80_chan | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int acs_usable_chan(hostapd_channel_data *chan) {
return !dl_list_empty_15(&chan->survey_list) && (chan->flag & 1) == 0 &&
acs_survey_list_is_sufficient(chan);
} | static int acs_usable_chan(struct hostapd_channel_data *chan) {
return !dl_list_empty(&chan->survey_list) &&
!(chan->flag & HOSTAPD_CHAN_DISABLED) &&
acs_survey_list_is_sufficient(chan);
} | acs_usable_chan | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int add_associated_sta(hostapd_data *hapd, sta_info *sta, int reassoc) {
int v3;
int v4;
size_t he_capab_len;
ieee80211_he_capabilities *p_he_cap;
ieee80211_vht_capabilities *p_vht_cap;
ieee80211_ht_capabilities *p_ht_cap;
const char *v9;
int set;
ieee80211_vht_capabilities vht_cap;
ieee80211_ht_cap... | static int add_associated_sta(struct hostapd_data *hapd, struct sta_info *sta,
int reassoc) {
struct ieee80211_ht_capabilities ht_cap;
struct ieee80211_vht_capabilities vht_cap;
struct ieee80211_he_capabilities he_cap;
int set = 1;
wpa_printf(MSG_DEBUG,
"Add associa... | add_associated_sta | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int add_buf(wpabuf **dst, const wpabuf *src) {
size_t v3;
if (!src)
return 0;
v3 = wpabuf_len_2(src);
if (wpabuf_resize(dst, v3))
return -1;
wpabuf_put_buf(*dst, src);
return 0;
} | static int add_buf(struct wpabuf **dst, const struct wpabuf *src) {
if (!src)
return 0;
if (wpabuf_resize(dst, wpabuf_len(src)) != 0)
return -1;
wpabuf_put_buf(*dst, src);
return 0;
} | add_buf | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int add_buf_data(wpabuf **dst, const u8 *data, size_t len) {
if (!data || !len)
return 0;
if (wpabuf_resize(dst, len))
return -1;
wpabuf_put_data(*dst, data, len);
return 0;
} | static int add_buf_data(struct wpabuf **dst, const u8 *data, size_t len) {
if (!data || !len)
return 0;
if (wpabuf_resize(dst, len) != 0)
return -1;
wpabuf_put_data(*dst, data, len);
return 0;
} | add_buf_data | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int add_common_radius_attr(hostapd_data *hapd, hostapd_radius_attr *req_attr,
sta_info *sta, radius_msg *msg) {
size_t v5;
size_t v6;
size_t v7;
const u8 *v8;
int lena;
int len;
hostapd_radius_attr *attr;
u8 buf[136];
unsigned long v15;
v15 = __readfsqword(0x28u);
if (h... | int add_common_radius_attr(struct hostapd_data *hapd,
struct hostapd_radius_attr *req_attr,
struct sta_info *sta, struct radius_msg *msg) {
char buf[128];
struct hostapd_radius_attr *attr;
int len;
if (!hostapd_config_get_radius_attr(req_attr, RADIUS_ATTR_N... | add_common_radius_attr | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int add_common_radius_sta_attr(hostapd_data *hapd,
hostapd_radius_attr *req_attr, sta_info *sta,
radius_msg *msg) {
size_t v5;
const char *v6;
const char *v7;
int v8;
size_t v9;
size_t v10;
size_t v11;
int v12;
u16 v13;
u8 buf[136];
uns... | static int add_common_radius_sta_attr(struct hostapd_data *hapd,
struct hostapd_radius_attr *req_attr,
struct sta_info *sta,
struct radius_msg *msg) {
char buf[128];
if (!hostapd_config_get_radius_attr... | add_common_radius_sta_attr | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int add_common_radius_sta_attr_rsn(hostapd_data *hapd,
hostapd_radius_attr *req_attr, sta_info *sta,
radius_msg *msg) {
int v5;
int ver;
int val;
int vala;
u32 suite;
u32 suitea;
u32 suiteb;
u32 suitec;
ver = wpa_auth_sta_wpa_versi... | static int add_common_radius_sta_attr_rsn(struct hostapd_data *hapd,
struct hostapd_radius_attr *req_attr,
struct sta_info *sta,
struct radius_msg *msg) {
u32 suite;
int ver, val;
ver = w... | add_common_radius_sta_attr_rsn | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void add_ifidx(wpa_driver_nl80211_data *drv, int ifidx, int ifidx_reason) {
int i;
drv_nl80211_if_info *old;
wpa_printf(2, "nl80211: Add own interface ifindex %d (ifidx_reason %d)",
ifidx, ifidx_reason);
if (have_ifidx(drv, ifidx, ifidx_reason)) {
wpa_printf(2, "nl80211: ifindex %d already in ... | static void add_ifidx(struct wpa_driver_nl80211_data *drv, int ifidx,
int ifidx_reason) {
int i;
struct drv_nl80211_if_info *old;
wpa_printf(MSG_DEBUG,
"nl80211: Add own interface ifindex %d (ifidx_reason %d)", ifidx,
ifidx_reason);
if (have_ifidx(drv, ifidx, ifi... | add_ifidx | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int add_monitor_filter(int s) {
int *v1;
char *v2;
int idx;
sock_filter *insn;
for (idx = 0; idx < msock_filter.len; ++idx) {
insn = &msock_filter_insns[idx];
if ((insn->code & 7) == 5) {
if (insn->code == 5) {
if (insn->k == 255) {
insn->k = msock_filter.len - idx - 2;
... | static int add_monitor_filter(int s) {
int idx;
for (idx = 0; idx < msock_filter.len; idx++) {
struct sock_filter *insn = &msock_filter_insns[idx];
if (BPF_CLASS(insn->code) == BPF_JMP) {
if (insn->code == (BPF_JMP | BPF_JA)) {
if (insn->k == PASS)
insn->k = msock_filter.len - idx ... | add_monitor_filter | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
size_t add_multi_ap_ie(u8 *buf, size_t len, u8 value) {
if (len <= 8)
return 0;
*buf = -35;
buf[1] = 7;
WPA_PUT_BE24_1(buf + 2, 0x506F9Au);
buf[5] = 27;
buf[6] = 6;
buf[7] = 1;
buf[8] = value;
return 9;
} | size_t add_multi_ap_ie(u8 *buf, size_t len, u8 value) {
u8 *pos = buf;
if (len < 9)
return 0;
*pos++ = WLAN_EID_VENDOR_SPECIFIC;
*pos++ = 7;
WPA_PUT_BE24(pos, OUI_WFA);
pos += 3;
*pos++ = MULTI_AP_OUI_TYPE;
*pos++ = MULTI_AP_SUB_ELEM_TYPE;
*pos++ = 1;
*pos++ = value;
return pos - buf;
} | add_multi_ap_ie | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int add_r0kh(hostapd_bss_config *bss, char *value) {
const char *v3;
const char *v4;
const char *next;
const char *nexta;
ft_remote_r0kh *r0kh;
char *pos;
r0kh = (ft_remote_r0kh *)os_zalloc(0x70u);
if (!r0kh)
return -1;
next = strchr(value, 32);
if (next) {
v3 = next++;
*v3 = 0;
}
i... | static int add_r0kh(struct hostapd_bss_config *bss, char *value) {
struct ft_remote_r0kh *r0kh;
char *pos, *next;
r0kh = os_zalloc(sizeof(*r0kh));
if (r0kh == NULL)
return -1;
pos = value;
next = os_strchr(pos, ' ');
if (next)
*next++ = '\0';
if (next == NULL || hwaddr_aton(pos, r0kh->addr)) {... | add_r0kh | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int add_r1kh(hostapd_bss_config *bss, char *value) {
const char *v3;
const char *v4;
const char *next;
const char *nexta;
ft_remote_r1kh *r1kh;
char *pos;
r1kh = (ft_remote_r1kh *)os_zalloc(0x40u);
if (!r1kh)
return -1;
next = strchr(value, 32);
if (next) {
v3 = next++;
*v3 = 0;
}
i... | static int add_r1kh(struct hostapd_bss_config *bss, char *value) {
struct ft_remote_r1kh *r1kh;
char *pos, *next;
r1kh = os_zalloc(sizeof(*r1kh));
if (r1kh == NULL)
return -1;
pos = value;
next = os_strchr(pos, ' ');
if (next)
*next++ = '\0';
if (next == NULL || hwaddr_aton(pos, r1kh->addr)) {... | add_r1kh | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int add_sqlite_radius_attr(hostapd_data *hapd, sta_info *sta, radius_msg *msg,
int acct) {
return 0;
} | int add_sqlite_radius_attr(struct hostapd_data *hapd, struct sta_info *sta,
struct radius_msg *msg, int acct) {
#ifdef CONFIG_SQLITE
const char *attrtxt;
char addrtxt[3 * ETH_ALEN];
char *sql;
sqlite3_stmt *stmt = NULL;
if (!hapd->rad_attr_db)
return 0;
os_snprintf(addrtxt, ... | add_sqlite_radius_attr | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int add_ssdp_network(const char *net_if) {
int *v1;
char *v2;
int *v3;
int ret;
int sock;
sockaddr_in *sin;
sockaddr_in *sina;
rtentry rt;
unsigned long v10;
v10 = __readfsqword(0x28u);
ret = -1;
sock = -1;
if (net_if) {
memset(&rt, 0, sizeof(rt));
sock = socket(2, 2, 0);
if (sock... | int add_ssdp_network(const char *net_if) {
#ifdef __linux__
int ret = -1;
int sock = -1;
struct rtentry rt;
struct sockaddr_in *sin;
if (!net_if)
goto fail;
os_memset(&rt, 0, sizeof(rt));
sock = socket(AF_INET, SOCK_DGRAM, 0);
if (sock < 0)
goto fail;
rt.rt_dev = (char *)net_if;
sin = ali... | add_ssdp_network | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void add_survey(nlattr **sinfo, u32 ifidx, dl_list *survey_list) {
freq_survey *survey;
survey = (freq_survey *)os_zalloc(0x48u);
if (survey) {
survey->ifidx = ifidx;
survey->freq = nla_get_u32(sinfo[1]);
survey->filled = 0;
if (sinfo[2]) {
survey->nf = nla_get_u8(sinfo[2]);
survey->f... | static void add_survey(struct nlattr **sinfo, u32 ifidx,
struct dl_list *survey_list) {
struct freq_survey *survey;
survey = os_zalloc(sizeof(struct freq_survey));
if (!survey)
return;
survey->ifidx = ifidx;
survey->freq = nla_get_u32(sinfo[NL80211_SURVEY_INFO_FREQUENCY]);
surve... | add_survey | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void advertisement_state_machine_handler(void *eloop_data, void *user_ctx) {
size_t v2;
const void *v3;
int *v4;
char *v5;
int *v6;
u16 r;
int islast;
int next_timeout_msec;
int next_timeout_sec;
upnp_wps_device_sm *sm;
advertisement_state_machine *a;
wpabuf *msg;
sockaddr_in dest;
unsigned ... | static void advertisement_state_machine_handler(void *eloop_data,
void *user_ctx) {
struct upnp_wps_device_sm *sm = user_ctx;
struct advertisement_state_machine *a = &sm->advertisement;
struct wpabuf *msg;
int next_timeout_msec = 100;
int next_timeout_sec = 0;
... | advertisement_state_machine_handler | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int advertisement_state_machine_start(upnp_wps_device_sm *sm) {
unsigned char v1;
advertisement_state_machine_stop(sm, 0);
sm->advertisement.type = advertisement_type_enum_ADVERTISE_DOWN;
sm->advertisement.state = 0;
v1 = os_random();
return eloop_register_timeout(
0, (100 * (unsigned long)v1) >> 8,
... | int advertisement_state_machine_start(struct upnp_wps_device_sm *sm) {
struct advertisement_state_machine *a = &sm->advertisement;
int next_timeout_msec;
advertisement_state_machine_stop(sm, 0);
a->type = ADVERTISE_DOWN;
a->state = 0;
next_timeout_msec = (100 * (os_random() & 0xFF)) >> 8;
return eloop_... | advertisement_state_machine_start | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void advertisement_state_machine_stop(upnp_wps_device_sm *sm, int send_byebye) {
size_t v2;
const void *v3;
int *v4;
char *v5;
int *v6;
int islast;
advertisement_state_machine *a;
wpabuf *msg;
sockaddr_in dest;
unsigned long v11;
v11 = __readfsqword(0x28u);
a = &sm->advertisement;
islast = 0;... | void advertisement_state_machine_stop(struct upnp_wps_device_sm *sm,
int send_byebye) {
struct advertisement_state_machine *a = &sm->advertisement;
int islast = 0;
struct wpabuf *msg;
struct sockaddr_in dest;
eloop_cancel_timeout(advertisement_state_machine_handler, NULL... | advertisement_state_machine_stop | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int aes_128_ctr_encrypt(const u8 *key, const u8 *nonce, u8 *data,
size_t data_len) {
return aes_ctr_encrypt(key, 0x10u, nonce, data, data_len);
} | int aes_128_ctr_encrypt(const u8 *key, const u8 *nonce, u8 *data,
size_t data_len) {
return aes_ctr_encrypt(key, 16, nonce, data, data_len);
} | aes_128_ctr_encrypt | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int aes_128_eax_encrypt(const u8 *key, const u8 *nonce, size_t nonce_len,
const u8 *hdr, size_t hdr_len, u8 *data,
size_t data_len, u8 *tag) {
int i;
int ret;
size_t buf_len;
size_t buf_lena;
u8 *buf;
u8 nonce_mac[16];
u8 hdr_mac[16];
u8 data_mac[24];
un... | int aes_128_eax_encrypt(const u8 *key, const u8 *nonce, size_t nonce_len,
const u8 *hdr, size_t hdr_len, u8 *data,
size_t data_len, u8 *tag) {
u8 *buf;
size_t buf_len;
u8 nonce_mac[AES_BLOCK_SIZE], hdr_mac[AES_BLOCK_SIZE],
data_mac[AES_BLOCK_SIZE];
int i, re... | aes_128_eax_encrypt | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int aes_ctr_encrypt(const u8 *key, size_t key_len, const u8 *nonce, u8 *data,
size_t data_len) {
long v6;
size_t v7;
int i;
size_t j;
void *ctx;
u8 counter[16];
u8 buf[24];
unsigned long v16;
v16 = __readfsqword(0x28u);
ctx = aes_encrypt_init(key, key_len);
if (!ctx)
retur... | int aes_ctr_encrypt(const u8 *key, size_t key_len, const u8 *nonce, u8 *data,
size_t data_len) {
void *ctx;
size_t j, len, left = data_len;
int i;
u8 *pos = data;
u8 counter[AES_BLOCK_SIZE], buf[AES_BLOCK_SIZE];
ctx = aes_encrypt_init(key, key_len);
if (ctx == NULL)
return -1;
o... | aes_ctr_encrypt | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int aes_s2v(const u8 *key, size_t key_len, size_t num_elem, const u8 **addr,
size_t *len, u8 *mac) {
int ret;
int reta;
int retb;
size_t i;
u8 *buf;
const u8 *data[1];
size_t data_len[1];
u8 tmp[16];
u8 tmp2[24];
unsigned long v20;
v20 = __readfsqword(0x28u);
if (num_elem) {
dat... | static int aes_s2v(const u8 *key, size_t key_len, size_t num_elem,
const u8 *addr[], size_t *len, u8 *mac) {
u8 tmp[AES_BLOCK_SIZE], tmp2[AES_BLOCK_SIZE];
u8 *buf = NULL;
int ret;
size_t i;
const u8 *data[1];
size_t data_len[1];
if (!num_elem) {
os_memcpy(tmp, zero, sizeof(zero));
... | aes_s2v | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int aes_siv_decrypt(const u8 *key, size_t key_len, const u8 *iv_crypt,
size_t iv_c_len, size_t num_elem, const u8 **addr,
const size_t *len, u8 *out) {
long v9;
size_t key_lena;
int ret;
int reta;
size_t i;
size_t crypt_len;
const u8 *_addr[6];
size_t _len[6];
u... | int aes_siv_decrypt(const u8 *key, size_t key_len, const u8 *iv_crypt,
size_t iv_c_len, size_t num_elem, const u8 *addr[],
const size_t *len, u8 *out) {
const u8 *_addr[6];
size_t _len[6];
const u8 *k1, *k2;
size_t crypt_len;
size_t i;
int ret;
u8 iv[AES_BLOCK_SIZE]... | aes_siv_decrypt | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int aes_siv_encrypt(const u8 *key, size_t key_len, const u8 *pw, size_t pwlen,
size_t num_elem, const u8 **addr, const size_t *len,
u8 *out) {
long v9;
size_t key_lena;
size_t i;
const u8 *_addr[6];
size_t _len[6];
u8 v[24];
unsigned long v17;
v17 = __readfsqword... | int aes_siv_encrypt(const u8 *key, size_t key_len, const u8 *pw, size_t pwlen,
size_t num_elem, const u8 *addr[], const size_t *len,
u8 *out) {
const u8 *_addr[6];
size_t _len[6];
const u8 *k1, *k2;
u8 v[AES_BLOCK_SIZE];
size_t i;
u8 *iv, *crypt_pw;
if (num_elem > ... | aes_siv_encrypt | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int allowed_ht40_channel_pair(hostapd_hw_mode mode,
hostapd_channel_data *p_chan,
hostapd_channel_data *s_chan) {
int v4;
int ok;
int pri_chan;
int sec_chan;
size_t k;
int allowed[18];
unsigned long v11;
v11 = __readfsqword(0x28u);
allowed[0... | int allowed_ht40_channel_pair(enum hostapd_hw_mode mode,
struct hostapd_channel_data *p_chan,
struct hostapd_channel_data *s_chan) {
int ok, first;
int allowed[] = {36, 44, 52, 60, 100, 108, 116, 124,
132, 140, 149, 157, 165, 173, 18... | allowed_ht40_channel_pair | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void anqp_add_3gpp_cellular_network(hostapd_data *hapd, wpabuf *buf) {
if (!anqp_add_override(hapd, buf, 0x108u)) {
if (hapd->conf->anqp_3gpp_cell_net) {
wpabuf_put_le16_8(buf, 0x108u);
wpabuf_put_le16_8(buf, hapd->conf->anqp_3gpp_cell_net_len);
wpabuf_put_data_52(buf, hapd->conf->anqp_3gpp_cell... | static void anqp_add_3gpp_cellular_network(struct hostapd_data *hapd,
struct wpabuf *buf) {
if (anqp_add_override(hapd, buf, ANQP_3GPP_CELLULAR_NETWORK))
return;
if (hapd->conf->anqp_3gpp_cell_net) {
wpabuf_put_le16(buf, ANQP_3GPP_CELLULAR_NETWORK);
wpabuf_put... | anqp_add_3gpp_cellular_network | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void anqp_add_capab_list(hostapd_data *hapd, wpabuf *buf) {
u16 id;
u8 *len;
if (!anqp_add_override(hapd, buf, 0x101u)) {
len = gas_anqp_add_element(buf, 0x101u);
wpabuf_put_le16_8(buf, 0x101u);
if (hapd->conf->venue_name || get_anqp_elem(hapd, 0x102u))
wpabuf_put_le16_8(buf, 0x102u);
if (g... | static void anqp_add_capab_list(struct hostapd_data *hapd, struct wpabuf *buf) {
u8 *len;
u16 id;
if (anqp_add_override(hapd, buf, ANQP_CAPABILITY_LIST))
return;
len = gas_anqp_add_element(buf, ANQP_CAPABILITY_LIST);
wpabuf_put_le16(buf, ANQP_CAPABILITY_LIST);
if (hapd->conf->venue_name || get_anqp_el... | anqp_add_capab_list | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void anqp_add_connection_capability(hostapd_data *hapd, wpabuf *buf) {
u8 *len;
if (hapd->conf->hs20_connection_capability) {
len = gas_anqp_add_element(buf, 0xDDDDu);
wpabuf_put_be24_4(buf, 0x506F9Au);
wpabuf_put_u8_43(buf, 0x11u);
wpabuf_put_u8_43(buf, 5u);
wpabuf_put_u8_43(buf, 0);
wpabu... | static void anqp_add_connection_capability(struct hostapd_data *hapd,
struct wpabuf *buf) {
if (hapd->conf->hs20_connection_capability) {
u8 *len = gas_anqp_add_element(buf, ANQP_VENDOR_SPECIFIC);
wpabuf_put_be24(buf, OUI_WFA);
wpabuf_put_u8(buf, HS20_ANQP_OUI_TY... | anqp_add_connection_capability | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void anqp_add_domain_name(hostapd_data *hapd, wpabuf *buf) {
if (!anqp_add_override(hapd, buf, 0x10Cu)) {
if (hapd->conf->domain_name) {
wpabuf_put_le16_8(buf, 0x10Cu);
wpabuf_put_le16_8(buf, hapd->conf->domain_name_len);
wpabuf_put_data_52(buf, hapd->conf->domain_name,
... | static void anqp_add_domain_name(struct hostapd_data *hapd,
struct wpabuf *buf) {
if (anqp_add_override(hapd, buf, ANQP_DOMAIN_NAME))
return;
if (hapd->conf->domain_name) {
wpabuf_put_le16(buf, ANQP_DOMAIN_NAME);
wpabuf_put_le16(buf, hapd->conf->domain_name_len);
wp... | anqp_add_domain_name | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void anqp_add_elem(hostapd_data *hapd, wpabuf *buf, u16 infoid) {
size_t v3;
u16 v4;
anqp_element *elem;
elem = get_anqp_elem(hapd, infoid);
if (elem) {
v3 = wpabuf_tailroom_8(buf);
if (v3 >= wpabuf_len_75(elem->payload) + 4) {
wpabuf_put_le16_8(buf, infoid);
v4 = wpabuf_len_75(elem->payl... | static void anqp_add_elem(struct hostapd_data *hapd, struct wpabuf *buf,
u16 infoid) {
struct anqp_element *elem;
elem = get_anqp_elem(hapd, infoid);
if (!elem)
return;
if (wpabuf_tailroom(buf) < 2 + 2 + wpabuf_len(elem->payload)) {
wpa_printf(MSG_DEBUG, "ANQP: No room for Inf... | anqp_add_elem | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void anqp_add_hs_capab_list(hostapd_data *hapd, wpabuf *buf) {
u8 *len;
len = gas_anqp_add_element(buf, 0xDDDDu);
wpabuf_put_be24_4(buf, 0x506F9Au);
wpabuf_put_u8_43(buf, 0x11u);
wpabuf_put_u8_43(buf, 2u);
wpabuf_put_u8_43(buf, 0);
wpabuf_put_u8_43(buf, 2u);
if (hapd->conf->hs20_oper_friendly_name)
... | static void anqp_add_hs_capab_list(struct hostapd_data *hapd,
struct wpabuf *buf) {
u8 *len;
len = gas_anqp_add_element(buf, ANQP_VENDOR_SPECIFIC);
wpabuf_put_be24(buf, OUI_WFA);
wpabuf_put_u8(buf, HS20_ANQP_OUI_TYPE);
wpabuf_put_u8(buf, HS20_STYPE_CAPABILITY_LIST);
wpabu... | anqp_add_hs_capab_list | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void anqp_add_icon(wpabuf *buf, hostapd_bss_config *bss, const char *name) {
u8 v3;
u8 v4;
size_t j;
hs20_icon *icon;
icon = 0;
for (j = 0; j < bss->hs20_icons_count && !icon; ++j) {
if (!strcmp(name, bss->hs20_icons[j].name))
icon = &bss->hs20_icons[j];
}
if (icon) {
wpabuf_put_le16_8(bu... | static void anqp_add_icon(struct wpabuf *buf, struct hostapd_bss_config *bss,
const char *name) {
size_t j;
struct hs20_icon *icon = NULL;
for (j = 0; j < bss->hs20_icons_count && !icon; j++) {
if (os_strcmp(name, bss->hs20_icons[j].name) == 0)
icon = &bss->hs20_icons[j];
}
... | anqp_add_icon | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void anqp_add_icon_binary_file(hostapd_data *hapd, wpabuf *buf, const u8 *name,
size_t name_len) {
u8 v4;
size_t data_len;
hs20_icon *icon;
size_t i;
u8 *len;
char *data;
unsigned long v12;
v12 = __readfsqword(0x28u);
wpa_hexdump_ascii(2, "HS 2.0: Requested Icon Filenam... | static void anqp_add_icon_binary_file(struct hostapd_data *hapd,
struct wpabuf *buf, const u8 *name,
size_t name_len) {
struct hs20_icon *icon;
size_t i;
u8 *len;
wpa_hexdump_ascii(MSG_DEBUG, "HS 2.0: Requested Icon Filename", name,
... | anqp_add_icon_binary_file | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void anqp_add_ip_addr_type_availability(hostapd_data *hapd, wpabuf *buf) {
if (!anqp_add_override(hapd, buf, 0x106u)) {
if (hapd->conf->ipaddr_type_configured) {
wpabuf_put_le16_8(buf, 0x106u);
wpabuf_put_le16_8(buf, 1u);
wpabuf_put_u8_43(buf, hapd->conf->ipaddr_type_availability);
}
}
} | static void anqp_add_ip_addr_type_availability(struct hostapd_data *hapd,
struct wpabuf *buf) {
if (anqp_add_override(hapd, buf, ANQP_IP_ADDR_TYPE_AVAILABILITY))
return;
if (hapd->conf->ipaddr_type_configured) {
wpabuf_put_le16(buf, ANQP_IP_ADDR_TYPE_AVAILABIL... | anqp_add_ip_addr_type_availability | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void anqp_add_nai_realm(hostapd_data *hapd, wpabuf *buf, const u8 *home_realm,
size_t home_realm_len, int nai_realm,
int nai_home_realm) {
unsigned int i;
unsigned int j;
u8 *len;
hostapd_nai_realm_data *realm;
u8 *realm_data_len;
u8 *realm_len;
if (!nai_re... | static void anqp_add_nai_realm(struct hostapd_data *hapd, struct wpabuf *buf,
const u8 *home_realm, size_t home_realm_len,
int nai_realm, int nai_home_realm) {
if (nai_realm && !nai_home_realm &&
anqp_add_override(hapd, buf, ANQP_NAI_REALM))
retu... | anqp_add_nai_realm | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void anqp_add_nai_realm_data(wpabuf *buf, hostapd_nai_realm_data *realm,
unsigned int realm_idx) {
int v3;
u8 v4;
u8 *realm_data_len;
v3 = strlen(realm->realm[realm_idx]);
wpa_printf(2, "realm=%s, len=%d", realm->realm[realm_idx], v3);
realm_data_len = (u8 *)wpabuf_put(buf, 2u)... | static void anqp_add_nai_realm_data(struct wpabuf *buf,
struct hostapd_nai_realm_data *realm,
unsigned int realm_idx) {
u8 *realm_data_len;
wpa_printf(MSG_DEBUG, "realm=%s, len=%d", realm->realm[realm_idx],
(int)os_strlen(realm->r... | anqp_add_nai_realm_data | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void anqp_add_nai_realm_eap(wpabuf *buf, hostapd_nai_realm_data *realm) {
unsigned int i;
unsigned int j;
hostapd_nai_realm_eap *eap;
wpabuf_put_u8_43(buf, realm->eap_method_count);
for (i = 0; i < realm->eap_method_count; ++i) {
eap = &realm->eap_method[i];
wpabuf_put_u8_43(buf, 3 * realm->eap_metho... | static void anqp_add_nai_realm_eap(struct wpabuf *buf,
struct hostapd_nai_realm_data *realm) {
unsigned int i, j;
wpabuf_put_u8(buf, realm->eap_method_count);
for (i = 0; i < realm->eap_method_count; i++) {
struct hostapd_nai_realm_eap *eap = &realm->eap_method[i];
wpa... | anqp_add_nai_realm_eap | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void anqp_add_network_auth_type(hostapd_data *hapd, wpabuf *buf) {
if (!anqp_add_override(hapd, buf, 0x104u)) {
if (hapd->conf->network_auth_type) {
wpabuf_put_le16_8(buf, 0x104u);
wpabuf_put_le16_8(buf, hapd->conf->network_auth_type_len);
wpabuf_put_data_52(buf, hapd->conf->network_auth_type,
... | static void anqp_add_network_auth_type(struct hostapd_data *hapd,
struct wpabuf *buf) {
if (anqp_add_override(hapd, buf, ANQP_NETWORK_AUTH_TYPE))
return;
if (hapd->conf->network_auth_type) {
wpabuf_put_le16(buf, ANQP_NETWORK_AUTH_TYPE);
wpabuf_put_le16(buf, hapd->... | anqp_add_network_auth_type | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void anqp_add_operating_class(hostapd_data *hapd, wpabuf *buf) {
u8 *len;
if (hapd->conf->hs20_operating_class) {
len = gas_anqp_add_element(buf, 0xDDDDu);
wpabuf_put_be24_4(buf, 0x506F9Au);
wpabuf_put_u8_43(buf, 0x11u);
wpabuf_put_u8_43(buf, 7u);
wpabuf_put_u8_43(buf, 0);
wpabuf_put_data_5... | static void anqp_add_operating_class(struct hostapd_data *hapd,
struct wpabuf *buf) {
if (hapd->conf->hs20_operating_class) {
u8 *len = gas_anqp_add_element(buf, ANQP_VENDOR_SPECIFIC);
wpabuf_put_be24(buf, OUI_WFA);
wpabuf_put_u8(buf, HS20_ANQP_OUI_TYPE);
wpabuf_pu... | anqp_add_operating_class | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void anqp_add_operator_friendly_name(hostapd_data *hapd, wpabuf *buf) {
unsigned int i;
u8 *len;
hostapd_lang_string *vn;
if (hapd->conf->hs20_oper_friendly_name) {
len = gas_anqp_add_element(buf, 0xDDDDu);
wpabuf_put_be24_4(buf, 0x506F9Au);
wpabuf_put_u8_43(buf, 0x11u);
wpabuf_put_u8_43(buf, 3... | static void anqp_add_operator_friendly_name(struct hostapd_data *hapd,
struct wpabuf *buf) {
if (hapd->conf->hs20_oper_friendly_name) {
u8 *len;
unsigned int i;
len = gas_anqp_add_element(buf, ANQP_VENDOR_SPECIFIC);
wpabuf_put_be24(buf, OUI_WFA);
wpabuf_... | anqp_add_operator_friendly_name | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void anqp_add_operator_icon_metadata(hostapd_data *hapd, wpabuf *buf) {
size_t i;
hostapd_bss_config *bss;
u8 *len;
bss = hapd->conf;
if (bss->hs20_operator_icon_count) {
len = gas_anqp_add_element(buf, 0xDDDDu);
wpabuf_put_be24_4(buf, 0x506F9Au);
wpabuf_put_u8_43(buf, 0x11u);
wpabuf_put_u8_4... | static void anqp_add_operator_icon_metadata(struct hostapd_data *hapd,
struct wpabuf *buf) {
struct hostapd_bss_config *bss = hapd->conf;
size_t i;
u8 *len;
if (!bss->hs20_operator_icon_count)
return;
len = gas_anqp_add_element(buf, ANQP_VENDOR_SPECIFIC);
w... | anqp_add_operator_icon_metadata | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void anqp_add_osu_provider(wpabuf *buf, hostapd_bss_config *bss,
hs20_osu_provider *p) {
u16 v3;
u8 v4;
u16 v5;
u8 v6;
u16 v7;
u16 v8;
unsigned int i;
unsigned int ia;
unsigned int ib;
unsigned int ic;
u8 *len;
u8 *len2;
u8 *len2a;
u8 *len2b;
u8 *count;
hostapd... | static void anqp_add_osu_provider(struct wpabuf *buf,
struct hostapd_bss_config *bss,
struct hs20_osu_provider *p) {
u8 *len, *len2, *count;
unsigned int i;
len = wpabuf_put(buf, 2);
len2 = wpabuf_put(buf, 2);
for (i = 0; i < p->friendly_na... | anqp_add_osu_provider | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void anqp_add_osu_provider_nai(wpabuf *buf, hs20_osu_provider *p) {
u8 v2;
if (p->osu_nai2) {
v2 = strlen(p->osu_nai2);
wpabuf_put_u8_43(buf, v2);
wpabuf_put_str_11(buf, p->osu_nai2);
} else {
wpabuf_put_u8_43(buf, 0);
}
} | static void anqp_add_osu_provider_nai(struct wpabuf *buf,
struct hs20_osu_provider *p) {
if (p->osu_nai2) {
wpabuf_put_u8(buf, os_strlen(p->osu_nai2));
wpabuf_put_str(buf, p->osu_nai2);
} else {
wpabuf_put_u8(buf, 0);
}
} | anqp_add_osu_provider_nai | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void anqp_add_osu_providers_list(hostapd_data *hapd, wpabuf *buf) {
size_t i;
u8 *len;
if (hapd->conf->hs20_osu_providers_count) {
len = gas_anqp_add_element(buf, 0xDDDDu);
wpabuf_put_be24_4(buf, 0x506F9Au);
wpabuf_put_u8_43(buf, 0x11u);
wpabuf_put_u8_43(buf, 8u);
wpabuf_put_u8_43(buf, 0);
... | static void anqp_add_osu_providers_list(struct hostapd_data *hapd,
struct wpabuf *buf) {
if (hapd->conf->hs20_osu_providers_count) {
size_t i;
u8 *len = gas_anqp_add_element(buf, ANQP_VENDOR_SPECIFIC);
wpabuf_put_be24(buf, OUI_WFA);
wpabuf_put_u8(buf, HS20_ANQP_... | anqp_add_osu_providers_list | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void anqp_add_osu_providers_nai_list(hostapd_data *hapd, wpabuf *buf) {
size_t i;
u8 *len;
if (hapd->conf->hs20_osu_providers_nai_count) {
len = gas_anqp_add_element(buf, 0xDDDDu);
wpabuf_put_be24_4(buf, 0x506F9Au);
wpabuf_put_u8_43(buf, 0x11u);
wpabuf_put_u8_43(buf, 0xDu);
wpabuf_put_u8_43(b... | static void anqp_add_osu_providers_nai_list(struct hostapd_data *hapd,
struct wpabuf *buf) {
if (hapd->conf->hs20_osu_providers_nai_count) {
size_t i;
u8 *len = gas_anqp_add_element(buf, ANQP_VENDOR_SPECIFIC);
wpabuf_put_be24(buf, OUI_WFA);
wpabuf_put_u8(buf... | anqp_add_osu_providers_nai_list | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int anqp_add_override(hostapd_data *hapd, wpabuf *buf, u16 infoid) {
if (!get_anqp_elem(hapd, infoid))
return 0;
anqp_add_elem(hapd, buf, infoid);
return 1;
} | static int anqp_add_override(struct hostapd_data *hapd, struct wpabuf *buf,
u16 infoid) {
if (get_anqp_elem(hapd, infoid)) {
anqp_add_elem(hapd, buf, infoid);
return 1;
}
return 0;
} | anqp_add_override | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void anqp_add_roaming_consortium(hostapd_data *hapd, wpabuf *buf) {
unsigned int i;
u8 *len;
hostapd_roaming_consortium *rc;
if (!anqp_add_override(hapd, buf, 0x105u)) {
len = gas_anqp_add_element(buf, 0x105u);
for (i = 0; i < hapd->conf->roaming_consortium_count; ++i) {
rc = &hapd->conf->roaming... | static void anqp_add_roaming_consortium(struct hostapd_data *hapd,
struct wpabuf *buf) {
unsigned int i;
u8 *len;
if (anqp_add_override(hapd, buf, ANQP_ROAMING_CONSORTIUM))
return;
len = gas_anqp_add_element(buf, ANQP_ROAMING_CONSORTIUM);
for (i = 0; i < hapd->con... | anqp_add_roaming_consortium | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void anqp_add_venue_name(hostapd_data *hapd, wpabuf *buf) {
unsigned int i;
u8 *len;
hostapd_lang_string *vn;
if (!anqp_add_override(hapd, buf, 0x102u) && hapd->conf->venue_name) {
len = gas_anqp_add_element(buf, 0x102u);
wpabuf_put_u8_43(buf, hapd->conf->venue_group);
wpabuf_put_u8_43(buf, hapd->c... | static void anqp_add_venue_name(struct hostapd_data *hapd, struct wpabuf *buf) {
if (anqp_add_override(hapd, buf, ANQP_VENUE_NAME))
return;
if (hapd->conf->venue_name) {
u8 *len;
unsigned int i;
len = gas_anqp_add_element(buf, ANQP_VENUE_NAME);
wpabuf_put_u8(buf, hapd->conf->venue_group);
w... | anqp_add_venue_name | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void anqp_add_venue_url(hostapd_data *hapd, wpabuf *buf) {
unsigned int i;
u8 *len;
hostapd_venue_url *url;
if (!anqp_add_override(hapd, buf, 0x115u) && hapd->conf->venue_url) {
len = gas_anqp_add_element(buf, 0x115u);
for (i = 0; i < hapd->conf->venue_url_count; ++i) {
url = &hapd->conf->venue_u... | static void anqp_add_venue_url(struct hostapd_data *hapd, struct wpabuf *buf) {
if (anqp_add_override(hapd, buf, ANQP_VENUE_URL))
return;
if (hapd->conf->venue_url) {
u8 *len;
unsigned int i;
len = gas_anqp_add_element(buf, ANQP_VENUE_URL);
for (i = 0; i < hapd->conf->venue_url_count; i++) {
... | anqp_add_venue_url | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void anqp_add_wan_metrics(hostapd_data *hapd, wpabuf *buf) {
u8 *len;
if (hapd->conf->hs20_wan_metrics) {
len = gas_anqp_add_element(buf, 0xDDDDu);
wpabuf_put_be24_4(buf, 0x506F9Au);
wpabuf_put_u8_43(buf, 0x11u);
wpabuf_put_u8_43(buf, 4u);
wpabuf_put_u8_43(buf, 0);
wpabuf_put_data_52(buf, h... | static void anqp_add_wan_metrics(struct hostapd_data *hapd,
struct wpabuf *buf) {
if (hapd->conf->hs20_wan_metrics) {
u8 *len = gas_anqp_add_element(buf, ANQP_VENDOR_SPECIFIC);
wpabuf_put_be24(buf, OUI_WFA);
wpabuf_put_u8(buf, HS20_ANQP_OUI_TYPE);
wpabuf_put_u8(buf, HS... | anqp_add_wan_metrics | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
size_t anqp_get_required_len(hostapd_data *hapd, const u16 *infoid,
unsigned int num_infoid) {
unsigned int i;
size_t len;
anqp_element *elem;
len = 0;
for (i = 0; i < num_infoid; ++i) {
elem = get_anqp_elem(hapd, infoid[i]);
if (elem)
len += wpabuf_len_75(elem->pay... | static size_t anqp_get_required_len(struct hostapd_data *hapd,
const u16 *infoid,
unsigned int num_infoid) {
size_t len = 0;
unsigned int i;
for (i = 0; i < num_infoid; i++) {
struct anqp_element *elem = get_anqp_elem(hapd, infoid[i]);
... | anqp_get_required_len | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
ap_info *ap_ap_add(hostapd_iface *iface, const u8 *addr) {
ap_info *ap;
ap = (ap_info *)os_zalloc(0x60u);
if (!ap)
return 0;
memcpy(ap->addr, addr, sizeof(ap->addr));
ap_ap_list_add(iface, ap);
++iface->num_ap;
ap_ap_hash_add(iface, ap);
if (iface->num_ap > iface->conf->ap_table_max_size && ap != a... | static struct ap_info *ap_ap_add(struct hostapd_iface *iface, const u8 *addr) {
struct ap_info *ap;
ap = os_zalloc(sizeof(struct ap_info));
if (ap == NULL)
return NULL;
os_memcpy(ap->addr, addr, ETH_ALEN);
ap_ap_list_add(iface, ap);
iface->num_ap++;
ap_ap_hash_add(iface, ap);
if (iface->num_ap > ... | ap_ap_add | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void ap_ap_hash_add(hostapd_iface *iface, ap_info *ap) {
ap->hnext = iface->ap_hash[ap->addr[5]];
iface->ap_hash[ap->addr[5]] = ap;
} | static void ap_ap_hash_add(struct hostapd_iface *iface, struct ap_info *ap) {
ap->hnext = iface->ap_hash[STA_HASH(ap->addr)];
iface->ap_hash[STA_HASH(ap->addr)] = ap;
} | ap_ap_hash_add | 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.