Home | History | Annotate | Download | only in wpa_supplicant

Lines Matching defs:config

19 #include "config.h"
2075 * @config: Configuration data from wpa_config_read()
2084 int wpa_config_add_prio_network(struct wpa_config *config,
2094 for (prio = 0; prio < config->num_prio; prio++) {
2095 prev = config->pssid[prio];
2105 nlist = os_realloc_array(config->pssid, config->num_prio + 1,
2110 for (prio = 0; prio < config->num_prio; prio++) {
2113 (config->num_prio - prio) *
2120 config->num_prio++;
2121 config->pssid = nlist;
2129 * @config: Configuration data from wpa_config_read()
2136 int wpa_config_update_prio_list(struct wpa_config *config)
2141 os_free(config->pssid);
2142 config->pssid = NULL;
2143 config->num_prio = 0;
2145 ssid = config->ssid;
2148 if (wpa_config_add_prio_network(config, ssid) < 0)
2277 void wpa_config_flush_blobs(struct wpa_config *config)
2282 blob = config->blobs;
2283 config->blobs = NULL;
2295 * @config: Configuration data from wpa_config_read()
2300 void wpa_config_free(struct wpa_config *config)
2306 ssid = config->ssid;
2313 cred = config->cred;
2320 wpa_config_flush_blobs(config);
2322 wpabuf_free(config->wps_vendor_ext_m1);
2324 wpabuf_free(config->wps_vendor_ext[i]);
2325 os_free(config->ctrl_interface);
2326 os_free(config->ctrl_interface_group);
2327 os_free(config->opensc_engine_path);
2328 os_free(config->pkcs11_engine_path);
2329 os_free(config->pkcs11_module_path);
2330 os_free(config->openssl_ciphers);
2331 os_free(config->pcsc_reader);
2332 str_clear_free(config->pcsc_pin);
2333 os_free(config->driver_param);
2334 os_free(config->device_name);
2335 os_free(config->manufacturer);
2336 os_free(config->model_name);
2337 os_free(config->model_number);
2338 os_free(config->serial_number);
2339 os_free(config->config_methods);
2340 os_free(config->p2p_ssid_postfix);
2341 os_free(config->pssid);
2342 os_free(config->p2p_pref_chan);
2343 os_free(config->p2p_no_go_freq.range);
2344 os_free(config->autoscan);
2345 os_free(config->freq_list);
2346 wpabuf_free(config->wps_nfc_dh_pubkey);
2347 wpabuf_free(config->wps_nfc_dh_privkey);
2348 wpabuf_free(config->wps_nfc_dev_pw);
2349 os_free(config->ext_password_backend);
2350 os_free(config->sae_groups);
2351 wpabuf_free(config->ap_vendor_elements);
2352 os_free(config->osu_dir);
2353 os_free(config->bgscan);
2354 os_free(config->wowlan_triggers);
2355 os_free(config->fst_group_id);
2356 os_free(config->sched_scan_plans);
2358 os_free(config->non_pref_chan);
2361 os_free(config);
2367 * @config: Configuration data from wpa_config_read()
2375 void wpa_config_foreach_network(struct wpa_config *config,
2381 ssid = config->ssid;
2392 * @config: Configuration data from wpa_config_read()
2396 struct wpa_ssid * wpa_config_get_network(struct wpa_config *config, int id)
2400 ssid = config->ssid;
2413 * @config: Configuration data from wpa_config_read()
2416 struct wpa_ssid * wpa_config_add_network(struct wpa_config *config)
2422 ssid = config->ssid;
2439 config->ssid = ssid;
2441 wpa_config_update_prio_list(config);
2449 * @config: Configuration data from wpa_config_read()
2453 int wpa_config_remove_network(struct wpa_config *config, int id)
2457 ssid = config->ssid;
2471 config->ssid = ssid->next;
2473 wpa_config_update_prio_list(config);
3441 struct wpa_cred * wpa_config_get_cred(struct wpa_config *config, int id)
3445 cred = config->cred;
3456 struct wpa_cred * wpa_config_add_cred(struct wpa_config *config)
3462 cred = config->cred;
3479 config->cred = cred;
3485 int wpa_config_remove_cred(struct wpa_config *config, int id)
3489 cred = config->cred;
3503 config->cred = cred->next;
3513 * @config: Configuration data from wpa_config_read()
3517 const struct wpa_config_blob * wpa_config_get_blob(struct wpa_config *config,
3520 struct wpa_config_blob *blob = config->blobs;
3533 * @config: Configuration data from wpa_config_read()
3539 void wpa_config_set_blob(struct wpa_config *config,
3542 wpa_config_remove_blob(config, blob->name);
3543 blob->next = config->blobs;
3544 config->blobs = blob;
3564 * @config: Configuration data from wpa_config_read()
3568 int wpa_config_remove_blob(struct wpa_config *config, const char *name)
3570 struct wpa_config_blob *pos = config->blobs, *prev = NULL;
3577 config->blobs = pos->next;
3600 struct wpa_config *config;
3611 config = os_zalloc(sizeof(*config));
3612 if (config == NULL)
3614 config->eapol_version = DEFAULT_EAPOL_VERSION;
3615 config->ap_scan = DEFAULT_AP_SCAN;
3616 config->user_mpm = DEFAULT_USER_MPM;
3617 config->max_peer_links = DEFAULT_MAX_PEER_LINKS;
3618 config->mesh_max_inactivity = DEFAULT_MESH_MAX_INACTIVITY;
3619 config->dot11RSNASAERetransPeriod =
3621 config->fast_reauth = DEFAULT_FAST_REAUTH;
3622 config->p2p_go_intent = DEFAULT_P2P_GO_INTENT;
3623 config->p2p_intra_bss = DEFAULT_P2P_INTRA_BSS;
3624 config->p2p_go_freq_change_policy = DEFAULT_P2P_GO_FREQ_MOVE;
3625 config->p2p_go_max_inactivity = DEFAULT_P2P_GO_MAX_INACTIVITY;
3626 config->p2p_optimize_listen_chan = DEFAULT_P2P_OPTIMIZE_LISTEN_CHAN;
3627 config->p2p_go_ctwindow = DEFAULT_P2P_GO_CTWINDOW;
3628 config->bss_max_count = DEFAULT_BSS_MAX_COUNT;
3629 config->bss_expiration_age = DEFAULT_BSS_EXPIRATION_AGE;
3630 config->bss_expiration_scan_count = DEFAULT_BSS_EXPIRATION_SCAN_COUNT;
3631 config->max_num_sta = DEFAULT_MAX_NUM_STA;
3632 config->access_network_type = DEFAULT_ACCESS_NETWORK_TYPE;
3633 config->scan_cur_freq = DEFAULT_SCAN_CUR_FREQ;
3634 config->wmm_ac_params[0] = ac_be;
3635 config->wmm_ac_params[1] = ac_bk;
3636 config->wmm_ac_params[2] = ac_vi;
3637 config->wmm_ac_params[3] = ac_vo;
3638 config->p2p_search_delay = DEFAULT_P2P_SEARCH_DELAY;
3639 config->rand_addr_lifetime = DEFAULT_RAND_ADDR_LIFETIME;
3640 config->key_mgmt_offload = DEFAULT_KEY_MGMT_OFFLOAD;
3641 config->cert_in_cb = DEFAULT_CERT_IN_CB;
3642 config->wpa_rsc_relaxation = DEFAULT_WPA_RSC_RELAXATION;
3645 config->mbo_cell_capa = DEFAULT_MBO_CELL_CAPA;
3649 config->ctrl_interface = os_strdup(ctrl_interface);
3651 config->driver_param = os_strdup(driver_param);
3653 return config;
3660 * @config: Configuration data from wpa_config_read()
3662 void wpa_config_debug_dump_networks(struct wpa_config *config)
3667 for (prio = 0; prio < config->num_prio; prio++) {
3668 ssid = config->pssid[prio];
3685 struct wpa_config *config, int line, const char *value);
3686 int (*get)(const char *name, struct wpa_config *config, long offset,
3694 struct wpa_config *config, int line,
3700 dst = (int *) (((u8 *) config) + (long) data->param1);
3732 struct wpa_config *config, int line,
3757 dst = (char **) (((u8 *) config) + (long) data->param1);
3767 struct wpa_config *config, int line,
3781 res = wpa_global_config_parse_str(data, config, line, tmp);
3788 struct wpa_config *config, int line,
3807 dst = (struct wpabuf **) (((u8 *) config) + (long) data->param1);
3817 struct wpa_config *config, int line,
3829 os_free(config->freq_list);
3830 config->freq_list = freqs;
3837 struct wpa_config *config, int line,
3848 dst = (u32 *) (((u8 *) config) + (long) data->param1);
3859 struct wpa_config *config, int line,
3866 config->country[0] = pos[0];
3867 config->country[1] = pos[1];
3869 config->country[0], config->country[1]);
3875 const struct global_parse_data *data, struct wpa_config *config,
3897 struct wpa_config *config, int line,
3901 if (uuid_str2bin(pos, config->uuid)) {
3905 uuid_bin2str(config->uuid, buf, sizeof(buf));
3913 struct wpa_config *config, int line, const char *pos)
3915 return wps_dev_type_str2bin(pos, config->device_type);
3920 struct wpa_config *config, int line,
3923 if (hexstr2bin(pos, config->os_version, 4)) {
3928 WPA_GET_BE32(config->os_version));
3935 struct wpa_config *config, int line, const char *pos)
3958 wpabuf_free(config->wps_vendor_ext_m1);
3959 config->wps_vendor_ext_m1 = tmp;
3974 struct wpa_config *config, int line, const char *pos)
3978 if (config->num_sec_device_types >= MAX_SEC_DEVICE_TYPES) {
3984 idx = config->num_sec_device_types;
3986 if (wps_dev_type_str2bin(pos, config->sec_device_type[idx]))
3989 config->num_sec_device_types++;
3996 struct wpa_config *config, int line, const char *pos)
4028 os_free(config->p2p_pref_chan);
4029 config->p2p_pref_chan = pref;
4030 config->num_p2p_pref_chan = num;
4032 (u8 *) config->p2p_pref_chan,
4033 config->num_p2p_pref_chan * sizeof(struct p2p_channel));
4046 struct wpa_config *config, int line, const char *pos)
4050 ret = freq_range_list_parse(&config->p2p_no_go_freq, pos);
4057 config->p2p_no_go_freq.num);
4067 struct wpa_config *config, int line, const char *pos)
4069 if (hwaddr_aton2(pos, config->hessid) < 0) {
4081 struct wpa_config *config, int line, const char *pos)
4090 os_free(config->sae_groups);
4091 config->sae_groups = groups;
4099 struct wpa_config *config, int line, const char *pos)
4122 wpabuf_free(config->ap_vendor_elements);
4123 config->ap_vendor_elements = tmp;
4137 struct wpa_config *config, int line, const char *pos)
4140 os_free(config->ctrl_interface);
4141 config->ctrl_interface = NULL;
4147 static int wpa_config_get_int(const char *name, struct wpa_config *config,
4151 int *val = (int *) (((u8 *) config) + (long) offset);
4159 static int wpa_config_get_str(const char *name, struct wpa_config *config,
4163 char **val = (char **) (((u8 *) config) + (long) offset);
4181 static int wpa_config_get_ipv4(const char *name, struct wpa_config *config,
4185 void *val = ((u8 *) config) + (long) offset;
4374 int wpa_config_dump_values(struct wpa_config *config, char *buf, size_t buflen)
4386 tmp = field->get(field->name, config, (long) field->param1,
4398 int wpa_config_get_value(const char *name, struct wpa_config *config,
4410 return field->get(name, config, (long) field->param1,
4435 int wpa_config_process_global(struct wpa_config *config, char *pos, int line)
4447 if (field->parser(field, config, line, pos + flen + 1)) {
4453 config->wps_nfc_pw_from_config = 1;
4454 config->changed_parameters |= field->changed_flag;
4469 if (hostapd_config_wmm_ac(config->wmm_ac_params, pos,