Lines Matching refs:config
247 static int wpa_config_process_blob(struct wpa_config *config, FILE *f, in wpa_config_process_blob() argument
267 wpa_config_set_blob(config, blob); in wpa_config_process_blob()
276 struct wpa_config *config, int line, const char *value);
282 struct wpa_config *config, int line, in wpa_config_parse_int() argument
286 dst = (int *) (((u8 *) config) + (long) data->param1); in wpa_config_parse_int()
311 struct wpa_config *config, int line, in wpa_config_parse_str() argument
336 dst = (char **) (((u8 *) config) + (long) data->param1); in wpa_config_parse_str()
346 struct wpa_config *config, int line, in wpa_config_process_country() argument
353 config->country[0] = pos[0]; in wpa_config_process_country()
354 config->country[1] = pos[1]; in wpa_config_process_country()
356 config->country[0], config->country[1]); in wpa_config_process_country()
362 const struct global_parse_data *data, struct wpa_config *config, in wpa_config_process_load_dynamic_eap() argument
384 struct wpa_config *config, int line, in wpa_config_process_uuid() argument
388 if (uuid_str2bin(pos, config->uuid)) { in wpa_config_process_uuid()
392 uuid_bin2str(config->uuid, buf, sizeof(buf)); in wpa_config_process_uuid()
399 struct wpa_config *config, int line, in wpa_config_process_os_version() argument
402 if (hexstr2bin(pos, config->os_version, 4)) { in wpa_config_process_os_version()
407 WPA_GET_BE32(config->os_version)); in wpa_config_process_os_version()
474 static int wpa_config_process_global(struct wpa_config *config, char *pos, in wpa_config_process_global() argument
487 if (field->parser(field, config, line, pos + flen + 1)) { in wpa_config_process_global()
510 struct wpa_config *config; in wpa_config_read() local
513 config = wpa_config_alloc_empty(NULL, NULL); in wpa_config_read()
514 if (config == NULL) in wpa_config_read()
519 os_free(config); in wpa_config_read()
540 if (wpa_config_add_prio_network(config, ssid)) { in wpa_config_read()
549 if (wpa_config_process_blob(config, f, &line, pos + 12) in wpa_config_read()
555 } else if (wpa_config_process_global(config, pos, line) < 0) { in wpa_config_read()
565 config->ssid = head; in wpa_config_read()
566 wpa_config_debug_dump_networks(config); in wpa_config_read()
570 wpa_config_free(config); in wpa_config_read()
571 config = NULL; in wpa_config_read()
576 return config; in wpa_config_read()
829 static void wpa_config_write_global(FILE *f, struct wpa_config *config) in wpa_config_write_global() argument
832 if (config->ctrl_interface) in wpa_config_write_global()
833 fprintf(f, "ctrl_interface=%s\n", config->ctrl_interface); in wpa_config_write_global()
834 if (config->ctrl_interface_group) in wpa_config_write_global()
836 config->ctrl_interface_group); in wpa_config_write_global()
838 if (config->eapol_version != DEFAULT_EAPOL_VERSION) in wpa_config_write_global()
839 fprintf(f, "eapol_version=%d\n", config->eapol_version); in wpa_config_write_global()
840 if (config->ap_scan != DEFAULT_AP_SCAN) in wpa_config_write_global()
841 fprintf(f, "ap_scan=%d\n", config->ap_scan); in wpa_config_write_global()
842 if (config->fast_reauth != DEFAULT_FAST_REAUTH) in wpa_config_write_global()
843 fprintf(f, "fast_reauth=%d\n", config->fast_reauth); in wpa_config_write_global()
845 if (config->opensc_engine_path) in wpa_config_write_global()
847 config->opensc_engine_path); in wpa_config_write_global()
848 if (config->pkcs11_engine_path) in wpa_config_write_global()
850 config->pkcs11_engine_path); in wpa_config_write_global()
851 if (config->pkcs11_module_path) in wpa_config_write_global()
853 config->pkcs11_module_path); in wpa_config_write_global()
855 if (config->driver_param) in wpa_config_write_global()
856 fprintf(f, "driver_param=%s\n", config->driver_param); in wpa_config_write_global()
857 if (config->dot11RSNAConfigPMKLifetime) in wpa_config_write_global()
859 config->dot11RSNAConfigPMKLifetime); in wpa_config_write_global()
860 if (config->dot11RSNAConfigPMKReauthThreshold) in wpa_config_write_global()
862 config->dot11RSNAConfigPMKReauthThreshold); in wpa_config_write_global()
863 if (config->dot11RSNAConfigSATimeout) in wpa_config_write_global()
865 config->dot11RSNAConfigSATimeout); in wpa_config_write_global()
866 if (config->update_config) in wpa_config_write_global()
867 fprintf(f, "update_config=%d\n", config->update_config); in wpa_config_write_global()
869 if (!is_nil_uuid(config->uuid)) { in wpa_config_write_global()
871 uuid_bin2str(config->uuid, buf, sizeof(buf)); in wpa_config_write_global()
874 if (config->device_name) in wpa_config_write_global()
875 fprintf(f, "device_name=%s\n", config->device_name); in wpa_config_write_global()
876 if (config->manufacturer) in wpa_config_write_global()
877 fprintf(f, "manufacturer=%s\n", config->manufacturer); in wpa_config_write_global()
878 if (config->model_name) in wpa_config_write_global()
879 fprintf(f, "model_name=%s\n", config->model_name); in wpa_config_write_global()
880 if (config->model_number) in wpa_config_write_global()
881 fprintf(f, "model_number=%s\n", config->model_number); in wpa_config_write_global()
882 if (config->serial_number) in wpa_config_write_global()
883 fprintf(f, "serial_number=%s\n", config->serial_number); in wpa_config_write_global()
884 if (config->device_type) in wpa_config_write_global()
885 fprintf(f, "device_type=%s\n", config->device_type); in wpa_config_write_global()
886 if (WPA_GET_BE32(config->os_version)) in wpa_config_write_global()
888 WPA_GET_BE32(config->os_version)); in wpa_config_write_global()
889 if (config->wps_cred_processing) in wpa_config_write_global()
891 config->wps_cred_processing); in wpa_config_write_global()
893 if (config->country[0] && config->country[1]) { in wpa_config_write_global()
895 config->country[0], config->country[1]); in wpa_config_write_global()
902 int wpa_config_write(const char *name, struct wpa_config *config) in wpa_config_write() argument
920 wpa_config_write_global(f, config); in wpa_config_write()
922 for (ssid = config->ssid; ssid; ssid = ssid->next) { in wpa_config_write()
931 for (blob = config->blobs; blob; blob = blob->next) { in wpa_config_write()