input stringlengths 16 454k | output stringlengths 13 350k | function_name stringlengths 1 100 | repo_name stringlengths 6 43 | category stringclasses 76
values | sample_id stringlengths 22 88 | decompiler stringclasses 1
value | opt_level stringclasses 1
value |
|---|---|---|---|---|---|---|---|
int wpas_rrm_send_neighbor_rep_request(wpa_supplicant *wpa_s,
const wpa_ssid_value *ssid, int lci,
int civic, void (*cb)(void *, wpabuf *),
void *cb_ctx) {
size_t v7;
long v8;
size_t v9;
long v10... | int wpas_rrm_send_neighbor_rep_request(
struct wpa_supplicant *wpa_s, const struct wpa_ssid_value *ssid, int lci,
int civic, void (*cb)(void *ctx, struct wpabuf *neighbor_rep),
void *cb_ctx) {
struct wpabuf *buf;
const u8 *rrm_ie;
if (wpa_s->wpa_state != WPA_COMPLETED || wpa_s->current_ssid == NULL) ... | wpas_rrm_send_neighbor_rep_request | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void wpas_scan_reset_sched_scan(wpa_supplicant *wpa_s) {
wpa_s->normal_scans = 0;
if (wpa_s->sched_scanning) {
wpa_s->sched_scan_timed_out = 0;
wpa_s->prev_sched_ssid = 0;
wpa_supplicant_cancel_sched_scan(wpa_s);
}
} | void wpas_scan_reset_sched_scan(struct wpa_supplicant *wpa_s) {
wpa_s->normal_scans = 0;
if (wpa_s->sched_scanning) {
wpa_s->sched_scan_timed_out = 0;
wpa_s->prev_sched_ssid = NULL;
wpa_supplicant_cancel_sched_scan(wpa_s);
}
} | wpas_scan_reset_sched_scan | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void wpas_scan_restart_sched_scan(wpa_supplicant *wpa_s) {
wpa_s->sched_scan_timed_out = 1;
wpa_s->prev_sched_ssid = 0;
wpa_supplicant_cancel_sched_scan(wpa_s);
} | void wpas_scan_restart_sched_scan(struct wpa_supplicant *wpa_s) {
wpa_s->sched_scan_timed_out = 1;
wpa_s->prev_sched_ssid = NULL;
wpa_supplicant_cancel_sched_scan(wpa_s);
} | wpas_scan_restart_sched_scan | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int wpas_scan_scheduled(wpa_supplicant *wpa_s) {
return eloop_is_timeout_registered((eloop_timeout_handler)wpa_supplicant_scan,
wpa_s, 0);
} | int wpas_scan_scheduled(struct wpa_supplicant *wpa_s) {
return eloop_is_timeout_registered(wpa_supplicant_scan, wpa_s, NULL);
} | wpas_scan_scheduled | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int wpas_sched_scan_plans_set(wpa_supplicant *wpa_s, const char *cmd) {
unsigned int num;
int ret;
const char *context;
sched_scan_plan *scan_plans;
const char *token;
sched_scan_plan *n;
sched_scan_plan *scan_plan;
unsigned long v10;
v10 = __readfsqword(0x28u);
scan_plans = 0;
context = 0;
num... | int wpas_sched_scan_plans_set(struct wpa_supplicant *wpa_s, const char *cmd) {
struct sched_scan_plan *scan_plans = NULL;
const char *token, *context = NULL;
unsigned int num = 0;
if (!cmd)
return -1;
if (!cmd[0]) {
wpa_printf(MSG_DEBUG, "Clear sched scan plans");
os_free(wpa_s->sched_scan_plans... | wpas_sched_scan_plans_set | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void wpas_scs_deinit(wpa_supplicant *wpa_s) {
free_up_scs_desc(&wpa_s->scs_robust_av_req);
wpa_s->scs_dialog_token = 0;
wpas_clear_active_scs_ids(wpa_s);
eloop_cancel_timeout((eloop_timeout_handler)scs_request_timer, wpa_s, 0);
wpa_s->ongoing_scs_req = 0;
} | void wpas_scs_deinit(struct wpa_supplicant *wpa_s) {
free_up_scs_desc(&wpa_s->scs_robust_av_req);
wpa_s->scs_dialog_token = 0;
wpas_clear_active_scs_ids(wpa_s);
eloop_cancel_timeout(scs_request_timer, wpa_s, NULL);
wpa_s->ongoing_scs_req = false;
} | wpas_scs_deinit | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int wpas_select_network_from_last_scan(wpa_supplicant_0 *wpa_s, int new_scan,
int own_request) {
signed int time_to_reenable;
int timeout_sec;
wpa_ssid *ssid;
wpa_bss *selected;
unsigned long v9;
v9 = __readfsqword(0x28u);
ssid = 0;
time_to_reenable = wpas_reenabl... | static int wpas_select_network_from_last_scan(struct wpa_supplicant *wpa_s,
int new_scan, int own_request) {
struct wpa_bss *selected;
struct wpa_ssid *ssid = NULL;
int time_to_reenable = wpas_reenabled_network_time(wpa_s);
if (time_to_reenable > 0) {
wpa_dbg(w... | wpas_select_network_from_last_scan | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void wpas_send_action_cb(void *eloop_ctx, void *timeout_ctx) {
int v2;
size_t v3;
const u8 *v4;
size_t v5;
const u8 *v6;
int without_roc;
wpa_supplicant *iface;
without_roc = *((_DWORD *)eloop_ctx + 825);
*((_DWORD *)eloop_ctx + 825) = 0;
wpa_printf(2,
"Off-channel: Send Action callbac... | static void wpas_send_action_cb(void *eloop_ctx, void *timeout_ctx) {
struct wpa_supplicant *wpa_s = eloop_ctx;
struct wpa_supplicant *iface;
int res;
int without_roc;
without_roc = wpa_s->pending_action_without_roc;
wpa_s->pending_action_without_roc = 0;
wpa_printf(MSG_DEBUG,
"Off-channel: ... | wpas_send_action_cb | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void wpas_send_ctrl_req(wpa_supplicant *wpa_s, wpa_ssid *ssid,
const char *field_name, const char *txt) {
int len;
size_t buflen;
char *buf;
buflen = strlen(txt) + ssid->ssid_len + 100;
buf = (char *)malloc(buflen);
if (buf) {
len = snprintf(buf, buflen, "%s-%d:%s needed for SSI... | void wpas_send_ctrl_req(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid,
const char *field_name, const char *txt) {
char *buf;
size_t buflen;
int len;
buflen = 100 + os_strlen(txt) + ssid->ssid_len;
buf = os_malloc(buflen);
if (buf == NULL)
return;
len = os_snprintf(buf, b... | wpas_send_ctrl_req | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int wpas_send_dscp_query(wpa_supplicant *wpa_s, const char *domain_name,
size_t domain_name_length) {
size_t v4;
const u8 *v5;
int dscp_query_size;
int ret;
wpabuf *buf;
if (wpa_s->wpa_state != wpa_states_WPA_COMPLETED || !wpa_s->current_ssid)
return -1;
if ((*((_BYTE *)wpa_s... | int wpas_send_dscp_query(struct wpa_supplicant *wpa_s, const char *domain_name,
size_t domain_name_length) {
struct wpabuf *buf = NULL;
int ret, dscp_query_size;
if (wpa_s->wpa_state != WPA_COMPLETED || !wpa_s->current_ssid)
return -1;
if (!wpa_s->connection_dscp) {
wpa_printf... | wpas_send_dscp_query | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int wpas_send_dscp_response(wpa_supplicant *wpa_s, dscp_resp_data *resp_data) {
u8 dscp_req_dialog_token;
size_t v4;
const u8 *v5;
u8 resp_control;
int i;
int ret;
wpabuf *buf;
resp_control = 0;
if (wpa_s->wpa_state == wpa_states_WPA_COMPLETED && wpa_s->current_ssid) {
if (!resp_data->solicited |... | int wpas_send_dscp_response(struct wpa_supplicant *wpa_s,
struct dscp_resp_data *resp_data) {
struct wpabuf *buf = NULL;
size_t buf_len;
int ret = -1, i;
u8 resp_control = 0;
if (wpa_s->wpa_state != WPA_COMPLETED || !wpa_s->current_ssid) {
wpa_printf(MSG_ERROR,
... | wpas_send_dscp_response | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int wpas_send_mscs_req(wpa_supplicant *wpa_s) {
size_t v2;
const u8 *v3;
int ret;
wpabuf *buf;
if (wpa_s->wpa_state != wpa_states_WPA_COMPLETED || !wpa_s->current_ssid)
return 0;
if (wpa_bss_ext_capab(wpa_s->current_bss, 0x55u)) {
if (!wpa_s->mscs_setup_done && wpa_s->robust_av.request_type) {
... | int wpas_send_mscs_req(struct wpa_supplicant *wpa_s) {
struct wpabuf *buf;
size_t buf_len;
int ret;
if (wpa_s->wpa_state != WPA_COMPLETED || !wpa_s->current_ssid)
return 0;
if (!wpa_bss_ext_capab(wpa_s->current_bss, WLAN_EXT_CAPAB_MSCS)) {
wpa_dbg(wpa_s, MSG_INFO,
"AP does not support MS... | wpas_send_mscs_req | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int wpas_send_scs_req(wpa_supplicant *wpa_s) {
size_t v2;
const u8 *v3;
int ret;
unsigned int i;
unsigned int ia;
scs_desc_elem *desc_elem;
scs_desc_elem *desc_elema;
wpabuf *buf;
active_scs_elem *active_scs_elem;
ret = -1;
if (wpa_s->wpa_state != wpa_states_WPA_COMPLETED || !wpa_s->current_ssid)... | int wpas_send_scs_req(struct wpa_supplicant *wpa_s) {
struct wpabuf *buf = NULL;
struct scs_desc_elem *desc_elem = NULL;
int ret = -1;
unsigned int i;
if (wpa_s->wpa_state != WPA_COMPLETED || !wpa_s->current_ssid)
return -1;
if (!wpa_bss_ext_capab(wpa_s->current_bss, WLAN_EXT_CAPAB_SCS)) {
wpa_dbg... | wpas_send_scs_req | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int wpas_set_frame_classifier_params(dscp_policy_data *policy) {
u8 frame_classifier_len;
const u8 *frame_classifier;
frame_classifier = policy->frame_classifier;
frame_classifier_len = policy->frame_classifier_len;
if (frame_classifier_len <= 2u) {
wpa_printf(5, "QM: Received frame classifier with insuf... | static int wpas_set_frame_classifier_params(struct dscp_policy_data *policy) {
const u8 *frame_classifier = policy->frame_classifier;
u8 frame_classifier_len = policy->frame_classifier_len;
if (frame_classifier_len < 3) {
wpa_printf(MSG_ERROR,
"QM: Received frame classifier with insufficient l... | wpas_set_frame_classifier_params | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void wpas_set_mgmt_group_cipher(wpa_supplicant *wpa_s, wpa_ssid *ssid,
wpa_ie_data *ie) {
unsigned int ssid_pmf;
int sel;
sel = ie->mgmt_group_cipher;
if (ssid->group_mgmt_cipher)
sel &= ssid->group_mgmt_cipher;
if (!wpas_get_ssid_pmf(wpa_s, ssid) || (ie->capabilities & 0x... | void wpas_set_mgmt_group_cipher(struct wpa_supplicant *wpa_s,
struct wpa_ssid *ssid, struct wpa_ie_data *ie) {
int sel;
sel = ie->mgmt_group_cipher;
if (ssid->group_mgmt_cipher)
sel &= ssid->group_mgmt_cipher;
if (wpas_get_ssid_pmf(wpa_s, ssid) == NO_MGMT_FRAME_PROTECTION ||... | wpas_set_mgmt_group_cipher | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int wpas_set_pkcs11_engine_and_module_path(wpa_supplicant *wpa_s,
const char *pkcs11_engine_path,
const char *pkcs11_module_path) {
char *pkcs11_engine_path_copy;
char *pkcs11_module_path_copy;
pkcs11_engine_path_copy = 0;
pk... | int wpas_set_pkcs11_engine_and_module_path(struct wpa_supplicant *wpa_s,
const char *pkcs11_engine_path,
const char *pkcs11_module_path) {
char *pkcs11_engine_path_copy = NULL;
char *pkcs11_module_path_copy = NULL;
if (pkcs11_e... | wpas_set_pkcs11_engine_and_module_path | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int wpas_set_wowlan_triggers(wpa_supplicant *wpa_s,
const wpa_driver_capa *capa) {
int ret;
wowlan_triggers *triggers;
ret = 0;
if (!wpa_s->conf->wowlan_triggers)
return 0;
triggers = wpa_get_wowlan_triggers(wpa_s->conf->wowlan_triggers, capa);
if (triggers) {
ret = wpa... | static int wpas_set_wowlan_triggers(struct wpa_supplicant *wpa_s,
const struct wpa_driver_capa *capa) {
struct wowlan_triggers *triggers;
int ret = 0;
if (!wpa_s->conf->wowlan_triggers)
return 0;
triggers = wpa_get_wowlan_triggers(wpa_s->conf->wowlan_triggers, capa);
... | wpas_set_wowlan_triggers | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int wpas_sta_secondary_channel_offset(wpa_bss *bss, u8 *current, u8 *channel) {
size_t ie_len;
u8 phy_type;
const u8 *ies;
size_t ies_len;
unsigned long v9;
v9 = __readfsqword(0x28u);
if (!bss)
return -1;
ies = wpa_bss_ie_ptr_0(bss);
if (bss->ie_len)
ie_len = bss->ie_len;
else
ie_len = ... | static int wpas_sta_secondary_channel_offset(struct wpa_bss *bss, u8 *current,
u8 *channel) {
const u8 *ies;
u8 phy_type;
size_t ies_len;
if (!bss)
return -1;
ies = wpa_bss_ie_ptr(bss);
ies_len = bss->ie_len ? bss->ie_len : bss->beacon_ie_len;
return wpas... | wpas_sta_secondary_channel_offset | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void wpas_start_assoc_cb(wpa_radio_work *work, int deinit) {
int freq;
const char *v3;
size_t v4;
const char *v5;
const u8 *bssid;
int pbss;
int v8;
int v9;
int v10;
int use_crypt;
int cipher_pairwise;
int cipher_group;
int assoc_failed;
int timeout;
_BOOL4 bssid_changed;
unsigned int ci... | static void wpas_start_assoc_cb(struct wpa_radio_work *work, int deinit) {
struct wpa_connect_work *cwork = work->ctx;
struct wpa_bss *bss = cwork->bss;
struct wpa_ssid *ssid = cwork->ssid;
struct wpa_supplicant *wpa_s = work->wpa_s;
u8 *wpa_ie;
const u8 *edmg_ie_oper;
int use_crypt, ret, bssid_changed;
... | wpas_start_assoc_cb | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int wpas_start_pno(wpa_supplicant *wpa_s) {
unsigned int max_sched_scan_ssids;
int ret;
size_t prio;
size_t i;
unsigned long num_ssid;
unsigned long num_match_ssid;
wpa_ssid *ssid;
wpa_ssid *ssida;
sched_scan_plan scan_plan;
wpa_driver_scan_params params;
unsigned long v12;
v12 = __readfsqword(... | int wpas_start_pno(struct wpa_supplicant *wpa_s) {
int ret;
size_t prio, i, num_ssid, num_match_ssid;
struct wpa_ssid *ssid;
struct wpa_driver_scan_params params;
struct sched_scan_plan scan_plan;
unsigned int max_sched_scan_ssids;
if (!wpa_s->sched_scan_supported)
return -1;
if (wpa_s->max_sched_... | wpas_start_pno | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int wpas_stop_pno(wpa_supplicant *wpa_s) {
int ret;
if (!wpa_s->pno)
return 0;
ret = wpa_supplicant_stop_sched_scan(wpa_s);
*((_BYTE *)wpa_s + 752) |= 1u;
wpa_s->pno = 0;
wpa_s->pno_sched_pending = 0;
if (wpa_s->wpa_state == wpa_states_WPA_SCANNING)
wpa_supplicant_req_scan(wpa_s, 0, 0);
return ... | int wpas_stop_pno(struct wpa_supplicant *wpa_s) {
int ret = 0;
if (!wpa_s->pno)
return 0;
ret = wpa_supplicant_stop_sched_scan(wpa_s);
wpa_s->sched_scan_stop_req = 1;
wpa_s->pno = 0;
wpa_s->pno_sched_pending = 0;
if (wpa_s->wpa_state == WPA_SCANNING)
wpa_supplicant_req_scan(wpa_s, 0, 0);
re... | wpas_stop_pno | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
size_t wpas_supp_op_class_ie(wpa_supplicant *wpa_s, wpa_ssid *ssid,
wpa_bss *bss, u8 *pos, size_t len) {
char v6;
size_t v7;
const void *v8;
u8 current;
u8 chan;
u8 op;
size_t res;
wpabuf *buf;
u8 *ie_len;
unsigned long v18;
v18 = __readfsqword(0x28u);
if (wpas_sta_... | size_t wpas_supp_op_class_ie(struct wpa_supplicant *wpa_s,
struct wpa_ssid *ssid, struct wpa_bss *bss,
u8 *pos, size_t len) {
struct wpabuf *buf;
u8 op, current, chan;
u8 *ie_len;
size_t res;
if (wpas_sta_secondary_channel_offset(bss, ¤t, &chan)... | wpas_supp_op_class_ie | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int *wpas_supp_op_classes(wpa_supplicant *wpa_s) {
unsigned int v2;
int op;
int opa;
unsigned int pos;
unsigned int max_num;
int *classes;
max_num = 0;
for (op = 0; global_op_class[op].op_class; ++op)
++max_num;
classes = (int *)os_zalloc(4LL * (max_num + 1));
if (!classes)
return 0;
opa ... | int *wpas_supp_op_classes(struct wpa_supplicant *wpa_s) {
int op;
unsigned int pos, max_num = 0;
int *classes;
for (op = 0; global_op_class[op].op_class; op++)
max_num++;
classes = os_zalloc((max_num + 1) * sizeof(int));
if (!classes)
return NULL;
for (op = 0, pos = 0; global_op_class[op].op_cla... | wpas_supp_op_classes | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int wpas_temp_disabled(wpa_supplicant_0 *wpa_s, wpa_ssid *ssid) {
os_reltime now;
unsigned long v4;
v4 = __readfsqword(0x28u);
if (!ssid || !ssid->disabled_until.sec)
return 0;
os_get_reltime(&now);
if (ssid->disabled_until.sec > now.sec)
return ssid->disabled_until.sec - LODWORD(now.sec);
wpas_c... | int wpas_temp_disabled(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid) {
struct os_reltime now;
if (ssid == NULL || ssid->disabled_until.sec == 0)
return 0;
os_get_reltime(&now);
if (ssid->disabled_until.sec > now.sec)
return ssid->disabled_until.sec - now.sec;
wpas_clear_temp_disabled(wpa_s, ... | wpas_temp_disabled | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void wpas_trigger_scan_cb(wpa_radio_work *work, int deinit) {
_BOOL4 v2;
const char *v3;
int retry;
int ret;
wpa_supplicant *wpa_s;
wpa_driver_scan_params *params;
wpa_s = work->wpa_s;
params = (wpa_driver_scan_params *)work->ctx;
if (deinit) {
if ((*((_BYTE *)work + 56) & 1) != 0) {
wpa_su... | static void wpas_trigger_scan_cb(struct wpa_radio_work *work, int deinit) {
struct wpa_supplicant *wpa_s = work->wpa_s;
struct wpa_driver_scan_params *params = work->ctx;
int ret;
if (deinit) {
if (!work->started) {
wpa_scan_free_params(params);
return;
}
wpa_supplicant_notify_scanning(... | wpas_trigger_scan_cb | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void wpas_update_fils_connect_params(wpa_supplicant *wpa_s) {
wpa_drv_update_connect_params_mask mask;
u8 *wpa_ie;
wpa_driver_associate_params params;
unsigned long v4;
v4 = __readfsqword(0x28u);
mask = 0;
if (wpa_s->auth_alg == 1) {
memset(¶ms, 0, sizeof(params));
wpa_ie = wpas_populate_asso... | static void wpas_update_fils_connect_params(struct wpa_supplicant *wpa_s) {
struct wpa_driver_associate_params params;
enum wpa_drv_update_connect_params_mask mask = 0;
u8 *wpa_ie;
if (wpa_s->auth_alg != WPA_AUTH_ALG_OPEN)
return;
os_memset(¶ms, 0, sizeof(params));
wpa_ie = wpas_populate_assoc_ies... | wpas_update_fils_connect_params | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void wpas_update_mbo_connect_params(wpa_supplicant *wpa_s) {
u8 *wpa_ie;
wpa_driver_associate_params params;
unsigned long v3;
v3 = __readfsqword(0x28u);
if (wpa_s->wpa_state == wpa_states_WPA_COMPLETED && wpa_s->current_ssid &&
wpa_s->current_bss &&
wpa_bss_get_vendor_ie(wpa_s->current_bss, 0x50... | void wpas_update_mbo_connect_params(struct wpa_supplicant *wpa_s) {
struct wpa_driver_associate_params params;
u8 *wpa_ie;
if (wpa_s->wpa_state != WPA_COMPLETED || !wpa_s->current_ssid ||
!wpa_s->current_bss ||
!wpa_bss_get_vendor_ie(wpa_s->current_bss, MBO_IE_VENDOR_TYPE))
return;
os_memset(&... | wpas_update_mbo_connect_params | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void wpas_update_owe_connect_params(wpa_supplicant *wpa_s) {
u8 *wpa_ie;
wpa_driver_associate_params params;
unsigned long v3;
v3 = __readfsqword(0x28u);
memset(¶ms, 0, sizeof(params));
wpa_ie = wpas_populate_assoc_ies(wpa_s, wpa_s->current_bss,
wpa_s->current_ssid, &... | static void wpas_update_owe_connect_params(struct wpa_supplicant *wpa_s) {
struct wpa_driver_associate_params params;
u8 *wpa_ie;
os_memset(¶ms, 0, sizeof(params));
wpa_ie = wpas_populate_assoc_ies(wpa_s, wpa_s->current_bss,
wpa_s->current_ssid, ¶ms, NULL);
if (!wpa... | wpas_update_owe_connect_params | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int wpas_update_random_addr(wpa_supplicant *wpa_s, int style) {
os_reltime now;
u8 addr[6];
unsigned long v5;
v5 = __readfsqword(0x28u);
os_get_reltime(&now);
if (style == wpa_s->last_mac_addr_style && wpa_s->last_mac_addr_change.sec &&
!os_reltime_expired_7(&now, &wpa_s->last_mac_addr_change,
... | int wpas_update_random_addr(struct wpa_supplicant *wpa_s, int style) {
struct os_reltime now;
u8 addr[ETH_ALEN];
os_get_reltime(&now);
if (wpa_s->last_mac_addr_style == style &&
wpa_s->last_mac_addr_change.sec != 0 &&
!os_reltime_expired(&now, &wpa_s->last_mac_addr_change,
... | wpas_update_random_addr | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int wpas_update_random_addr_disassoc(wpa_supplicant *wpa_s) {
if (wpa_s->wpa_state <= (unsigned int)wpa_states_WPA_SCANNING &&
wpa_s->conf->preassoc_mac_addr)
return wpas_update_random_addr(wpa_s, wpa_s->conf->preassoc_mac_addr);
else
return 0;
} | int wpas_update_random_addr_disassoc(struct wpa_supplicant *wpa_s) {
if (wpa_s->wpa_state >= WPA_AUTHENTICATING || !wpa_s->conf->preassoc_mac_addr)
return 0;
return wpas_update_random_addr(wpa_s, wpa_s->conf->preassoc_mac_addr);
} | wpas_update_random_addr_disassoc | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int wpas_valid_bss(wpa_supplicant *wpa_s, wpa_bss *test_bss) {
wpa_bss *bss;
for (bss = (wpa_bss *)wpa_s->bss.next; bss != (wpa_bss *)&wpa_s->bss;
bss = (wpa_bss *)bss->list.next) {
if (bss == test_bss)
return 1;
}
return 0;
} | static int wpas_valid_bss(struct wpa_supplicant *wpa_s,
struct wpa_bss *test_bss) {
struct wpa_bss *bss;
dl_list_for_each(bss, &wpa_s->bss, struct wpa_bss, list) {
if (bss == test_bss)
return 1;
}
return 0;
} | wpas_valid_bss | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int wpas_valid_bss_ssid(wpa_supplicant *wpa_s, wpa_bss *test_bss,
wpa_ssid *test_ssid) {
if (test_bss && !wpas_valid_bss(wpa_s, test_bss))
return 0;
return !test_ssid || wpas_valid_ssid(wpa_s, test_ssid);
} | int wpas_valid_bss_ssid(struct wpa_supplicant *wpa_s, struct wpa_bss *test_bss,
struct wpa_ssid *test_ssid) {
if (test_bss && !wpas_valid_bss(wpa_s, test_bss))
return 0;
return test_ssid == NULL || wpas_valid_ssid(wpa_s, test_ssid);
} | wpas_valid_bss_ssid | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int wpas_valid_ssid(wpa_supplicant *wpa_s, wpa_ssid *test_ssid) {
wpa_ssid *ssid;
for (ssid = wpa_s->conf->ssid; ssid; ssid = ssid->next) {
if (ssid == test_ssid)
return 1;
}
return 0;
} | static int wpas_valid_ssid(struct wpa_supplicant *wpa_s,
struct wpa_ssid *test_ssid) {
struct wpa_ssid *ssid;
for (ssid = wpa_s->conf->ssid; ssid; ssid = ssid->next) {
if (ssid == test_ssid)
return 1;
}
return 0;
} | wpas_valid_ssid | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
wpa_supplicant *wpas_vendor_elem(wpa_supplicant *wpa_s,
wpa_vendor_elem_frame frame) {
return wpa_s;
} | struct wpa_supplicant *wpas_vendor_elem(struct wpa_supplicant *wpa_s,
enum wpa_vendor_elem_frame frame) {
switch (frame) {
#ifdef CONFIG_P2P
case VENDOR_ELEM_PROBE_REQ_P2P:
case VENDOR_ELEM_PROBE_RESP_P2P:
case VENDOR_ELEM_PROBE_RESP_P2P_GO:
case VENDOR_ELEM_BEACON_P2P_... | wpas_vendor_elem | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int wpas_vendor_elem_remove(wpa_supplicant *wpa_s, int frame, const u8 *elem,
size_t len) {
u8 *ie;
u8 *end;
ie = wpabuf_mhead_u8_7(wpa_s->vendor_elem[frame]);
end = &ie[wpabuf_len_75(wpa_s->vendor_elem[frame])];
while (1) {
if (end <= ie + 1 || end < &ie[len])
return -1... | int wpas_vendor_elem_remove(struct wpa_supplicant *wpa_s, int frame,
const u8 *elem, size_t len) {
u8 *ie, *end;
ie = wpabuf_mhead_u8(wpa_s->vendor_elem[frame]);
end = ie + wpabuf_len(wpa_s->vendor_elem[frame]);
for (; ie + 1 < end; ie += 2 + ie[1]) {
if (ie + len > end)
... | wpas_vendor_elem_remove | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void wpas_vendor_elem_update(wpa_supplicant *wpa_s) {
unsigned int i;
int res;
char buf[40];
unsigned long v4;
v4 = __readfsqword(0x28u);
wpa_printf(2, "Update vendor elements");
for (i = 0; i <= 0xE; ++i) {
if (wpa_s->vendor_elem[i]) {
res = snprintf(buf, 0x1Eu, "frame[%u]", i);
if (!os_... | void wpas_vendor_elem_update(struct wpa_supplicant *wpa_s) {
unsigned int i;
char buf[30];
wpa_printf(MSG_DEBUG, "Update vendor elements");
for (i = 0; i < NUM_VENDOR_ELEM_FRAMES; i++) {
if (wpa_s->vendor_elem[i]) {
int res;
res = os_snprintf(buf, sizeof(buf), "frame[%u]", i);
if (!os_s... | wpas_vendor_elem_update | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void wpas_wait_for_dscp_req_timer(void *eloop_ctx, void *timeout_ctx) {
wpa_printf(2,
"QM: Wait time over for sending DSCP request - allow DSCP query");
*((_BYTE *)eloop_ctx + 5131) &= ~4u;
wpa_msg(eloop_ctx, 3, "CTRL-EVENT-DSCP-POLICY request_wait end");
} | static void wpas_wait_for_dscp_req_timer(void *eloop_ctx, void *timeout_ctx) {
struct wpa_supplicant *wpa_s = eloop_ctx;
wpa_printf(MSG_DEBUG,
"QM: Wait time over for sending DSCP request - allow DSCP query");
wpa_s->wait_for_dscp_req = 0;
wpa_msg(wpa_s, MSG_INFO, WPA_EVENT_DSCP_POLICY "request_wa... | wpas_wait_for_dscp_req_timer | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int wpas_wmm_ac_addts(wpa_supplicant *wpa_s, wmm_ac_ts_setup_params *params) {
wmm_ac_addts_request *addts_req;
if (wpa_s->wmm_ac_assoc_info) {
if (wpa_s->addts_request) {
wpa_printf(2, "WMM AC: can't add TS - ADDTS request is already pending");
return -1;
} else if (params->direction == wmm_ac... | int wpas_wmm_ac_addts(struct wpa_supplicant *wpa_s,
struct wmm_ac_ts_setup_params *params) {
struct wmm_ac_addts_request *addts_req;
if (!wpa_s->wmm_ac_assoc_info) {
wpa_printf(MSG_DEBUG, "WMM AC: Cannot add TS - missing assoc data");
return -1;
}
if (wpa_s->addts_request) {
... | wpas_wmm_ac_addts | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int wpas_wmm_ac_delts(wpa_supplicant *wpa_s, u8 tsid) {
wmm_tspec_element *v3;
long v4;
long v5;
long v6;
ts_dir_idx dir;
int ac;
wmm_tspec_element tspec;
unsigned long v10;
v10 = __readfsqword(0x28u);
if (wpa_s->wmm_ac_assoc_info) {
ac = wmm_ac_find_tsid(wpa_s, tsid, &dir);
if (ac >= 0) {
... | int wpas_wmm_ac_delts(struct wpa_supplicant *wpa_s, u8 tsid) {
struct wmm_tspec_element tspec;
int ac;
enum ts_dir_idx dir;
if (!wpa_s->wmm_ac_assoc_info) {
wpa_printf(MSG_DEBUG, "WMM AC: Failed to delete TS, WMM AC is disabled");
return -1;
}
ac = wmm_ac_find_tsid(wpa_s, tsid, &dir);
if (ac < 0... | wpas_wmm_ac_delts | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int wpas_wmm_ac_status(wpa_supplicant *wpa_s, char *buf, size_t buflen) {
_BOOL4 v4;
int v5;
const char *ac_str;
u8 ac;
u8 dir;
u8 tsid;
u8 up;
ts_dir_idx idx;
int pos;
int ts_count;
wmm_ac_assoc_data *assoc_info;
wmm_tspec_element *tspec;
const char *dir_str;
assoc_info = wpa_s->wmm_ac_ass... | int wpas_wmm_ac_status(struct wpa_supplicant *wpa_s, char *buf, size_t buflen) {
struct wmm_ac_assoc_data *assoc_info = wpa_s->wmm_ac_assoc_info;
enum ts_dir_idx idx;
int pos = 0;
u8 ac, up;
if (!assoc_info) {
return wpa_scnprintf(buf, buflen - pos,
"Not associated to a WMM AP, W... | wpas_wmm_ac_status | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void write_auth_alg(FILE *f, wpa_ssid *ssid) {
char *value;
if (ssid->auth_alg) {
value = wpa_config_get(ssid, "auth_alg");
if (value) {
if (*value)
fprintf(f, "\tauth_alg=%s\n", value);
free(value);
}
}
} | static void write_auth_alg(FILE *f, struct wpa_ssid *ssid) {
char *value;
if (ssid->auth_alg == 0)
return;
value = wpa_config_get(ssid, "auth_alg");
if (value == NULL)
return;
if (value[0])
fprintf(f, "\tauth_alg=%s\n", value);
os_free(value);
} | write_auth_alg | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void write_bssid(FILE *f, wpa_ssid *ssid) {
char *value;
value = wpa_config_get(ssid, "bssid");
if (value) {
fprintf(f, "\tbssid=%s\n", value);
free(value);
}
} | static void write_bssid(FILE *f, struct wpa_ssid *ssid) {
char *value = wpa_config_get(ssid, "bssid");
if (value == NULL)
return;
fprintf(f, "\tbssid=%s\n", value);
os_free(value);
} | write_bssid | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void write_bssid_hint(FILE *f, wpa_ssid *ssid) {
char *value;
value = wpa_config_get(ssid, "bssid_hint");
if (value) {
fprintf(f, "\tbssid_hint=%s\n", value);
free(value);
}
} | static void write_bssid_hint(FILE *f, struct wpa_ssid *ssid) {
char *value = wpa_config_get(ssid, "bssid_hint");
if (!value)
return;
fprintf(f, "\tbssid_hint=%s\n", value);
os_free(value);
} | write_bssid_hint | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void write_eap(FILE *f, wpa_ssid *ssid) {
char *value;
value = wpa_config_get(ssid, "eap");
if (value) {
if (*value)
fprintf(f, "\teap=%s\n", value);
free(value);
}
} | static void write_eap(FILE *f, struct wpa_ssid *ssid) {
char *value;
value = wpa_config_get(ssid, "eap");
if (value == NULL)
return;
if (value[0])
fprintf(f, "\teap=%s\n", value);
os_free(value);
} | write_eap | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void write_global_bin(FILE *f, const char *field, const wpabuf *val) {
unsigned char *v3;
size_t i;
const u8 *pos;
if (val) {
fprintf(f, "%s=", field);
pos = (const u8 *)wpabuf_head_6(val);
for (i = 0; i < wpabuf_len_6(val); ++i) {
v3 = (unsigned char *)pos++;
fprintf(f, "%02X", *v3);
... | static void write_global_bin(FILE *f, const char *field,
const struct wpabuf *val) {
size_t i;
const u8 *pos;
if (val == NULL)
return;
fprintf(f, "%s=", field);
pos = wpabuf_head(val);
for (i = 0; i < wpabuf_len(val); i++)
fprintf(f, "%02X", *pos++);
fprintf(f, "\n")... | write_global_bin | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void write_group(FILE *f, wpa_ssid *ssid) {
char *value;
if (ssid->group_cipher != 16) {
value = wpa_config_get(ssid, "group");
if (value) {
if (*value)
fprintf(f, "\tgroup=%s\n", value);
free(value);
}
}
} | static void write_group(FILE *f, struct wpa_ssid *ssid) {
char *value;
if (ssid->group_cipher == DEFAULT_GROUP)
return;
value = wpa_config_get(ssid, "group");
if (value == NULL)
return;
if (value[0])
fprintf(f, "\tgroup=%s\n", value);
os_free(value);
} | write_group | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void write_group_mgmt(FILE *f, wpa_ssid *ssid) {
char *value;
if (ssid->group_mgmt_cipher) {
value = wpa_config_get(ssid, "group_mgmt");
if (value) {
if (*value)
fprintf(f, "\tgroup_mgmt=%s\n", value);
free(value);
}
}
} | static void write_group_mgmt(FILE *f, struct wpa_ssid *ssid) {
char *value;
if (!ssid->group_mgmt_cipher)
return;
value = wpa_config_get(ssid, "group_mgmt");
if (!value)
return;
if (value[0])
fprintf(f, "\tgroup_mgmt=%s\n", value);
os_free(value);
} | write_group_mgmt | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void write_int(FILE *f, const char *field, int value, int def) {
if (value != def)
fprintf(f, "\t%s=%d\n", field, value);
} | static void write_int(FILE *f, const char *field, int value, int def) {
if (value == def)
return;
fprintf(f, "\t%s=%d\n", field, value);
} | write_int | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int write_ipv4_info(char *pos, int total_len, const ipv4_params *v4) {
char *posa;
int rem_len;
int res;
int resa;
int resb;
int resc;
int resd;
char addr[24];
unsigned long v13;
posa = pos;
v13 = __readfsqword(0x28u);
rem_len = total_len;
if ((v4->param_mask & 2) != 0) {
if (!inet_ntop(2... | static int write_ipv4_info(char *pos, int total_len,
const struct ipv4_params *v4) {
int res, rem_len;
char addr[INET_ADDRSTRLEN];
rem_len = total_len;
if (v4->param_mask & BIT(1)) {
if (!inet_ntop(AF_INET, &v4->src_ip, addr, INET_ADDRSTRLEN)) {
wpa_printf(MSG_ERROR, "QM: ... | write_ipv4_info | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int write_ipv6_info(char *pos, int total_len, const ipv6_params *v6) {
char *posa;
int rem_len;
int res;
int resa;
int resb;
int resc;
int resd;
char addr[56];
unsigned long v13;
posa = pos;
v13 = __readfsqword(0x28u);
rem_len = total_len;
if ((v6->param_mask & 2) != 0) {
if (!inet_ntop(1... | static int write_ipv6_info(char *pos, int total_len,
const struct ipv6_params *v6) {
int res, rem_len;
char addr[INET6_ADDRSTRLEN];
rem_len = total_len;
if (v6->param_mask & BIT(1)) {
if (!inet_ntop(AF_INET6, &v6->src_ip, addr, INET6_ADDRSTRLEN)) {
wpa_printf(MSG_ERROR, "Q... | write_ipv6_info | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void write_key_mgmt(FILE *f, wpa_ssid *ssid) {
char *value;
if (ssid->key_mgmt != 3) {
value = wpa_config_get(ssid, "key_mgmt");
if (value) {
if (*value)
fprintf(f, "\tkey_mgmt=%s\n", value);
free(value);
}
}
} | static void write_key_mgmt(FILE *f, struct wpa_ssid *ssid) {
char *value;
if (ssid->key_mgmt == DEFAULT_KEY_MGMT)
return;
value = wpa_config_get(ssid, "key_mgmt");
if (value == NULL)
return;
if (value[0])
fprintf(f, "\tkey_mgmt=%s\n", value);
os_free(value);
} | write_key_mgmt | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void write_pairwise(FILE *f, wpa_ssid *ssid) {
char *value;
if (ssid->pairwise_cipher != 16) {
value = wpa_config_get(ssid, "pairwise");
if (value) {
if (*value)
fprintf(f, "\tpairwise=%s\n", value);
free(value);
}
}
} | static void write_pairwise(FILE *f, struct wpa_ssid *ssid) {
char *value;
if (ssid->pairwise_cipher == DEFAULT_PAIRWISE)
return;
value = wpa_config_get(ssid, "pairwise");
if (value == NULL)
return;
if (value[0])
fprintf(f, "\tpairwise=%s\n", value);
os_free(value);
} | write_pairwise | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void write_proto(FILE *f, wpa_ssid *ssid) {
char *value;
if (ssid->proto != 3) {
value = wpa_config_get(ssid, "proto");
if (value) {
if (*value)
fprintf(f, "\tproto=%s\n", value);
free(value);
}
}
} | static void write_proto(FILE *f, struct wpa_ssid *ssid) {
char *value;
if (ssid->proto == DEFAULT_PROTO)
return;
value = wpa_config_get(ssid, "proto");
if (value == NULL)
return;
if (value[0])
fprintf(f, "\tproto=%s\n", value);
os_free(value);
} | write_proto | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void write_psk(FILE *f, wpa_ssid *ssid) {
char *value;
if (!ssid->mem_only_psk) {
value = wpa_config_get(ssid, "psk");
if (value) {
fprintf(f, "\tpsk=%s\n", value);
free(value);
}
}
} | static void write_psk(FILE *f, struct wpa_ssid *ssid) {
char *value;
if (ssid->mem_only_psk)
return;
value = wpa_config_get(ssid, "psk");
if (value == NULL)
return;
fprintf(f, "\tpsk=%s\n", value);
os_free(value);
} | write_psk | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void write_str(FILE *f, const char *field, wpa_ssid *ssid) {
char *value;
value = wpa_config_get(ssid, field);
if (value) {
fprintf(f, "\t%s=%s\n", field, value);
str_clear_free(value);
}
} | static void write_str(FILE *f, const char *field, struct wpa_ssid *ssid) {
char *value = wpa_config_get(ssid, field);
if (value == NULL)
return;
fprintf(f, "\t%s=%s\n", field, value);
str_clear_free(value);
} | write_str | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
const char *ADF_model_string(int i) {
const char *models[4];
unsigned long v3;
v3 = __readfsqword(0x28u);
models[0] = "(1-L)y = (a-1)*y(-1) + ... + e";
models[1] = "(1-L)y = b0 + (a-1)*y(-1) + ... + e";
models[2] = "(1-L)y = b0 + b1*t + (a-1)*y(-1) + ... + e";
models[3] = "(1-L)y = b0 + b1*t + b2*t^2 + (... | static const char *ADF_model_string(int i) {
const char *models[] = {
"(1-L)y = (a-1)*y(-1) + ... + e", "(1-L)y = b0 + (a-1)*y(-1) + ... + e",
"(1-L)y = b0 + b1*t + (a-1)*y(-1) + ... + e",
"(1-L)y = b0 + b1*t + b2*t^2 + (a-1)*y(-1) + ... + e"};
if (i >= 0 && i < 4) {
return models[i];
} els... | ADF_model_string | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int BFGS_cmax(double *b, int n, int maxit, double reltol, int *fncount,
int *grcount, BFGS_CRIT_FUNC cfunc, int crittype,
BFGS_GRAD_FUNC gradfunc, void *data, const gretl_matrix *bounds,
gretlopt opt, PRN *prn) {
int ret;
gretl_iteration_push();
ret = LBFGS_max(b, n, max... | static int BFGS_cmax(double *b, int n, int maxit, double reltol, int *fncount,
int *grcount, BFGS_CRIT_FUNC cfunc, int crittype,
BFGS_GRAD_FUNC gradfunc, void *data,
const gretl_matrix *bounds, gretlopt opt, PRN *prn) {
int ret, wnum;
gretl_iteration_p... | BFGS_cmax | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
NODE *BFGS_constrained_max(NODE *t, parser *p) {
int i;
int k;
NODE *ret;
gretl_matrix *b;
const gretl_matrix *bounds;
const char *sf_0;
const char *sg;
NODE *save_aux;
NODE *n;
NODE *e;
NODE *ea;
save_aux = p->aux;
n = t->L;
ret = 0;
b = 0;
bounds = 0;
sf_0 = 0;
sg = 0;
k = n->v.... | static NODE *BFGS_constrained_max(NODE *t, parser *p) {
NODE *save_aux = p->aux;
NODE *n = t->L;
NODE *ret = NULL;
NODE *e = NULL;
gretl_matrix *b = NULL;
gretl_matrix *bounds = NULL;
const char *sf = NULL;
const char *sg = NULL;
int i, k = n->v.bn.n_nodes;
if (k < 3 || k > 4) {
n_args_error(k,... | BFGS_constrained_max | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void BFGS_defaults(int *maxit, double *tol, int ci) {
*maxit = libset_get_int(BFGS_MAXITER);
*tol = libset_get_user_tolerance(BFGS_TOLER);
if (ci != 78 && ci != 49 && *maxit <= 0)
*maxit = 1000;
switch (ci) {
case 102:
case 60:
case 8:
case 84:
case 30:
if (fabs(*tol) > 1.797693134862316e308)
... | void BFGS_defaults(int *maxit, double *tol, int ci) {
*maxit = libset_get_int(BFGS_MAXITER);
*tol = libset_get_user_tolerance(BFGS_TOLER);
if (ci != MLE && ci != GMM && *maxit <= 0) {
*maxit = 1000;
}
if (ci == PROBIT || ci == INTREG || ci == ARMA || ci == NEGBIN ||
ci == DURATION) {
if (na(*t... | BFGS_defaults | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int BFGS_max(double *b, int n, int maxit, double reltol, int *fncount,
int *grcount, BFGS_CRIT_FUNC cfunc, int crittype,
BFGS_GRAD_FUNC gradfunc, void *data, const gretl_matrix *A0,
gretlopt opt, PRN *prn) {
int ret;
gretl_iteration_push();
if ((opt & 0x800) != 0 || libset_... | int BFGS_max(double *b, int n, int maxit, double reltol, int *fncount,
int *grcount, BFGS_CRIT_FUNC cfunc, int crittype,
BFGS_GRAD_FUNC gradfunc, void *data, const gretl_matrix *A0,
gretlopt opt, PRN *prn) {
int ret, wnum;
gretl_iteration_push();
if ((opt & OPT_L) || libse... | BFGS_max | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
NODE *BFGS_maximize(NODE *l, NODE *m, NODE *r, parser *p, NODE *t) {
NODE *ret;
char *sg;
char *sf_0;
gretl_matrix *b;
if ((p->flags & 2) == 0)
return get_aux_node(p, 54, 0, 0);
sf_0 = m->v.str;
sg = 0;
b = mat_node_get_real_matrix(l, p);
if (!p->err) {
if (r->t == 60) {
sg = r->v.str;
... | static NODE *BFGS_maximize(NODE *l, NODE *m, NODE *r, parser *p, NODE *t) {
NODE *ret = NULL;
if (starting(p)) {
gretl_matrix *b;
const char *sf = m->v.str;
const char *sg = NULL;
b = mat_node_get_real_matrix(l, p);
if (!p->err) {
if (r->t == STR) {
sg = r->v.str;
} else i... | BFGS_maximize | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int BFGS_orig(double *b, int n, int maxit, double reltol, int *fncount,
int *grcount, BFGS_CRIT_FUNC cfunc, int crittype,
BFGS_GRAD_FUNC gradfunc, void *data, const gretl_matrix *A0,
gretlopt opt, PRN *prn) {
char *v13;
int v14;
unsigned int v15;
char *v16;
char *v17;... | static int BFGS_orig(double *b, int n, int maxit, double reltol, int *fncount,
int *grcount, BFGS_CRIT_FUNC cfunc, int crittype,
BFGS_GRAD_FUNC gradfunc, void *data,
const gretl_matrix *A0, gretlopt opt, PRN *prn) {
int verbskip, verbose = (opt & OPT_V);
... | BFGS_orig | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
double BFN_panel_DW_pvalue(MODEL *pmod, const DATASET *dset, int *err) {
double v4;
int k;
int i;
int q;
int T;
int N;
int nlam;
double pv;
double lamq;
gretl_matrix *lam;
double pi_2T;
double sinarg;
double r;
T = gretl_model_get_int(pmod, "Tmax");
N = gretl_model_get_int(pmod, "n_includ... | double BFN_panel_DW_pvalue(MODEL *pmod, const DATASET *dset, int *err) {
gretl_matrix *lam = NULL;
double r, pv, lamq, sinarg, pi_2T;
int T = gretl_model_get_int(pmod, "Tmax");
int N = gretl_model_get_int(pmod, "n_included_units");
int nlam, k = pmod->ncoeff;
int i, q;
if (pmod->ifc) {
k--;
}
nl... | BFN_panel_DW_pvalue | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
double Binv(double p, double q) {
double f;
double x1;
double x2;
double x3;
f = NAN;
*__errno_location() = 0;
if (p > 0.0 && q > 0.0) {
x1 = lngamma(p + q);
x2 = lngamma(p);
x3 = lngamma(q);
if (fabs(x1) <= 1.797693134862316e308 &&
fabs(x2) <= 1.797693134862316e308 &&
fab... | static double Binv(double p, double q) {
double f = NADBL;
errno = 0;
if (p > 0 && q > 0) {
double x1 = lngamma(p + q);
double x2 = lngamma(p);
double x3 = lngamma(q);
if (!na(x1) && !na(x2) && !na(x3)) {
f = exp(x1 - x2 - x3);
if (errno) {
f = NADBL;
}
}
}
re... | Binv | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void DF_header(const char *s, int p, int pmax, int test_down, gretlopt opt,
PRN *prn) {
char *v6;
char *v7;
char *v8;
char *v9;
char *v10;
const char *critstr;
pputc(prn, 10);
if (p > 0 || pmax) {
if ((opt & 0x40) != 0)
v7 = gettext("Augmented Dickey-Fuller (GLS) test for %s\n"... | static void DF_header(const char *s, int p, int pmax, int test_down,
gretlopt opt, PRN *prn) {
pputc(prn, '\n');
if (p <= 0 && pmax == 0) {
if (opt & OPT_G) {
pprintf(prn, _("Dickey-Fuller (GLS) test for %s\n"), s);
} else {
pprintf(prn, _("Dickey-Fuller test for %s\n"), s... | DF_header | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int DF_index(gretlopt opt) {
if ((opt & 0x2000) != 0)
return 0;
if ((opt & 4) != 0)
return 1;
if ((opt & 0x80000) != 0)
return 2;
return 3;
} | static int DF_index(gretlopt opt) {
if (opt & OPT_N) {
return 0;
} else if (opt & OPT_C) {
return 1;
} else if (opt & OPT_T) {
return 2;
} else {
return 3;
}
} | DF_index | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
const char *DF_model_string(int i) {
const char *models[4];
unsigned long v3;
v3 = __readfsqword(0x28u);
models[0] = "(1-L)y = (a-1)*y(-1) + e";
models[1] = "(1-L)y = b0 + (a-1)*y(-1) + e";
models[2] = "(1-L)y = b0 + b1*t + (a-1)*y(-1) + e";
models[3] = "(1-L)y = b0 + b1*t + b2*t^2 + (a-1)*y(-1) + e";
... | static const char *DF_model_string(int i) {
const char *models[] = {"(1-L)y = (a-1)*y(-1) + e",
"(1-L)y = b0 + (a-1)*y(-1) + e",
"(1-L)y = b0 + b1*t + (a-1)*y(-1) + e",
"(1-L)y = b0 + b1*t + b2*t^2 + (a-1)*y(-1) + e"};
if (i >= 0 && i < ... | DF_model_string | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
const char *DF_test_string(int i) {
const char *tests[4];
unsigned long v3;
v3 = __readfsqword(0x28u);
tests[0] = "test without constant";
tests[1] = "test with constant";
tests[2] = "with constant and trend";
tests[3] = "with constant, linear and quadratic trend";
if ((unsigned int)i >= 4)
return ... | static const char *DF_test_string(int i) {
const char *tests[] = {N_("test without constant"), N_("test with constant"),
N_("with constant and trend"),
N_("with constant, linear and quadratic trend")};
if (i >= 0 && i < 4) {
return tests[i];
} else {
retu... | DF_test_string | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
NODE *DW_node(NODE *r, parser *p) {
int i;
NODE *ret;
NODE *save_aux;
NODE *s;
NODE *e;
int parm[2];
unsigned long v9;
v9 = __readfsqword(0x28u);
ret = 0;
save_aux = p->aux;
*(_QWORD *)parm = 0;
for (i = 0; i <= 1 && !p->err; ++i) {
s = r->v.bn.n[i + 1];
if (s->t == 54 || s->t == 57 && ... | static NODE *DW_node(NODE *r, parser *p) {
NODE *s, *e, *ret = NULL;
NODE *save_aux = p->aux;
int i, parm[2] = {0};
for (i = 0; i < 2 && !p->err; i++) {
s = r->v.bn.n[i + 1];
if (scalar_node(s)) {
parm[i] = node_get_int(s, p);
} else {
e = eval(s, p);
if (!p->err) {
if (sc... | DW_node | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void F_matrix_adjust_sample(const gretl_matrix *F, int *f0, int *fn, int *e0,
int *en) {
int k;
k = F->cols / 2;
*f0 = matrix_first_ok_row(F, 0, k);
*fn = matrix_last_ok_row(F, 0, k);
*e0 = matrix_first_ok_row(F, k, k);
*en = matrix_last_ok_row(F, k, k);
} | static void F_matrix_adjust_sample(const gretl_matrix *F, int *f0, int *fn,
int *e0, int *en) {
int k = F->cols / 2;
*f0 = matrix_first_ok_row(F, 0, k);
*fn = matrix_last_ok_row(F, 0, k);
*e0 = matrix_first_ok_row(F, k, k);
*en = matrix_last_ok_row(F, k, k);
} | F_matrix_adjust_sample | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int F_out_of_bounds(kalman *K) {
int err;
int i;
gretl_matrix *evals;
double r;
double c;
double x;
unsigned long v8;
v8 = __readfsqword(0x28u);
err = 0;
evals = gretl_general_matrix_eigenvals(K->F, &err);
for (i = 0; i < evals->rows && !err; ++i) {
r = evals->val[i];
c = evals->val[evals... | static int F_out_of_bounds(kalman *K) {
gretl_matrix *evals;
double r, c, x;
int i, err = 0;
evals = gretl_general_matrix_eigenvals(K->F, &err);
for (i = 0; i < evals->rows && !err; i++) {
r = gretl_matrix_get(evals, i, 0);
c = gretl_matrix_get(evals, i, 1);
x = sqrt(r * r + c * c);
if (x >=... | F_out_of_bounds | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void FreePoly(Polynomial *p) {
if (p->x)
free(p->x);
free(p);
} | static void FreePoly(Polynomial *p) {
if (p->x != NULL)
free(p->x);
free(p);
} | FreePoly | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
double GED_cdf(double nu, double x) {
int v2;
double v4;
int sgn;
double lg1;
double lg3;
double k;
double znu;
if (nu <= 0.0)
return NAN;
if (x <= 0.0)
v2 = -1;
else
v2 = 1;
sgn = v2;
lg1 = lngamma(1.0 / nu);
lg3 = lngamma(1.0 / nu * 3.0);
v4 = pow(0.5, 1.0 / nu);
k = exp((lg... | double GED_cdf(double nu, double x) {
if (nu > 0) {
int sgn = (x > 0) ? 1 : -1;
double p = 1 / nu;
double lg1 = lngamma(p);
double lg3 = lngamma(3 * p);
double k = pow(0.5, p) * exp(0.5 * (lg1 - lg3));
double znu = pow(fabs(x / k), nu);
double P = gamma_cdf(p, 2, znu, 1);
P = 0.5 * (1... | GED_cdf | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
double GED_cdf_comp(double nu, double x) {
int v2;
double v4;
int sgn;
double lg1;
double lg3;
double k;
double znu;
double P;
if (nu <= 0.0)
return NAN;
if (x <= 0.0)
v2 = -1;
else
v2 = 1;
sgn = v2;
lg1 = lngamma(1.0 / nu);
lg3 = lngamma(1.0 / nu * 3.0);
v4 = pow(0.5, 1.0 / n... | double GED_cdf_comp(double nu, double x) {
if (nu > 0) {
int sgn = (x > 0) ? 1 : -1;
double p = 1 / nu;
double lg1 = lngamma(p);
double lg3 = lngamma(3 * p);
double k = pow(0.5, p) * exp(0.5 * (lg1 - lg3));
double znu = pow(fabs(x / k), nu);
double P = gamma_cdf_comp(p, 2, znu, 1);
P ... | GED_cdf_comp | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
double GED_cdf_inverse(double nu, double a) {
double v3;
int sgn;
double a2;
double lg1;
double lg3;
double sd;
double x;
if (nu <= 0.0 || a >= 1.0 || a <= 0.0)
return NAN;
if (a <= 0.5) {
a2 = 1.0 - (a + a);
sgn = -1;
} else {
a2 = a + a - 1.0;
sgn = 1;
}
lg1 = lngamma(1.0 ... | double GED_cdf_inverse(double nu, double a) {
if (nu > 0 && a < 1 && a > 0) {
double a2, p, lg1, lg3, sd, x;
int sgn;
if (a > 0.5) {
a2 = 2 * a - 1;
sgn = 1;
} else {
a2 = 1 - 2 * a;
sgn = -1;
}
p = 1 / nu;
lg1 = lngamma(p);
lg3 = lngamma(3 * p);
sd = pow(... | GED_cdf_inverse | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
double GED_pdf(double nu, double x) {
double v3;
double lg1;
double lg3;
double k;
double znu;
if (nu <= 0.0)
return NAN;
lg1 = lngamma(1.0 / nu);
lg3 = lngamma(3.0 / nu);
v3 = pow(0.5, 1.0 / nu);
k = exp((lg1 - lg3) * 0.5) * v3;
znu = pow(fabs(x / k), nu);
return exp(0.5 * (lg3 - lg1 * 3.0... | double GED_pdf(double nu, double x) {
if (nu > 0) {
double lg1 = lngamma(1 / nu);
double lg3 = lngamma(3 / nu);
double lC = 0.5 * (lg3 - 3 * lg1);
double k = pow(0.5, 1 / nu) * exp(0.5 * (lg1 - lg3));
double znu = pow(fabs(x / k), nu);
return (0.5 * nu) * exp(lC - 0.5 * znu);
} else {
r... | GED_pdf | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int GED_pdf_array(double nu, double *x, int n) {
double v4;
int i;
int ia;
int err;
double lg1;
double lg3;
double k;
double znu;
err = 0;
if (nu <= 0.0) {
err = 2;
} else {
lg1 = lngamma(1.0 / nu);
lg3 = lngamma(3.0 / nu);
v4 = pow(0.5, 1.0 / nu);
k = exp((lg1 - lg3) * 0.5) *... | static int GED_pdf_array(double nu, double *x, int n) {
int i, err = 0;
if (nu > 0) {
double lg1 = lngamma(1 / nu);
double lg3 = lngamma(3 / nu);
double lC = 0.5 * (lg3 - 3 * lg1);
double k = pow(0.5, 1 / nu) * exp(0.5 * (lg1 - lg3));
double znu;
for (i = 0; i < n; i++) {
if (!na(x[i... | GED_pdf_array | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
double GHK_1(const gretl_matrix *C, const gretl_matrix *A,
const gretl_matrix *B, const gretl_matrix *U, gretl_matrix *TA,
gretl_matrix *TB, gretl_matrix *WGT, gretl_matrix *TT,
double huge) {
double v9;
double v10;
double *v11;
double *v12;
double *v13;
double *v14;
... | static double GHK_1(const gretl_matrix *C, const gretl_matrix *A,
const gretl_matrix *B, const gretl_matrix *U,
gretl_matrix *TA, gretl_matrix *TB, gretl_matrix *WGT,
gretl_matrix *TT, double huge) {
int m = C->rows;
int r = U->cols;
double P, den = gret... | GHK_1 | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int GLS_demean_detrend(DATASET *dset, int v, int offset, int T, DetCode det,
adf_info *ainfo, PRN *prn) {
int v7;
double v9;
const char *v10;
int i;
int t;
int ta;
int tb;
int tc;
int err;
int xcols;
double *y;
double *ya;
gretl_matrix *yd;
gretl_matrix *Xd;
gretl_ma... | static int GLS_demean_detrend(DATASET *dset, int v, int offset, int T,
DetCode det, adf_info *ainfo, PRN *prn) {
double *y = dset->Z[v];
gretl_matrix *yd = NULL;
gretl_matrix *Xd = NULL;
gretl_matrix *b = NULL;
double c;
int i, t, xcols;
int err = 0;
xcols = (det == UR_TRE... | GLS_demean_detrend | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int GMM_crit_line(const MODEL *pmod, PRN *prn) {
int gretl_digits;
int v3;
char *v4;
char *v5;
char *v6;
unsigned int v7;
char *v8;
double Q;
double TQ;
char x1[32];
char x2[40];
unsigned long v14;
v14 = __readfsqword(0x28u);
Q = pmod->ess;
TQ = (double)pmod->nobs * Q;
if (plain_format(... | static int GMM_crit_line(const MODEL *pmod, PRN *prn) {
double Q = pmod->ess;
double TQ = pmod->ess * pmod->nobs;
if (plain_format(prn)) {
pprintf(prn, " %s: Q = %.*g (TQ = %.*g)\n", _("GMM criterion"),
XDIGITS(pmod), Q, XDIGITS(pmod), TQ);
} else if (rtf_format(prn)) {
pprintf(prn, RTFTAB... | GMM_crit_line | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
MODEL *GNR(MODEL *__return_ptr retstr, int *glist, DATASET *gdset, gretlopt opt,
PRN *prn) {
char *v5;
MODEL v7;
PRN *prna;
gretlopt opta;
DATASET *gdseta;
int *glista;
MODEL *v12;
gretlopt lsqopt;
MODEL gnr;
MODEL mpmod;
unsigned long v16;
v12 = retstr;
glista = glist;
gdseta = ... | MODEL GNR(int *glist, DATASET *gdset, gretlopt opt, PRN *prn) {
gretlopt lsqopt = OPT_A;
MODEL gnr;
if (opt & OPT_R) {
lsqopt |= OPT_R;
}
gnr = lsq(glist, gdset, OLS, lsqopt);
#if NLS_DEBUG
gnr.name = gretl_strdup("Gauss-Newton Regression for NLS");
printmodel(&gnr, gdset, OPT_NONE, prn);
free(g... | GNR | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int GammaY(double *g, double *y, double *tmp, int T, int n) {
double v5;
double v6;
int t;
int j;
int ja;
int jb;
int jc;
double lx;
for (j = 0; j <= n; ++j)
tmp[j] = 0.0;
for (t = 0; t < T; ++t) {
for (ja = n; ja > 0; --ja)
tmp[ja] = tmp[ja - 1];
*tmp = y[t] * *g;
for (jb = 1... | static int GammaY(double *g, double *y, double *tmp, int T, int n) {
double lx, rx;
int t, j;
for (j = 0; j <= n; j++) {
tmp[j] = 0.0;
}
for (t = 0; t < T; t++) {
for (j = n; j > 0; j--) {
tmp[j] = tmp[j - 1];
}
tmp[0] = g[0] * y[t];
for (j = 1; j <= n; j++) {
lx = (t - j < 0... | GammaY | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
gretl_matrix *HAC_XOX(const gretl_matrix *X, const gretl_matrix *uhat,
VCVInfo *vi, int use_prior, int *err) {
int p;
int prewhiten;
int data_based;
int kern;
int j;
int t;
int T;
int k;
gretl_matrix *A;
gretl_matrix *w;
double bt;
gretl_matrix *XOX;
gretl_matrix *Wtj;
... | gretl_matrix *HAC_XOX(const gretl_matrix *X, const gretl_matrix *uhat,
VCVInfo *vi, int use_prior, int *err) {
gretl_matrix *XOX = NULL;
gretl_matrix *Wtj = NULL;
gretl_matrix *Gj = NULL;
gretl_matrix *H = NULL;
gretl_matrix *A = NULL;
gretl_matrix *w = NULL;
int prewhiten;
int dat... | HAC_XOX | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int HAC_prewhiten(gretl_matrix *E, gretl_matrix *A) {
int i;
int ia;
int ib;
int j;
int ja;
int t;
int ta;
int tb;
int err;
int T;
int k;
gretl_matrix *y;
gretl_matrix *X;
gretl_matrix *XTX;
gretl_matrix *b;
gretl_matrix *e;
gretl_matrix_block *B;
double eti;
double xtj;
unsigned... | static int HAC_prewhiten(gretl_matrix *E, gretl_matrix *A) {
gretl_matrix_block *B;
gretl_matrix *y, *X, *XTX;
gretl_matrix *b, *e;
int T = E->rows;
int k = E->cols;
double xtj, eti;
int i, j, t;
int err = 0;
B = gretl_matrix_block_new(&y, T - 1, 1, &X, T - 1, k, &XTX, k, k, &b, k, 1,
... | HAC_prewhiten | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int IsReducible(prescr_t *pre, uint32_t aaa, uint32_t *polylist) {
int i;
uint32_t x;
x = polylist[pre->sizeofA];
for (i = pre->sizeofA - 1; i >= 0; --i) {
if ((aaa & 1) != 0)
x ^= polylist[i];
aaa >>= 1;
}
return x != 0;
} | static int IsReducible(prescr_t *pre, uint32_t aaa, uint32_t *polylist) {
int i;
uint32_t x;
x = polylist[pre->sizeofA];
for (i = pre->sizeofA - 1; i >= 0; i--) {
if (aaa & 0x1)
x ^= polylist[i];
aaa >>= 1;
}
if (x == 0)
return REDU;
else
return NONREDU;
} | IsReducible | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int Ivals_ok(const GRETL_VAR *var) {
return var->Ivals && fabs(*var->Ivals) <= 1.797693134862316e308 &&
fabs(var->Ivals[1]) <= 1.797693134862316e308 &&
fabs(var->Ivals[2]) <= 1.797693134862316e308;
} | static int Ivals_ok(const GRETL_VAR *var) {
return var->Ivals != NULL && !na(var->Ivals[0]) && !na(var->Ivals[1]) &&
!na(var->Ivals[2]);
} | Ivals_ok | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
double K_bessel(double x, double alpha, int nb, int ize, double *bk,
int *ncalc) {
double v7;
double v8;
double v9;
double v10;
double v11;
int i;
int ia;
int ib;
int ic;
int id;
int ie;
int ig;
int ih;
int ij;
int ik;
int il;
int j;
int k;
int ii;
int iend;
int... | static double K_bessel(double x, double alpha, int nb, int ize, double *bk,
int *ncalc) {
static const double a = .11593151565841244881;
static const double p[8] = {.805629875690432845, 20.4045500205365151,
157.705605106676174, 536.671116469207504,
... | K_bessel | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int LBFGS_max(double *b, int n, int maxit, double reltol, int *fncount,
int *grcount, BFGS_CRIT_FUNC cfunc, int crittype,
BFGS_GRAD_FUNC gradfunc, BFGS_COMBO_FUNC combfunc, void *data,
const gretl_matrix *bounds, gretlopt opt, PRN *prn) {
_BOOL4 v14;
double v15;
double v1... | int LBFGS_max(double *b, int n, int maxit, double reltol, int *fncount,
int *grcount, BFGS_CRIT_FUNC cfunc, int crittype,
BFGS_GRAD_FUNC gradfunc, BFGS_COMBO_FUNC combfunc, void *data,
const gretl_matrix *bounds, gretlopt opt, PRN *prn) {
double *wspace = NULL;
int *ispace ... | LBFGS_max | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int LHS_matrix_reusable(parser *p, gretl_matrix **pm, gretl_matrix *tmp) {
_BOOL4 v4;
_BOOL4 v5;
_BOOL4 v6;
int ok;
gretl_matrix *m;
char *retm;
m = (gretl_matrix *)gen_get_lhs_var(p, GRETL_TYPE_MATRIX);
ok = 0;
if (!m)
return 0;
switch (p->ret->t) {
case '6':
v4 = m->rows == 1 && m->cols... | static int LHS_matrix_reusable(parser *p, gretl_matrix **pm,
gretl_matrix *tmp) {
gretl_matrix *m = gen_get_lhs_var(p, GRETL_TYPE_MATRIX);
int ok = 0;
if (m == NULL) {
return 0;
} else if (p->ret->t == NUM) {
ok = (m->rows == 1 && m->cols == 1);
} else if (p->ret->t == ... | LHS_matrix_reusable | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
MODEL *LM_add_test(MODEL *__return_ptr retstr, MODEL *pmod, DATASET *dset,
int *list, gretlopt opt, PRN *prn) {
MODEL v7;
PRN *prna;
gretlopt opta;
int *lista;
DATASET *dseta;
MODEL *pmoda;
MODEL *v13;
int err;
int df_0;
MODEL aux;
unsigned long v17;
v13 = retstr;
pmoda = p... | static MODEL LM_add_test(MODEL *pmod, DATASET *dset, int *list, gretlopt opt,
PRN *prn) {
MODEL aux;
int err;
err = add_residual_to_dataset(pmod, dset);
if (err) {
gretl_model_init(&aux, dset);
aux.errcode = err;
return aux;
}
list[1] = dset->v - 1;
aux = lsq(list, ... | LM_add_test | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
double LWE_calc(const gretl_matrix *X, int m, int *err) {
double v4;
unsigned long v5;
int v6;
int iter;
double d;
double dd;
double f;
double incr;
double incl;
double h;
LWE_helper L;
unsigned long v16;
v16 = __readfsqword(0x28u);
memset(&L, 0, sizeof(L));
d = 0.0;
dd = 1.0;
iter = ... | static double LWE_calc(const gretl_matrix *X, int m, int *err) {
struct LWE_helper L = {0};
double d = 0, dd = 1.0;
double eps = 1.0e-05;
double f, incr, incl, deriv, h;
int iter = 0;
*err = LWE_init(&L, X, m);
if (*err) {
return NADBL;
}
while (fabs(dd) > 1.0e-06 && iter++ < LWE_MAXITER) {
... | LWE_calc | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void LWE_free(LWE_helper *L) {
gretl_matrix_free(L->lambda);
gretl_matrix_free(L->lpow);
gretl_matrix_free(L->I1);
gretl_matrix_free(L->I2);
} | static void LWE_free(struct LWE_helper *L) {
gretl_matrix_free(L->lambda);
gretl_matrix_free(L->lpow);
gretl_matrix_free(L->I1);
gretl_matrix_free(L->I2);
} | LWE_free | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int LWE_init(LWE_helper *L, const gretl_matrix *X, int m) {
int err;
int i;
unsigned long v7;
v7 = __readfsqword(0x28u);
err = 0;
L->lpow = 0;
L->I2 = L->lpow;
L->I1 = gretl_matrix_pergm(X, m, &err);
if (err)
return err;
L->lambda = LWE_lambda(L->I1, X->rows);
if (L->lambda) {
L->lpow = g... | static int LWE_init(struct LWE_helper *L, const gretl_matrix *X, int m) {
int i, err = 0;
L->I2 = L->lpow = NULL;
L->I1 = gretl_matrix_pergm(X, m, &err);
if (err) {
return err;
}
L->lambda = LWE_lambda(L->I1, X->rows);
if (L->lambda == NULL) {
gretl_matrix_free(L->I1);
return E_ALLOC;
}
... | LWE_init | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
gretl_matrix *LWE_lambda(const gretl_matrix *I1, int n) {
int rows;
int i;
int m;
gretl_matrix *lambda;
if (I1) {
if (I1->cols == 1) {
rows = I1->rows;
} else if (I1->rows == 1) {
rows = I1->cols;
} else {
rows = 0;
}
} else {
rows = 0;
}
m = rows;
lambda = gretl... | static gretl_matrix *LWE_lambda(const gretl_matrix *I1, int n) {
gretl_matrix *lambda;
int i, m = gretl_vector_get_length(I1);
lambda = gretl_column_vector_alloc(m);
if (lambda != NULL) {
for (i = 0; i < m; i++) {
gretl_vector_set(lambda, i, (M_2PI / n) * (i + 1));
}
}
return lambda;
} | LWE_lambda | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
double LWE_obj_func(LWE_helper *L, double d) {
double v2;
int i;
double dd;
dd = d + d;
gretl_matrix_copy_values(L->lpow, L->lambda);
gretl_matrix_raise(L->lpow, d + d);
for (i = 0; i < L->I1->rows; ++i)
L->I2->val[i] = L->lpow->val[i] * L->I1->val[i];
v2 = gretl_vector_mean(L->I2);
return -(log(... | static double LWE_obj_func(struct LWE_helper *L, double d) {
double dd = 2.0 * d;
int i;
gretl_matrix_copy_values(L->lpow, L->lambda);
gretl_matrix_raise(L->lpow, dd);
for (i = 0; i < L->I1->rows; i++) {
L->I2->val[i] = L->I1->val[i] * L->lpow->val[i];
}
return -(log(gretl_vector_mean(L->I2)) - dd ... | LWE_obj_func | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int MS_excel_date_string(char *targ, int mst, int pd, int d1904) {
int v4;
int v5;
int v6;
int y;
int d;
int m;
int drem;
int drema;
int yd;
int yd_0;
int leap;
int leapa;
int md_0;
int md;
if (d1904)
v4 = 1904;
else
v4 = 1900;
y = v4;
if (d1904)
v5 = 2;
else
v5 = ... | int MS_excel_date_string(char *targ, int mst, int pd, int d1904) {
int y = (d1904) ? 1904 : 1900;
int d = (d1904) ? 2 : 1;
int m = 1;
int leap, drem;
*targ = '\0';
if (mst == 0) {
if (d1904) {
d = 1;
} else {
y = 1899;
m = 12;
d = 31;
}
} else if (mst > 0) {
dre... | MS_excel_date_string | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void MakepreModPolys(prescr_t *pre, int mm, int nn, int rr, int ww) {
int v5;
Polynomial **v6;
int v7;
Polynomial **v8;
int v9;
Polynomial **v10;
Polynomial **v11;
int i;
int ia;
int j;
int ja;
Polynomial *t0;
Polynomial *s0;
Polynomial *ta;
Polynomial *t;
Polynomial *s;
Polynomial *s1... | static void MakepreModPolys(prescr_t *pre, int mm, int nn, int rr, int ww) {
Polynomial *t, *t0, *t1, *s, *s0, *s1;
int i, j;
j = 0;
t = NewPoly(0);
t->deg = 0;
t->x[0] = 1;
pre->preModPolys[j++] = t;
t = make_tntm(nn, mm);
t0 = make_tntm(nn, mm);
s = make_tntm(nn - 1, mm - 1);
for (i = 1; i < ... | MakepreModPolys | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int NR_fallback_hessian(double *b, gretl_matrix *H, BFGS_GRAD_FUNC gradfunc,
BFGS_CRIT_FUNC cfunc, void *data) {
if (gradfunc)
return hessian_from_score(b, H, gradfunc, cfunc, data);
else
return numerical_hessian(b, H, cfunc, data, 1, 0.0);
} | static int NR_fallback_hessian(double *b, gretl_matrix *H,
BFGS_GRAD_FUNC gradfunc, BFGS_CRIT_FUNC cfunc,
void *data) {
if (gradfunc != NULL) {
return hessian_from_score(b, H, gradfunc, cfunc, data);
} else {
return numerical_hessian(b, H, cfunc,... | NR_fallback_hessian | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int NR_invert_hessian(gretl_matrix *H, const gretl_matrix *Hcpy) {
double v2;
int i;
int ia;
int ib;
int j;
int ja;
_BOOL4 restore;
int err;
int s;
int n;
double hii;
double lambda;
double x;
n = H->rows;
restore = 0;
err = 0;
for (i = 0; i < n; ++i) {
hii = H->val[i * H->rows + i... | static int NR_invert_hessian(gretl_matrix *H, const gretl_matrix *Hcpy) {
double hii, hmin = 1.0e-28;
int i, j, n = H->rows;
int restore = 0;
double x;
int err = 0;
for (i = 0; i < n && !err; i++) {
hii = gretl_matrix_get(H, i, i);
if (hii < hmin) {
err = 1;
break;
}
}
if (err)... | NR_invert_hessian | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
Polynomial *NewPoly(int degree) {
Polynomial *p;
p = (Polynomial *)calloc(1u, 0x10u);
if (!p) {
puts("calloc error in \"NewPoly()\"");
exit(1);
}
p->deg = degree;
if (degree >= 0) {
p->x = (int *)calloc(degree + 1, 4u);
if (!p->x) {
puts("calloc error");
exit(1);
}
retur... | static Polynomial *NewPoly(int degree) {
Polynomial *p;
p = (Polynomial *)calloc(1, sizeof(Polynomial));
if (p == NULL) {
printf("calloc error in \"NewPoly()\"\n");
exit(1);
}
p->deg = degree;
if (degree < 0) {
p->x = NULL;
return p;
}
p->x = (int *)calloc(degree + 1, sizeof(int));
... | NewPoly | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.