Home | History | Annotate | Download | only in wpa_supplicant

Lines Matching defs:config

20 #include "config.h"
2164 * @config: Configuration data from wpa_config_read()
2173 int wpa_config_add_prio_network(struct wpa_config *config,
2183 for (prio = 0; prio < config->num_prio; prio++) {
2184 prev = config->pssid[prio];
2194 nlist = os_realloc_array(config->pssid, config->num_prio + 1,
2199 for (prio = 0; prio < config->num_prio; prio++) {
2202 (config->num_prio - prio) *
2209 config->num_prio++;
2210 config->pssid = nlist;
2218 * @config: Configuration data from wpa_config_read()
2225 int wpa_config_update_prio_list(struct wpa_config *config)
2230 os_free(config->pssid);
2231 config->pssid = NULL;
2232 config->num_prio = 0;
2234 ssid = config->ssid;
2237 if (wpa_config_add_prio_network(config, ssid) < 0)
2366 void wpa_config_flush_blobs(struct wpa_config *config)
2371 blob = config->blobs;
2372 config->blobs = NULL;
2384 * @config: Configuration data from wpa_config_read()
2389 void wpa_config_free(struct wpa_config *config)
2395 ssid = config->ssid;
2402 cred = config->cred;
2409 wpa_config_flush_blobs(config);
2411 wpabuf_free(config->wps_vendor_ext_m1);
2413 wpabuf_free(config->wps_vendor_ext[i]);
2414 os_free(config->ctrl_interface);
2415 os_free(config->ctrl_interface_group);
2416 os_free(config->opensc_engine_path);
2417 os_free(config->pkcs11_engine_path);
2418 os_free(config->pkcs11_module_path);
2419 os_free(config->openssl_ciphers);
2420 os_free(config->pcsc_reader);
2421 str_clear_free(config->pcsc_pin);
2422 os_free(config->driver_param);
2423 os_free(config->device_name);
2424 os_free(config->manufacturer);
2425 os_free(config->model_name);
2426 os_free(config->model_number);
2427 os_free(config->serial_number);
2428 os_free(config->config_methods);
2429 os_free(config->p2p_ssid_postfix);
2430 os_free(config->pssid);
2431 os_free(config->p2p_pref_chan);
2432 os_free(config->p2p_no_go_freq.range);
2433 os_free(config->autoscan);
2434 os_free(config->freq_list);
2435 wpabuf_free(config->wps_nfc_dh_pubkey);
2436 wpabuf_free(config->wps_nfc_dh_privkey);
2437 wpabuf_free(config->wps_nfc_dev_pw);
2438 os_free(config->ext_password_backend);
2439 os_free(config->sae_groups);
2440 wpabuf_free(config->ap_vendor_elements);
2441 os_free(config->osu_dir);
2442 os_free(config->bgscan);
2443 os_free(config->wowlan_triggers);
2444 os_free(config->fst_group_id);
2445 os_free(config->sched_scan_plans);
2447 os_free(config->non_pref_chan);
2450 os_free(config);
2456 * @config: Configuration data from wpa_config_read()
2464 void wpa_config_foreach_network(struct wpa_config *config,
2470 ssid = config->ssid;
2481 * @config: Configuration data from wpa_config_read()
2485 struct wpa_ssid * wpa_config_get_network(struct wpa_config *config, int id)
2489 ssid = config->ssid;
2502 * @config: Configuration data from wpa_config_read()
2505 struct wpa_ssid * wpa_config_add_network(struct wpa_config *config)
2511 ssid = config->ssid;
2528 config->ssid = ssid;
2530 wpa_config_update_prio_list(config);
2538 * @config: Configuration data from wpa_config_read()
2542 int wpa_config_remove_network(struct wpa_config *config, int id)
2546 ssid = config->ssid;
2560 config->ssid = ssid->next;
2562 wpa_config_update_prio_list(config);
3540 struct wpa_cred * wpa_config_get_cred(struct wpa_config *config, int id)
3544 cred = config->cred;
3555 struct wpa_cred * wpa_config_add_cred(struct wpa_config *config)
3561 cred = config->cred;
3578 config->cred = cred;
3584 int wpa_config_remove_cred(struct wpa_config *config, int id)
3588 cred = config->cred;
3602 config->cred = cred->next;
3612 * @config: Configuration data from wpa_config_read()
3616 const struct wpa_config_blob * wpa_config_get_blob(struct wpa_config *config,
3619 struct wpa_config_blob *blob = config->blobs;
3632 * @config: Configuration data from wpa_config_read()
3638 void wpa_config_set_blob(struct wpa_config *config,
3641 wpa_config_remove_blob(config, blob->name);
3642 blob->next = config->blobs;
3643 config->blobs = blob;
3663 * @config: Configuration data from wpa_config_read()
3667 int wpa_config_remove_blob(struct wpa_config *config, const char *name)
3669 struct wpa_config_blob *pos = config->blobs, *prev = NULL;
3676 config->blobs = pos->next;
3699 struct wpa_config *config;
3710 config = os_zalloc(sizeof(*config));
3711 if (config == NULL)
3713 config->eapol_version = DEFAULT_EAPOL_VERSION;
3714 config->ap_scan = DEFAULT_AP_SCAN;
3715 config->user_mpm = DEFAULT_USER_MPM;
3716 config->max_peer_links = DEFAULT_MAX_PEER_LINKS;
3717 config->mesh_max_inactivity = DEFAULT_MESH_MAX_INACTIVITY;
3718 config->dot11RSNASAERetransPeriod =
3720 config->fast_reauth = DEFAULT_FAST_REAUTH;
3721 config->p2p_go_intent = DEFAULT_P2P_GO_INTENT;
3722 config->p2p_intra_bss = DEFAULT_P2P_INTRA_BSS;
3723 config->p2p_go_freq_change_policy = DEFAULT_P2P_GO_FREQ_MOVE;
3724 config->p2p_go_max_inactivity = DEFAULT_P2P_GO_MAX_INACTIVITY;
3725 config->p2p_optimize_listen_chan = DEFAULT_P2P_OPTIMIZE_LISTEN_CHAN;
3726 config->p2p_go_ctwindow = DEFAULT_P2P_GO_CTWINDOW;
3727 config->bss_max_count = DEFAULT_BSS_MAX_COUNT;
3728 config->bss_expiration_age = DEFAULT_BSS_EXPIRATION_AGE;
3729 config->bss_expiration_scan_count = DEFAULT_BSS_EXPIRATION_SCAN_COUNT;
3730 config->max_num_sta = DEFAULT_MAX_NUM_STA;
3731 config->access_network_type = DEFAULT_ACCESS_NETWORK_TYPE;
3732 config->scan_cur_freq = DEFAULT_SCAN_CUR_FREQ;
3733 config->wmm_ac_params[0] = ac_be;
3734 config->wmm_ac_params[1] = ac_bk;
3735 config->wmm_ac_params[2] = ac_vi;
3736 config->wmm_ac_params[3] = ac_vo;
3737 config->p2p_search_delay = DEFAULT_P2P_SEARCH_DELAY;
3738 config->rand_addr_lifetime = DEFAULT_RAND_ADDR_LIFETIME;
3739 config->key_mgmt_offload = DEFAULT_KEY_MGMT_OFFLOAD;
3740 config->cert_in_cb = DEFAULT_CERT_IN_CB;
3741 config->wpa_rsc_relaxation = DEFAULT_WPA_RSC_RELAXATION;
3744 config->mbo_cell_capa = DEFAULT_MBO_CELL_CAPA;
3748 config->ctrl_interface = os_strdup(ctrl_interface);
3750 config->driver_param = os_strdup(driver_param);
3751 config->gas_rand_addr_lifetime = DEFAULT_RAND_ADDR_LIFETIME;
3753 return config;
3760 * @config: Configuration data from wpa_config_read()
3762 void wpa_config_debug_dump_networks(struct wpa_config *config)
3767 for (prio = 0; prio < config->num_prio; prio++) {
3768 ssid = config->pssid[prio];
3785 struct wpa_config *config, int line, const char *value);
3786 int (*get)(const char *name, struct wpa_config *config, long offset,
3794 struct wpa_config *config, int line,
3800 dst = (int *) (((u8 *) config) + (long) data->param1);
3832 struct wpa_config *config, int line,
3863 dst = (char **) (((u8 *) config) + (long) data->param1);
3873 struct wpa_config *config, int line,
3887 res = wpa_global_config_parse_str(data, config, line, tmp);
3894 struct wpa_config *config, int line,
3903 dst = (struct wpabuf **) (((u8 *) config) + (long) data->param1);
3913 struct wpa_config *config, int line,
3925 os_free(config->freq_list);
3926 config->freq_list = freqs;
3933 struct wpa_config *config, int line,
3944 dst = (u32 *) (((u8 *) config) + (long) data->param1);
3955 struct wpa_config *config, int line,
3962 config->country[0] = pos[0];
3963 config->country[1] = pos[1];
3965 config->country[0], config->country[1]);
3971 const struct global_parse_data *data, struct wpa_config *config,
3993 struct wpa_config *config, int line,
3997 if (uuid_str2bin(pos, config->uuid)) {
4001 uuid_bin2str(config->uuid, buf, sizeof(buf));
4009 struct wpa_config *config, int line, const char *pos)
4011 return wps_dev_type_str2bin(pos, config->device_type);
4016 struct wpa_config *config, int line,
4019 if (hexstr2bin(pos, config->os_version, 4)) {
4024 WPA_GET_BE32(config->os_version));
4031 struct wpa_config *config, int line, const char *pos)
4054 wpabuf_free(config->wps_vendor_ext_m1);
4055 config->wps_vendor_ext_m1 = tmp;
4070 struct wpa_config *config, int line, const char *pos)
4074 if (config->num_sec_device_types >= MAX_SEC_DEVICE_TYPES) {
4080 idx = config->num_sec_device_types;
4082 if (wps_dev_type_str2bin(pos, config->sec_device_type[idx]))
4085 config->num_sec_device_types++;
4092 struct wpa_config *config, int line, const char *pos)
4124 os_free(config->p2p_pref_chan);
4125 config->p2p_pref_chan = pref;
4126 config->num_p2p_pref_chan = num;
4128 (u8 *) config->p2p_pref_chan,
4129 config->num_p2p_pref_chan * sizeof(struct p2p_channel));
4142 struct wpa_config *config, int line, const char *pos)
4146 ret = freq_range_list_parse(&config->p2p_no_go_freq, pos);
4153 config->p2p_no_go_freq.num);
4163 struct wpa_config *config, int line, const char *pos)
4165 if (hwaddr_aton2(pos, config->hessid) < 0) {
4177 struct wpa_config *config, int line, const char *pos)
4186 os_free(config->sae_groups);
4187 config->sae_groups = groups;
4195 struct wpa_config *config, int line, const char *pos)
4218 wpabuf_free(config->ap_vendor_elements);
4219 config->ap_vendor_elements = tmp;
4233 struct wpa_config *config, int line, const char *pos)
4236 os_free(config->ctrl_interface);
4237 config->ctrl_interface = NULL;
4243 static int wpa_config_get_int(const char *name, struct wpa_config *config,
4247 int *val = (int *) (((u8 *) config) + (long) offset);
4255 static int wpa_config_get_str(const char *name, struct wpa_config *config,
4259 char **val = (char **) (((u8 *) config) + (long) offset);
4277 static int wpa_config_get_ipv4(const char *name, struct wpa_config *config,
4281 void *val = ((u8 *) config) + (long) offset;
4476 int wpa_config_dump_values(struct wpa_config *config, char *buf, size_t buflen)
4488 tmp = field->get(field->name, config, (long) field->param1,
4500 int wpa_config_get_value(const char *name, struct wpa_config *config,
4512 return field->get(name, config, (long) field->param1,
4537 int wpa_config_process_global(struct wpa_config *config, char *pos, int line)
4549 if (field->parser(field, config, line, pos + flen + 1)) {
4555 config->wps_nfc_pw_from_config = 1;
4556 config->changed_parameters |= field->changed_flag;
4571 if (hostapd_config_wmm_ac(config->wmm_ac_params, pos,