• Home
  • Raw
  • Download

Lines Matching refs:config

340 static int wpa_config_process_blob(struct wpa_config *config, FILE *f,  in wpa_config_process_blob()  argument
360 wpa_config_set_blob(config, blob); in wpa_config_process_blob()
373 struct wpa_config *config; in wpa_config_read() local
380 config = cfgp; in wpa_config_read()
382 config = wpa_config_alloc_empty(NULL, NULL); in wpa_config_read()
383 if (config == NULL) { in wpa_config_read()
388 tail = head = config->ssid; in wpa_config_read()
391 cred_tail = cred_head = config->cred; in wpa_config_read()
400 os_free(config); in wpa_config_read()
419 if (wpa_config_add_prio_network(config, ssid)) { in wpa_config_read()
442 if (wpa_config_process_blob(config, f, &line, pos + 12) in wpa_config_read()
450 } else if (wpa_config_process_global(config, pos, line) < 0) { in wpa_config_read()
460 config->ssid = head; in wpa_config_read()
461 wpa_config_debug_dump_networks(config); in wpa_config_read()
462 config->cred = cred_head; in wpa_config_read()
466 wpa_config_free(config); in wpa_config_read()
467 config = NULL; in wpa_config_read()
472 return config; in wpa_config_read()
1033 static void wpa_config_write_global(FILE *f, struct wpa_config *config) in wpa_config_write_global() argument
1036 if (config->ctrl_interface) in wpa_config_write_global()
1037 fprintf(f, "ctrl_interface=%s\n", config->ctrl_interface); in wpa_config_write_global()
1038 if (config->ctrl_interface_group) in wpa_config_write_global()
1040 config->ctrl_interface_group); in wpa_config_write_global()
1042 if (config->eapol_version != DEFAULT_EAPOL_VERSION) in wpa_config_write_global()
1043 fprintf(f, "eapol_version=%d\n", config->eapol_version); in wpa_config_write_global()
1044 if (config->ap_scan != DEFAULT_AP_SCAN) in wpa_config_write_global()
1045 fprintf(f, "ap_scan=%d\n", config->ap_scan); in wpa_config_write_global()
1046 if (config->disable_scan_offload) in wpa_config_write_global()
1048 config->disable_scan_offload); in wpa_config_write_global()
1049 if (config->fast_reauth != DEFAULT_FAST_REAUTH) in wpa_config_write_global()
1050 fprintf(f, "fast_reauth=%d\n", config->fast_reauth); in wpa_config_write_global()
1051 if (config->opensc_engine_path) in wpa_config_write_global()
1053 config->opensc_engine_path); in wpa_config_write_global()
1054 if (config->pkcs11_engine_path) in wpa_config_write_global()
1056 config->pkcs11_engine_path); in wpa_config_write_global()
1057 if (config->pkcs11_module_path) in wpa_config_write_global()
1059 config->pkcs11_module_path); in wpa_config_write_global()
1060 if (config->openssl_ciphers) in wpa_config_write_global()
1061 fprintf(f, "openssl_ciphers=%s\n", config->openssl_ciphers); in wpa_config_write_global()
1062 if (config->pcsc_reader) in wpa_config_write_global()
1063 fprintf(f, "pcsc_reader=%s\n", config->pcsc_reader); in wpa_config_write_global()
1064 if (config->pcsc_pin) in wpa_config_write_global()
1065 fprintf(f, "pcsc_pin=%s\n", config->pcsc_pin); in wpa_config_write_global()
1066 if (config->driver_param) in wpa_config_write_global()
1067 fprintf(f, "driver_param=%s\n", config->driver_param); in wpa_config_write_global()
1068 if (config->dot11RSNAConfigPMKLifetime) in wpa_config_write_global()
1070 config->dot11RSNAConfigPMKLifetime); in wpa_config_write_global()
1071 if (config->dot11RSNAConfigPMKReauthThreshold) in wpa_config_write_global()
1073 config->dot11RSNAConfigPMKReauthThreshold); in wpa_config_write_global()
1074 if (config->dot11RSNAConfigSATimeout) in wpa_config_write_global()
1076 config->dot11RSNAConfigSATimeout); in wpa_config_write_global()
1077 if (config->update_config) in wpa_config_write_global()
1078 fprintf(f, "update_config=%d\n", config->update_config); in wpa_config_write_global()
1080 if (!is_nil_uuid(config->uuid)) { in wpa_config_write_global()
1082 uuid_bin2str(config->uuid, buf, sizeof(buf)); in wpa_config_write_global()
1085 if (config->device_name) in wpa_config_write_global()
1086 fprintf(f, "device_name=%s\n", config->device_name); in wpa_config_write_global()
1087 if (config->manufacturer) in wpa_config_write_global()
1088 fprintf(f, "manufacturer=%s\n", config->manufacturer); in wpa_config_write_global()
1089 if (config->model_name) in wpa_config_write_global()
1090 fprintf(f, "model_name=%s\n", config->model_name); in wpa_config_write_global()
1091 if (config->model_number) in wpa_config_write_global()
1092 fprintf(f, "model_number=%s\n", config->model_number); in wpa_config_write_global()
1093 if (config->serial_number) in wpa_config_write_global()
1094 fprintf(f, "serial_number=%s\n", config->serial_number); in wpa_config_write_global()
1097 buf = wps_dev_type_bin2str(config->device_type, in wpa_config_write_global()
1102 if (WPA_GET_BE32(config->os_version)) in wpa_config_write_global()
1104 WPA_GET_BE32(config->os_version)); in wpa_config_write_global()
1105 if (config->config_methods) in wpa_config_write_global()
1106 fprintf(f, "config_methods=%s\n", config->config_methods); in wpa_config_write_global()
1107 if (config->wps_cred_processing) in wpa_config_write_global()
1109 config->wps_cred_processing); in wpa_config_write_global()
1110 if (config->wps_vendor_ext_m1) { in wpa_config_write_global()
1111 int i, len = wpabuf_len(config->wps_vendor_ext_m1); in wpa_config_write_global()
1112 const u8 *p = wpabuf_head_u8(config->wps_vendor_ext_m1); in wpa_config_write_global()
1126 for (i = 0; i < config->num_sec_device_types; i++) { in wpa_config_write_global()
1127 buf = wps_dev_type_bin2str(config->sec_device_type[i], in wpa_config_write_global()
1133 if (config->p2p_listen_reg_class) in wpa_config_write_global()
1135 config->p2p_listen_reg_class); in wpa_config_write_global()
1136 if (config->p2p_listen_channel) in wpa_config_write_global()
1138 config->p2p_listen_channel); in wpa_config_write_global()
1139 if (config->p2p_oper_reg_class) in wpa_config_write_global()
1141 config->p2p_oper_reg_class); in wpa_config_write_global()
1142 if (config->p2p_oper_channel) in wpa_config_write_global()
1143 fprintf(f, "p2p_oper_channel=%d\n", config->p2p_oper_channel); in wpa_config_write_global()
1144 if (config->p2p_go_intent != DEFAULT_P2P_GO_INTENT) in wpa_config_write_global()
1145 fprintf(f, "p2p_go_intent=%d\n", config->p2p_go_intent); in wpa_config_write_global()
1146 if (config->p2p_ssid_postfix) in wpa_config_write_global()
1147 fprintf(f, "p2p_ssid_postfix=%s\n", config->p2p_ssid_postfix); in wpa_config_write_global()
1148 if (config->persistent_reconnect) in wpa_config_write_global()
1150 config->persistent_reconnect); in wpa_config_write_global()
1151 if (config->p2p_intra_bss != DEFAULT_P2P_INTRA_BSS) in wpa_config_write_global()
1152 fprintf(f, "p2p_intra_bss=%d\n", config->p2p_intra_bss); in wpa_config_write_global()
1153 if (config->p2p_group_idle) in wpa_config_write_global()
1154 fprintf(f, "p2p_group_idle=%d\n", config->p2p_group_idle); in wpa_config_write_global()
1155 if (config->p2p_passphrase_len) in wpa_config_write_global()
1157 config->p2p_passphrase_len); in wpa_config_write_global()
1158 if (config->p2p_pref_chan) { in wpa_config_write_global()
1161 for (i = 0; i < config->num_p2p_pref_chan; i++) { in wpa_config_write_global()
1163 config->p2p_pref_chan[i].op_class, in wpa_config_write_global()
1164 config->p2p_pref_chan[i].chan); in wpa_config_write_global()
1168 if (config->p2p_no_go_freq.num) { in wpa_config_write_global()
1169 char *val = freq_range_list_str(&config->p2p_no_go_freq); in wpa_config_write_global()
1175 if (config->p2p_add_cli_chan) in wpa_config_write_global()
1176 fprintf(f, "p2p_add_cli_chan=%d\n", config->p2p_add_cli_chan); in wpa_config_write_global()
1177 if (config->p2p_optimize_listen_chan != in wpa_config_write_global()
1180 config->p2p_optimize_listen_chan); in wpa_config_write_global()
1181 if (config->p2p_go_ht40) in wpa_config_write_global()
1182 fprintf(f, "p2p_go_ht40=%d\n", config->p2p_go_ht40); in wpa_config_write_global()
1183 if (config->p2p_go_vht) in wpa_config_write_global()
1184 fprintf(f, "p2p_go_vht=%d\n", config->p2p_go_vht); in wpa_config_write_global()
1185 if (config->p2p_go_ctwindow != DEFAULT_P2P_GO_CTWINDOW) in wpa_config_write_global()
1186 fprintf(f, "p2p_go_ctwindow=%d\n", config->p2p_go_ctwindow); in wpa_config_write_global()
1187 if (config->p2p_disabled) in wpa_config_write_global()
1188 fprintf(f, "p2p_disabled=%d\n", config->p2p_disabled); in wpa_config_write_global()
1189 if (config->p2p_no_group_iface) in wpa_config_write_global()
1191 config->p2p_no_group_iface); in wpa_config_write_global()
1192 if (config->p2p_ignore_shared_freq) in wpa_config_write_global()
1194 config->p2p_ignore_shared_freq); in wpa_config_write_global()
1195 if (config->p2p_cli_probe) in wpa_config_write_global()
1196 fprintf(f, "p2p_cli_probe=%d\n", config->p2p_cli_probe); in wpa_config_write_global()
1197 if (config->p2p_go_freq_change_policy != DEFAULT_P2P_GO_FREQ_MOVE) in wpa_config_write_global()
1199 config->p2p_go_freq_change_policy); in wpa_config_write_global()
1200 if (WPA_GET_BE32(config->ip_addr_go)) in wpa_config_write_global()
1202 config->ip_addr_go[0], config->ip_addr_go[1], in wpa_config_write_global()
1203 config->ip_addr_go[2], config->ip_addr_go[3]); in wpa_config_write_global()
1204 if (WPA_GET_BE32(config->ip_addr_mask)) in wpa_config_write_global()
1206 config->ip_addr_mask[0], config->ip_addr_mask[1], in wpa_config_write_global()
1207 config->ip_addr_mask[2], config->ip_addr_mask[3]); in wpa_config_write_global()
1208 if (WPA_GET_BE32(config->ip_addr_start)) in wpa_config_write_global()
1210 config->ip_addr_start[0], config->ip_addr_start[1], in wpa_config_write_global()
1211 config->ip_addr_start[2], config->ip_addr_start[3]); in wpa_config_write_global()
1212 if (WPA_GET_BE32(config->ip_addr_end)) in wpa_config_write_global()
1214 config->ip_addr_end[0], config->ip_addr_end[1], in wpa_config_write_global()
1215 config->ip_addr_end[2], config->ip_addr_end[3]); in wpa_config_write_global()
1217 if (config->country[0] && config->country[1]) { in wpa_config_write_global()
1219 config->country[0], config->country[1]); in wpa_config_write_global()
1221 if (config->bss_max_count != DEFAULT_BSS_MAX_COUNT) in wpa_config_write_global()
1222 fprintf(f, "bss_max_count=%u\n", config->bss_max_count); in wpa_config_write_global()
1223 if (config->bss_expiration_age != DEFAULT_BSS_EXPIRATION_AGE) in wpa_config_write_global()
1225 config->bss_expiration_age); in wpa_config_write_global()
1226 if (config->bss_expiration_scan_count != in wpa_config_write_global()
1229 config->bss_expiration_scan_count); in wpa_config_write_global()
1230 if (config->filter_ssids) in wpa_config_write_global()
1231 fprintf(f, "filter_ssids=%d\n", config->filter_ssids); in wpa_config_write_global()
1232 if (config->filter_rssi) in wpa_config_write_global()
1233 fprintf(f, "filter_rssi=%d\n", config->filter_rssi); in wpa_config_write_global()
1234 if (config->max_num_sta != DEFAULT_MAX_NUM_STA) in wpa_config_write_global()
1235 fprintf(f, "max_num_sta=%u\n", config->max_num_sta); in wpa_config_write_global()
1236 if (config->disassoc_low_ack) in wpa_config_write_global()
1237 fprintf(f, "disassoc_low_ack=%d\n", config->disassoc_low_ack); in wpa_config_write_global()
1239 if (config->hs20) in wpa_config_write_global()
1243 if (config->interworking) in wpa_config_write_global()
1244 fprintf(f, "interworking=%d\n", config->interworking); in wpa_config_write_global()
1245 if (!is_zero_ether_addr(config->hessid)) in wpa_config_write_global()
1246 fprintf(f, "hessid=" MACSTR "\n", MAC2STR(config->hessid)); in wpa_config_write_global()
1247 if (config->access_network_type != DEFAULT_ACCESS_NETWORK_TYPE) in wpa_config_write_global()
1249 config->access_network_type); in wpa_config_write_global()
1251 if (config->pbc_in_m1) in wpa_config_write_global()
1252 fprintf(f, "pbc_in_m1=%d\n", config->pbc_in_m1); in wpa_config_write_global()
1253 if (config->wps_nfc_pw_from_config) { in wpa_config_write_global()
1254 if (config->wps_nfc_dev_pw_id) in wpa_config_write_global()
1256 config->wps_nfc_dev_pw_id); in wpa_config_write_global()
1258 config->wps_nfc_dh_pubkey); in wpa_config_write_global()
1260 config->wps_nfc_dh_privkey); in wpa_config_write_global()
1261 write_global_bin(f, "wps_nfc_dev_pw", config->wps_nfc_dev_pw); in wpa_config_write_global()
1264 if (config->ext_password_backend) in wpa_config_write_global()
1266 config->ext_password_backend); in wpa_config_write_global()
1267 if (config->p2p_go_max_inactivity != DEFAULT_P2P_GO_MAX_INACTIVITY) in wpa_config_write_global()
1269 config->p2p_go_max_inactivity); in wpa_config_write_global()
1270 if (config->auto_interworking) in wpa_config_write_global()
1272 config->auto_interworking); in wpa_config_write_global()
1273 if (config->okc) in wpa_config_write_global()
1274 fprintf(f, "okc=%d\n", config->okc); in wpa_config_write_global()
1275 if (config->pmf) in wpa_config_write_global()
1276 fprintf(f, "pmf=%d\n", config->pmf); in wpa_config_write_global()
1277 if (config->dtim_period) in wpa_config_write_global()
1278 fprintf(f, "dtim_period=%d\n", config->dtim_period); in wpa_config_write_global()
1279 if (config->beacon_int) in wpa_config_write_global()
1280 fprintf(f, "beacon_int=%d\n", config->beacon_int); in wpa_config_write_global()
1282 if (config->sae_groups) { in wpa_config_write_global()
1285 for (i = 0; config->sae_groups[i] > 0; i++) { in wpa_config_write_global()
1287 config->sae_groups[i]); in wpa_config_write_global()
1292 if (config->ap_vendor_elements) { in wpa_config_write_global()
1293 int i, len = wpabuf_len(config->ap_vendor_elements); in wpa_config_write_global()
1294 const u8 *p = wpabuf_head_u8(config->ap_vendor_elements); in wpa_config_write_global()
1303 if (config->ignore_old_scan_res) in wpa_config_write_global()
1305 config->ignore_old_scan_res); in wpa_config_write_global()
1307 if (config->freq_list && config->freq_list[0]) { in wpa_config_write_global()
1310 for (i = 0; config->freq_list[i]; i++) { in wpa_config_write_global()
1312 config->freq_list[i]); in wpa_config_write_global()
1316 if (config->scan_cur_freq != DEFAULT_SCAN_CUR_FREQ) in wpa_config_write_global()
1317 fprintf(f, "scan_cur_freq=%d\n", config->scan_cur_freq); in wpa_config_write_global()
1319 if (config->sched_scan_interval) in wpa_config_write_global()
1321 config->sched_scan_interval); in wpa_config_write_global()
1323 if (config->external_sim) in wpa_config_write_global()
1324 fprintf(f, "external_sim=%d\n", config->external_sim); in wpa_config_write_global()
1326 if (config->tdls_external_control) in wpa_config_write_global()
1328 config->tdls_external_control); in wpa_config_write_global()
1330 if (config->wowlan_triggers) in wpa_config_write_global()
1332 config->wowlan_triggers); in wpa_config_write_global()
1334 if (config->bgscan) in wpa_config_write_global()
1335 fprintf(f, "bgscan=\"%s\"\n", config->bgscan); in wpa_config_write_global()
1337 if (config->autoscan) in wpa_config_write_global()
1338 fprintf(f, "autoscan=%s\n", config->autoscan); in wpa_config_write_global()
1340 if (config->p2p_search_delay != DEFAULT_P2P_SEARCH_DELAY) in wpa_config_write_global()
1342 config->p2p_search_delay); in wpa_config_write_global()
1344 if (config->mac_addr) in wpa_config_write_global()
1345 fprintf(f, "mac_addr=%d\n", config->mac_addr); in wpa_config_write_global()
1347 if (config->rand_addr_lifetime != DEFAULT_RAND_ADDR_LIFETIME) in wpa_config_write_global()
1349 config->rand_addr_lifetime); in wpa_config_write_global()
1351 if (config->preassoc_mac_addr) in wpa_config_write_global()
1352 fprintf(f, "preassoc_mac_addr=%d\n", config->preassoc_mac_addr); in wpa_config_write_global()
1354 if (config->key_mgmt_offload != DEFAULT_KEY_MGMT_OFFLOAD) in wpa_config_write_global()
1355 fprintf(f, "key_mgmt_offload=%d\n", config->key_mgmt_offload); in wpa_config_write_global()
1357 if (config->user_mpm != DEFAULT_USER_MPM) in wpa_config_write_global()
1358 fprintf(f, "user_mpm=%d\n", config->user_mpm); in wpa_config_write_global()
1360 if (config->max_peer_links != DEFAULT_MAX_PEER_LINKS) in wpa_config_write_global()
1361 fprintf(f, "max_peer_links=%d\n", config->max_peer_links); in wpa_config_write_global()
1363 if (config->cert_in_cb != DEFAULT_CERT_IN_CB) in wpa_config_write_global()
1364 fprintf(f, "cert_in_cb=%d\n", config->cert_in_cb); in wpa_config_write_global()
1366 if (config->mesh_max_inactivity != DEFAULT_MESH_MAX_INACTIVITY) in wpa_config_write_global()
1368 config->mesh_max_inactivity); in wpa_config_write_global()
1370 if (config->dot11RSNASAERetransPeriod != in wpa_config_write_global()
1373 config->dot11RSNASAERetransPeriod); in wpa_config_write_global()
1375 if (config->passive_scan) in wpa_config_write_global()
1376 fprintf(f, "passive_scan=%d\n", config->passive_scan); in wpa_config_write_global()
1378 if (config->reassoc_same_bss_optim) in wpa_config_write_global()
1380 config->reassoc_same_bss_optim); in wpa_config_write_global()
1382 if (config->wps_priority) in wpa_config_write_global()
1383 fprintf(f, "wps_priority=%d\n", config->wps_priority); in wpa_config_write_global()
1385 if (config->wpa_rsc_relaxation != DEFAULT_WPA_RSC_RELAXATION) in wpa_config_write_global()
1387 config->wpa_rsc_relaxation); in wpa_config_write_global()
1389 if (config->sched_scan_plans) in wpa_config_write_global()
1390 fprintf(f, "sched_scan_plans=%s\n", config->sched_scan_plans); in wpa_config_write_global()
1393 if (config->non_pref_chan) in wpa_config_write_global()
1394 fprintf(f, "non_pref_chan=%s\n", config->non_pref_chan); in wpa_config_write_global()
1395 if (config->mbo_cell_capa != DEFAULT_MBO_CELL_CAPA) in wpa_config_write_global()
1396 fprintf(f, "mbo_cell_capa=%u\n", config->mbo_cell_capa); in wpa_config_write_global()
1399 if (config->gas_address3) in wpa_config_write_global()
1400 fprintf(f, "gas_address3=%d\n", config->gas_address3); in wpa_config_write_global()
1402 if (config->ftm_responder) in wpa_config_write_global()
1403 fprintf(f, "ftm_responder=%d\n", config->ftm_responder); in wpa_config_write_global()
1404 if (config->ftm_initiator) in wpa_config_write_global()
1405 fprintf(f, "ftm_initiator=%d\n", config->ftm_initiator); in wpa_config_write_global()
1407 if (config->osu_dir) in wpa_config_write_global()
1408 fprintf(f, "osu_dir=%s\n", config->osu_dir); in wpa_config_write_global()
1410 if (config->fst_group_id) in wpa_config_write_global()
1411 fprintf(f, "fst_group_id=%s\n", config->fst_group_id); in wpa_config_write_global()
1412 if (config->fst_priority) in wpa_config_write_global()
1413 fprintf(f, "fst_priority=%d\n", config->fst_priority); in wpa_config_write_global()
1414 if (config->fst_llt) in wpa_config_write_global()
1415 fprintf(f, "fst_llt=%d\n", config->fst_llt); in wpa_config_write_global()
1417 if (config->gas_rand_addr_lifetime != DEFAULT_RAND_ADDR_LIFETIME) in wpa_config_write_global()
1419 config->gas_rand_addr_lifetime); in wpa_config_write_global()
1420 if (config->gas_rand_mac_addr) in wpa_config_write_global()
1421 fprintf(f, "gas_rand_mac_addr=%d\n", config->gas_rand_mac_addr); in wpa_config_write_global()
1428 int wpa_config_write(const char *name, struct wpa_config *config) in wpa_config_write() argument
1456 wpa_config_write_global(f, config); in wpa_config_write()
1458 for (cred = config->cred; cred; cred = cred->next) { in wpa_config_write()
1466 for (ssid = config->ssid; ssid; ssid = ssid->next) { in wpa_config_write()
1478 for (blob = config->blobs; blob; blob = blob->next) { in wpa_config_write()