Lines Matching refs:pos

38 	char buf[128], *pos, *pos2;
53 pos = buf;
54 while (*pos != '\0') {
55 if (*pos == '\n') {
56 *pos = '\0';
59 pos++;
66 pos = buf + 1;
68 vlan_id = strtol(buf, &pos, 10);
69 if (buf == pos || vlan_id < 1 ||
78 while (*pos == ' ' || *pos == '\t')
79 pos++;
80 pos2 = pos;
84 if (*pos == '\0' || os_strlen(pos) > IFNAMSIZ) {
102 os_strlcpy(vlan->ifname, pos, sizeof(vlan->ifname));
126 char buf[128], *pos;
145 pos = buf;
146 while (*pos != '\0') {
147 if (*pos == '\n') {
148 *pos = '\0';
151 pos++;
155 pos = buf;
158 pos++;
161 if (hwaddr_aton(pos, addr)) {
163 "line %d in '%s'", pos, line, fname);
182 pos = buf;
183 while (*pos != '\0' && *pos != ' ' && *pos != '\t')
184 pos++;
185 while (*pos == ' ' || *pos == '\t')
186 pos++;
187 if (*pos != '\0')
188 vlan_id = atoi(pos);
220 char buf[512], *pos, *start, *pos2;
248 pos = buf;
249 while (*pos != '\0') {
250 if (*pos == '\n') {
251 *pos = '\0';
254 pos++;
297 pos = buf;
299 pos = buf + 1;
300 start = pos;
301 while (*pos != '"' && *pos != '\0')
302 pos++;
303 if (*pos == '\0') {
310 user->identity = os_malloc(pos - start);
316 os_memcpy(user->identity, start, pos - start);
317 user->identity_len = pos - start;
319 if (pos[0] == '"' && pos[1] == '*') {
321 pos++;
324 pos++;
325 while (*pos == ' ' || *pos == '\t')
326 pos++;
328 if (*pos == '\0') {
334 start = pos;
335 while (*pos != ' ' && *pos != '\t' && *pos != '\0')
336 pos++;
337 if (*pos == '\0') {
338 pos = NULL;
340 *pos = '\0';
341 pos++;
399 if (pos == NULL)
402 while (*pos == ' ' || *pos == '\t')
403 pos++;
404 if (*pos == '\0')
407 if (os_strncmp(pos, "[ver=0]", 7) == 0) {
412 if (os_strncmp(pos, "[ver=1]", 7) == 0) {
417 if (os_strncmp(pos, "[2]", 3) == 0) {
422 if (*pos == '"') {
423 pos++;
424 start = pos;
425 while (*pos != '"' && *pos != '\0')
426 pos++;
427 if (*pos == '\0') {
434 user->password = os_malloc(pos - start);
440 os_memcpy(user->password, start, pos - start);
441 user->password_len = pos - start;
443 pos++;
444 } else if (os_strncmp(pos, "hash:", 5) == 0) {
445 pos += 5;
446 pos2 = pos;
450 if (pos2 - pos != 32) {
461 if (hexstr2bin(pos, user->password, 16) < 0) {
468 pos = pos2;
470 pos2 = pos;
474 if ((pos2 - pos) & 1) {
479 user->password = os_malloc((pos2 - pos) / 2);
485 if (hexstr2bin(pos, user->password,
486 (pos2 - pos) / 2) < 0) {
491 user->password_len = (pos2 - pos) / 2;
492 pos = pos2;
495 while (*pos == ' ' || *pos == '\t')
496 pos++;
497 if (os_strncmp(pos, "[2]", 3) == 0) {
562 const char *pos;
573 pos = os_strchr(value, ':');
574 if (pos == NULL) {
584 pos++;
585 if (pos[0] == '\0' || pos[1] != ':') {
589 syntax = *pos++;
590 pos++;
594 attr->val = wpabuf_alloc_copy(pos, os_strlen(pos));
597 len = os_strlen(pos);
604 if (hexstr2bin(pos, wpabuf_put(attr->val, len), len) < 0) {
613 wpabuf_put_be32(attr->val, atoi(pos));
810 char *pos;
813 pos = val;
814 while (pos) {
815 pos = os_strchr(pos, ' ');
816 if (pos)
817 *pos++ = ',';
830 char *pos, *end;
835 pos = val;
837 while (*pos != '\0') {
838 if (*pos == ' ')
840 pos++;
846 pos = val;
848 while (*pos != '\0') {
849 end = os_strchr(pos, ' ');
853 list[count++] = atoi(pos);
856 pos = end + 1;
908 char *pos;
911 pos = os_strchr(value, '.');
913 if (pos) {
914 pos++;
915 if (*pos >= '0' && *pos <= '9')
916 d = *pos - '0';
943 const char *pos;
947 pos = name + 9;
948 if (os_strncmp(pos, "data", 4) == 0 &&
949 pos[4] >= '0' && pos[4] <= '9' && pos[5] == '_') {
950 num = pos[4] - '0';
951 pos += 6;
952 } else if (os_strncmp(pos, "after_beacon_", 13) == 0 ||
953 os_strncmp(pos, "beacon_", 7) == 0) {
957 wpa_printf(MSG_ERROR, "Unknown tx_queue name '%s'", pos);
969 if (os_strcmp(pos, "aifs") == 0) {
976 } else if (os_strcmp(pos, "cwmin") == 0) {
983 } else if (os_strcmp(pos, "cwmax") == 0) {
990 } else if (os_strcmp(pos, "burst") == 0) {
993 wpa_printf(MSG_ERROR, "Unknown tx_queue field '%s'", pos);
1005 char *pos, *next;
1012 pos = value;
1013 next = os_strchr(pos, ' ');
1016 if (next == NULL || hwaddr_aton(pos, r0kh->addr)) {
1017 wpa_printf(MSG_ERROR, "Invalid R0KH MAC address: '%s'", pos);
1022 pos = next;
1023 next = os_strchr(pos, ' ');
1026 if (next == NULL || next - pos > FT_R0KH_ID_MAX_LEN) {
1027 wpa_printf(MSG_ERROR, "Invalid R0KH-ID: '%s'", pos);
1031 r0kh->id_len = next - pos - 1;
1032 os_memcpy(r0kh->id, pos, r0kh->id_len);
1034 pos = next;
1035 if (hexstr2bin(pos, r0kh->key, sizeof(r0kh->key))) {
1036 wpa_printf(MSG_ERROR, "Invalid R0KH key: '%s'", pos);
1051 char *pos, *next;
1059 pos = value;
1060 next = os_strchr(pos, ' ');
1063 if (next == NULL || hwaddr_aton(pos, r1kh->addr)) {
1064 wpa_printf(MSG_ERROR, "Invalid R1KH MAC address: '%s'", pos);
1069 pos = next;
1070 next = os_strchr(pos, ' ');
1073 if (next == NULL || hwaddr_aton(pos, r1kh->id)) {
1074 wpa_printf(MSG_ERROR, "Invalid R1KH-ID: '%s'", pos);
1079 pos = next;
1080 if (hexstr2bin(pos, r1kh->key, sizeof(r1kh->key))) {
1081 wpa_printf(MSG_ERROR, "Invalid R1KH key: '%s'", pos);
1238 static int parse_roaming_consortium(struct hostapd_bss_config *bss, char *pos,
1241 size_t len = os_strlen(pos);
1247 hexstr2bin(pos, oi, len / 2)) {
1249 "'%s'", line, pos);
1271 unsigned int *count, char *pos)
1278 if (*pos == '"' || (*pos == 'P' && pos[1] == '"')) {
1279 str = wpa_config_parse_string(pos, &slen);
1282 pos = str;
1285 sep = os_strchr(pos, ':');
1290 clen = os_strlen(pos);
1307 os_memcpy(ls->lang, pos, clen);
1318 static int parse_venue_name(struct hostapd_bss_config *bss, char *pos,
1321 if (parse_lang_string(&bss->venue_name, &bss->venue_name_count, pos)) {
1323 line, pos);
1334 char *pos;
1340 for (pos = buf; *pos; pos++) {
1341 if ((*pos < '0' || *pos > '9') && *pos != ';' && *pos != ',')
1343 if (*pos == ';')
1361 pos = buf;
1362 while (pos && *pos) {
1366 mcc = pos;
1367 mnc = os_strchr(pos, ',');
1371 pos = os_strchr(mnc, ';');
1372 if (pos)
1373 *pos++ = '\0';
1410 char *pos, *end, *rpos;
1450 pos = buf;
1451 realm->encoding = atoi(pos);
1452 pos = os_strchr(pos, ',');
1453 if (pos == NULL)
1455 pos++;
1457 end = os_strchr(pos, ',');
1459 len = end - pos;
1462 len = os_strlen(pos);
1470 os_memcpy(realm->realm_buf, pos, len);
1473 pos = end + 1;
1475 pos = NULL;
1477 while (pos && *pos) {
1488 end = os_strchr(pos, ',');
1490 end = pos + os_strlen(pos);
1492 eap->eap_method = atoi(pos);
1494 pos = os_strchr(pos, '[');
1495 if (pos == NULL || pos > end)
1497 pos++;
1502 eap->auth_id[eap->num_auths] = atoi(pos);
1503 pos = os_strchr(pos, ':');
1504 if (pos == NULL || pos > end)
1506 pos++;
1507 eap->auth_val[eap->num_auths] = atoi(pos);
1508 pos = os_strchr(pos, ']');
1509 if (pos == NULL || pos > end)
1511 pos++;
1518 pos = end + 1;
1598 char *pos = buf;
1608 val = atoi(pos);
1616 pos = os_strchr(pos, ',');
1617 if (!pos)
1619 pos++;
1642 char *pos;
1654 pos = buf;
1655 conn_cap[0] = atoi(pos);
1656 pos = os_strchr(pos, ':');
1657 if (pos == NULL)
1659 pos++;
1660 WPA_PUT_LE16(conn_cap + 1, atoi(pos));
1661 pos = os_strchr(pos, ':');
1662 if (pos == NULL)
1664 pos++;
1665 conn_cap[3] = atoi(pos);
1676 char *pos;
1684 pos = buf;
1686 if (hexstr2bin(pos, wan_metrics, 1) < 0)
1688 pos += 2;
1689 if (*pos != ':')
1691 pos++;
1694 WPA_PUT_LE32(wan_metrics + 1, atoi(pos));
1695 pos = os_strchr(pos, ':');
1696 if (pos == NULL)
1698 pos++;
1701 WPA_PUT_LE32(wan_metrics + 5, atoi(pos));
1702 pos = os_strchr(pos, ':');
1703 if (pos == NULL)
1705 pos++;
1708 wan_metrics[9] = atoi(pos);
1709 pos = os_strchr(pos, ':');
1710 if (pos == NULL)
1712 pos++;
1715 wan_metrics[10] = atoi(pos);
1716 pos = os_strchr(pos, ':');
1717 if (pos == NULL)
1719 pos++;
1722 WPA_PUT_LE16(wan_metrics + 11, atoi(pos));
1738 char *pos, int line)
1741 &bss->hs20_oper_friendly_name_count, pos)) {
1743 "hs20_oper_friendly_name '%s'", line, pos);
1750 static int hs20_parse_icon(struct hostapd_bss_config *bss, char *pos)
1763 icon->width = atoi(pos);
1764 pos = os_strchr(pos, ':');
1765 if (pos == NULL)
1767 pos++;
1769 icon->height = atoi(pos);
1770 pos = os_strchr(pos, ':');
1771 if (pos == NULL)
1773 pos++;
1775 end = os_strchr(pos, ':');
1776 if (end == NULL || end - pos > 3)
1778 os_memcpy(icon->language, pos, end - pos);
1779 pos = end + 1;
1781 end = os_strchr(pos, ':');
1782 if (end == NULL || end - pos > 255)
1784 os_memcpy(icon->type, pos, end - pos);
1785 pos = end + 1;
1787 end = os_strchr(pos, ':');
1788 if (end == NULL || end - pos > 255)
1790 os_memcpy(icon->name, pos, end - pos);
1791 pos = end + 1;
1793 if (os_strlen(pos) > 255)
1795 os_memcpy(icon->file, pos, os_strlen(pos));
1804 char *pos, int line)
1809 str = wpa_config_parse_string(pos, &slen);
1811 wpa_printf(MSG_ERROR, "Line %d: Invalid SSID '%s'", line, pos);
1825 char *pos, int line)
1838 bss->last_osu->server_uri = os_strdup(pos);
1845 char *pos, int line)
1853 &bss->last_osu->friendly_name_count, pos)) {
1855 line, pos);
1864 char *pos, int line)
1872 bss->last_osu->osu_nai = os_strdup(pos);
1880 static int hs20_parse_osu_method_list(struct hostapd_bss_config *bss, char *pos,
1888 if (hostapd_parse_intlist(&bss->last_osu->method_list, pos)) {
1897 static int hs20_parse_osu_icon(struct hostapd_bss_config *bss, char *pos,
1912 p->icons[p->icons_count] = os_strdup(pos);
1922 char *pos, int line)
1930 &bss->last_osu->service_desc_count, pos)) {
1932 line, pos);
1944 char *pos)
1950 while (*pos) {
1956 bias[num].channel = atoi(pos);
1959 pos = os_strchr(pos, ':');
1960 if (!pos)
1962 pos++;
1963 bias[num].bias = strtod(pos, &end);
1964 if (end == pos || bias[num].bias < 0.0)
1966 pos = end;
1967 if (*pos != ' ' && *pos != '\0')
2034 const char *buf, char *pos, int line)
2037 os_strlcpy(conf->bss[0]->iface, pos,
2040 os_strlcpy(bss->bridge, pos, sizeof(bss->bridge));
2042 os_strlcpy(bss->vlan_bridge, pos, sizeof(bss->vlan_bridge));
2044 os_strlcpy(bss->wds_bridge, pos, sizeof(bss->wds_bridge));
2050 if (os_strcmp(pos, wpa_drivers[j]->name) == 0) {
2058 line, pos);
2064 conf->driver_params = os_strdup(pos);
2069 bss->logger_syslog_level = atoi(pos);
2071 bss->logger_stdout_level = atoi(pos);
2073 bss->logger_syslog = atoi(pos);
2075 bss->logger_stdout = atoi(pos);
2080 bss->ssid.ssid_len = os_strlen(pos);
2084 line, pos);
2087 os_memcpy(bss->ssid.ssid, pos, bss->ssid.ssid_len);
2091 char *str = wpa_config_parse_string(pos, &slen);
2094 line, pos);
2103 bss->ssid.utf8_ssid = atoi(pos) > 0;
2105 enum macaddr_acl acl = atoi(pos);
2116 if (hostapd_config_read_maclist(pos, &bss->accept_mac,
2119 line, pos);
2123 if (hostapd_config_read_maclist(pos, &bss->deny_mac,
2126 line, pos);
2130 bss->wds_sta = atoi(pos);
2132 bss->start_disabled = atoi(pos);
2134 bss->isolate = atoi(pos);
2136 bss->ap_max_inactivity = atoi(pos);
2138 bss->skip_inactivity_poll = atoi(pos);
2140 os_memcpy(conf->country, pos, 2);
2144 conf->ieee80211d = atoi(pos);
2146 conf->ieee80211h = atoi(pos);
2148 bss->ieee802_1x = atoi(pos);
2150 int eapol_version = atoi(pos);
2155 line, eapol_version, pos);
2162 bss->eap_server = atoi(pos);
2165 bss->eap_server = atoi(pos);
2167 if (hostapd_config_read_eap_user(pos, bss))
2171 bss->ca_cert = os_strdup(pos);
2174 bss->server_cert = os_strdup(pos);
2177 bss->private_key = os_strdup(pos);
2180 bss->private_key_passwd = os_strdup(pos);
2182 bss->check_crl = atoi(pos);
2184 bss->tls_session_lifetime = atoi(pos);
2187 bss->ocsp_stapling_response = os_strdup(pos);
2190 bss->ocsp_stapling_response_multi = os_strdup(pos);
2193 bss->dh_file = os_strdup(pos);
2196 bss->openssl_ciphers = os_strdup(pos);
2198 bss->fragment_size = atoi(pos);
2208 } else if (hexstr2bin(pos, bss->pac_opaque_encr_key, 16)) {
2214 size_t idlen = os_strlen(pos);
2223 hexstr2bin(pos, bss->eap_fast_a_id, idlen / 2)) {
2234 bss->eap_fast_a_id_info = os_strdup(pos);
2236 bss->eap_fast_prov = atoi(pos);
2238 bss->pac_key_lifetime = atoi(pos);
2240 bss->pac_key_refresh_time = atoi(pos);
2245 bss->eap_sim_db = os_strdup(pos);
2247 bss->eap_sim_db_timeout = atoi(pos);
2249 bss->eap_sim_aka_result_ind = atoi(pos);
2253 bss->tnc = atoi(pos);
2257 bss->pwd_group = atoi(pos);
2260 bss->eap_server_erp = atoi(pos);
2265 bss->eap_req_id_text = os_strdup(pos);
2281 bss->erp_send_reauth_start = atoi(pos);
2284 bss->erp_domain = os_strdup(pos);
2286 int val = atoi(pos);
2296 int val = atoi(pos);
2306 bss->wep_rekeying_period = atoi(pos);
2313 bss->eap_reauth_period = atoi(pos);
2320 bss->eapol_key_index_workaround = atoi(pos);
2324 os_strlcpy(bss->iapp_iface, pos, sizeof(bss->iapp_iface));
2327 if (hostapd_parse_ip_addr(pos, &bss->own_ip_addr)) {
2330 line, pos);
2335 bss->nas_identifier = os_strdup(pos);
2338 if (hostapd_parse_ip_addr(pos, &bss->radius->client_addr)) {
2341 line, pos);
2348 &bss->radius->num_auth_servers, pos, 1812,
2352 line, pos);
2357 if (hostapd_parse_ip_addr(pos,
2361 line, pos);
2366 bss->radius->auth_server->port = atoi(pos);
2369 int len = os_strlen(pos);
2377 bss->radius->auth_server->shared_secret = (u8 *) os_strdup(pos);
2382 &bss->radius->num_acct_servers, pos, 1813,
2386 line, pos);
2391 if (hostapd_parse_ip_addr(pos,
2395 line, pos);
2400 bss->radius->acct_server->port = atoi(pos);
2403 int len = os_strlen(pos);
2411 bss->radius->acct_server->shared_secret = (u8 *) os_strdup(pos);
2414 bss->radius->retry_primary_interval = atoi(pos);
2416 bss->acct_interim_interval = atoi(pos);
2418 bss->radius_request_cui = atoi(pos);
2421 attr = hostapd_parse_radius_attr(pos);
2437 attr = hostapd_parse_radius_attr(pos);
2452 bss->radius_das_port = atoi(pos);
2454 if (hostapd_parse_das_client(bss, pos) < 0) {
2460 bss->radius_das_time_window = atoi(pos);
2462 bss->radius_das_require_event_timestamp = atoi(pos);
2465 bss->radius_das_require_message_authenticator = atoi(pos);
2468 bss->auth_algs = atoi(pos);
2475 bss->max_num_sta = atoi(pos);
2483 bss->wpa = atoi(pos);
2485 bss->wpa_group_rekey = atoi(pos);
2487 bss->wpa_strict_rekey = atoi(pos);
2489 bss->wpa_gmk_rekey = atoi(pos);
2491 bss->wpa_ptk_rekey = atoi(pos);
2494 unsigned long val = strtoul(pos, &endp, 0);
2505 unsigned long val = strtoul(pos, &endp, 0);
2515 int len = os_strlen(pos);
2522 bss->ssid.wpa_passphrase = os_strdup(pos);
2532 if (hexstr2bin(pos, bss->ssid.wpa_psk->psk, PMK_LEN) ||
2533 pos[PMK_LEN * 2] != '\0') {
2535 line, pos);
2545 bss->ssid.wpa_psk_file = os_strdup(pos);
2552 bss->wpa_key_mgmt = hostapd_config_parse_key_mgmt(line, pos);
2556 bss->wpa_psk_radius = atoi(pos);
2566 bss->wpa_pairwise = hostapd_config_parse_cipher(line, pos);
2572 bss->wpa_pairwise, pos);
2576 bss->rsn_pairwise = hostapd_config_parse_cipher(line, pos);
2582 bss->rsn_pairwise, pos);
2587 bss->rsn_preauth = atoi(pos);
2590 bss->rsn_preauth_interfaces = os_strdup(pos);
2594 bss->peerkey = atoi(pos);
2598 if (os_strlen(pos) != 2 * MOBILITY_DOMAIN_ID_LEN ||
2599 hexstr2bin(pos, bss->mobility_domain,
2603 line, pos);
2607 if (os_strlen(pos) != 2 * FT_R1KH_ID_LEN ||
2608 hexstr2bin(pos, bss->r1_key_holder, FT_R1KH_ID_LEN) != 0) {
2611 line, pos);
2615 bss->r0_key_lifetime = atoi(pos);
2617 bss->reassociation_deadline = atoi(pos);
2619 if (add_r0kh(bss, pos) < 0) {
2621 line, pos);
2625 if (add_r1kh(bss, pos) < 0) {
2627 line, pos);
2631 bss->pmk_r1_push = atoi(pos);
2633 bss->ft_over_ds = atoi(pos);
2635 bss->ft_psk_generate_local = atoi(pos);
2640 bss->ctrl_interface = os_strdup(pos);
2645 const char *group = pos;
2671 bss->radius_server_clients = os_strdup(pos);
2673 bss->radius_server_auth_port = atoi(pos);
2675 bss->radius_server_acct_port = atoi(pos);
2677 bss->radius_server_ipv6 = atoi(pos);
2680 bss->use_pae_group_addr = atoi(pos);
2682 if (os_strcmp(pos, "a") == 0)
2684 else if (os_strcmp(pos, "b") == 0)
2686 else if (os_strcmp(pos, "g") == 0)
2688 else if (os_strcmp(pos, "ad") == 0)
2690 else if (os_strcmp(pos, "any") == 0)
2694 line, pos);
2698 if (os_strcmp(pos, "ad") == 0)
2700 else if (os_strcmp(pos, "a") == 0)
2702 else if (os_strcmp(pos, "g") == 0 ||
2703 os_strcmp(pos, "b") == 0)
2705 else if (os_strcmp(pos, "ag") == 0 ||
2706 os_strcmp(pos, "ga") == 0)
2711 line, pos);
2715 if (os_strcmp(pos, "acs_survey") == 0) {
2725 conf->channel = atoi(pos);
2729 if (hostapd_parse_chanlist(conf, pos)) {
2735 int val = atoi(pos);
2749 int val = atoi(pos);
2757 if (hostapd_config_parse_acs_chan_bias(conf, pos)) {
2764 int val = atoi(pos);
2773 bss->bss_load_update_period = atoi(pos);
2782 conf->rts_threshold = atoi(pos);
2790 conf->fragm_threshold = atoi(pos);
2801 int val = atoi(pos);
2809 if (hostapd_parse_intlist(&conf->supported_rates, pos)) {
2815 if (hostapd_parse_intlist(&conf->basic_rates, pos)) {
2823 if (os_strncmp(pos, "ht:", 3) == 0) {
2824 val = atoi(pos + 3);
2833 } else if (os_strncmp(pos, "vht:", 4) == 0) {
2834 val = atoi(pos + 4);
2844 val = atoi(pos);
2855 if (atoi(pos))
2860 bss->ignore_broadcast_ssid = atoi(pos);
2862 bss->no_probe_resp_if_max_sta = atoi(pos);
2864 bss->ssid.wep.idx = atoi(pos);
2876 buf[7] - '0', pos)) {
2883 bss->ssid.dynamic_vlan = atoi(pos);
2885 bss->ssid.per_sta_vif = atoi(pos);
2887 if (hostapd_config_read_vlan_file(bss, pos)) {
2889 line, pos);
2893 bss->ssid.vlan_naming = atoi(pos);
2904 bss->ssid.vlan_tagged_interface = os_strdup(pos);
2908 conf->ap_table_max_size = atoi(pos);
2910 conf->ap_table_expiration_time = atoi(pos);
2912 if (hostapd_config_tx_queue(conf, buf, pos)) {
2919 bss->wmm_enabled = atoi(pos);
2921 bss->wmm_uapsd = atoi(pos);
2924 if (hostapd_config_wmm_ac(conf->wmm_ac_params, buf, pos)) {
2930 if (hostapd_config_bss(conf, pos)) {
2936 if (hwaddr_aton(pos, bss->bssid)) {
2942 conf->use_driver_iface_addr = atoi(pos);
2945 bss->ieee80211w = atoi(pos);
2947 if (os_strcmp(pos, "AES-128-CMAC") == 0) {
2949 } else if (os_strcmp(pos, "BIP-GMAC-128") == 0) {
2951 } else if (os_strcmp(pos, "BIP-GMAC-256") == 0) {
2953 } else if (os_strcmp(pos, "BIP-CMAC-256") == 0) {
2957 line, pos);
2961 bss->assoc_sa_query_max_timeout = atoi(pos);
2968 bss->assoc_sa_query_retry_timeout = atoi(pos);
2977 conf->ieee80211n = atoi(pos);
2979 if (hostapd_config_ht_capab(conf, pos) < 0) {
2985 conf->require_ht = atoi(pos);
2987 conf->obss_interval = atoi(pos);
2991 conf->ieee80211ac = atoi(pos);
2993 if (hostapd_config_vht_capab(conf, pos) < 0) {
2999 conf->require_vht = atoi(pos);
3001 conf->vht_oper_chwidth = atoi(pos);
3003 conf->vht_oper_centr_freq_seg0_idx = atoi(pos);
3005 conf->vht_oper_centr_freq_seg1_idx = atoi(pos);
3007 bss->vendor_vht = atoi(pos);
3009 bss->use_sta_nsts = atoi(pos);
3013 conf->ieee80211ax = atoi(pos);
3015 conf->he_phy_capab.he_su_beamformer = atoi(pos);
3017 conf->he_phy_capab.he_su_beamformee = atoi(pos);
3019 conf->he_phy_capab.he_mu_beamformer = atoi(pos);
3021 conf->he_op.he_bss_color = atoi(pos);
3023 conf->he_op.he_default_pe_duration = atoi(pos);
3025 conf->he_op.he_twt_required = atoi(pos);
3027 conf->he_op.he_rts_threshold = atoi(pos);
3030 bss->max_listen_interval = atoi(pos);
3032 bss->disable_pmksa_caching = atoi(pos);
3034 bss->okc = atoi(pos);
3037 bss->wps_state = atoi(pos);
3044 bss->wps_independent = atoi(pos);
3046 bss->ap_setup_locked = atoi(pos);
3048 if (uuid_str2bin(pos, bss->uuid)) {
3054 bss->wps_pin_requests = os_strdup(pos);
3056 if (os_strlen(pos) > WPS_DEV_NAME_MAX_LEN) {
3062 bss->device_name = os_strdup(pos);
3064 if (os_strlen(pos) > 64) {
3070 bss->manufacturer = os_strdup(pos);
3072 if (os_strlen(pos) > 32) {
3078 bss->model_name = os_strdup(pos);
3080 if (os_strlen(pos) > 32) {
3086 bss->model_number = os_strdup(pos);
3088 if (os_strlen(pos) > 32) {
3094 bss->serial_number = os_strdup(pos);
3096 if (wps_dev_type_str2bin(pos, bss->device_type))
3100 bss->config_methods = os_strdup(pos);
3102 if (hexstr2bin(pos, bss->os_version, 4)) {
3109 bss->ap_pin = os_strdup(pos);
3111 bss->skip_cred_build = atoi(pos);
3114 bss->extra_cred = (u8 *) os_readfile(pos, &bss->extra_cred_len);
3117 line, pos);
3121 bss->wps_cred_processing = atoi(pos);
3125 (u8 *) os_readfile(pos, &bss->ap_settings_len);
3128 line, pos);
3133 bss->upnp_iface = os_strdup(pos);
3136 bss->friendly_name = os_strdup(pos);
3139 bss->manufacturer_url = os_strdup(pos);
3142 bss->model_description = os_strdup(pos);
3145 bss->model_url = os_strdup(pos);
3148 bss->upc = os_strdup(pos);
3150 bss->pbc_in_m1 = atoi(pos);
3153 bss->server_id = os_strdup(pos);
3156 bss->wps_nfc_dev_pw_id = atoi(pos);
3166 bss->wps_nfc_dh_pubkey = wpabuf_parse_bin(pos);
3170 bss->wps_nfc_dh_privkey = wpabuf_parse_bin(pos);
3174 bss->wps_nfc_dev_pw = wpabuf_parse_bin(pos);
3180 if (atoi(pos))
3185 if (atoi(pos))
3191 bss->disassoc_low_ack = atoi(pos);
3193 if (atoi(pos))
3198 if (atoi(pos))
3205 rsn_testing = atoi(pos);
3208 bss->time_advertisement = atoi(pos);
3210 size_t tz_len = os_strlen(pos);
3217 bss->time_zone = os_strdup(pos);
3222 bss->wnm_sleep_mode = atoi(pos);
3224 bss->bss_transition = atoi(pos);
3228 bss->interworking = atoi(pos);
3230 bss->access_network_type = atoi(pos);
3239 bss->internet = atoi(pos);
3241 bss->asra = atoi(pos);
3243 bss->esr = atoi(pos);
3245 bss->uesa = atoi(pos);
3247 bss->venue_group = atoi(pos);
3250 bss->venue_type = atoi(pos);
3253 if (hwaddr_aton(pos, bss->hessid)) {
3258 if (parse_roaming_consortium(bss, pos, line) < 0)
3261 if (parse_venue_name(bss, pos, line) < 0)
3266 if (hexstr2bin(pos, &auth_type, 1)) {
3269 line, pos);
3273 redirect_url_len = os_strlen(pos + 2);
3283 os_memcpy(bss->network_auth_type + 3, pos + 2,
3287 if (hexstr2bin(pos, &bss->ipaddr_type_availability, 1)) {
3289 line, pos);
3299 domain_list_len = os_strlen(pos) + 1;
3305 tok_prev = pos;
3311 tok_prev = pos;
3332 if (parse_3gpp_cell_net(bss, pos, line) < 0)
3335 if (parse_nai_realm(bss, pos, line) < 0)
3338 if (parse_anqp_elem(bss, pos, line) < 0)
3341 int val = atoi(pos);
3346 line, pos);
3351 bss->gas_comeback_delay = atoi(pos);
3353 if (parse_qos_map_set(bss, pos, line) < 0)
3359 bss->dump_msk_file = os_strdup(pos);
3363 bss->proxy_arp = atoi(pos);
3367 bss->hs20 = atoi(pos);
3369 bss->disable_dgaf = atoi(pos);
3371 bss->na_mcast_to_ucast = atoi(pos);
3373 bss->osen = atoi(pos);
3375 bss->anqp_domain_id = atoi(pos);
3377 bss->hs20_deauth_req_timeout = atoi(pos);
3379 if (hs20_parse_oper_friendly_name(bss, pos, line) < 0)
3382 if (hs20_parse_wan_metrics(bss, pos, line) < 0)
3385 if (hs20_parse_conn_capab(bss, pos, line) < 0) {
3391 oper_class_len = os_strlen(pos);
3395 line, pos);
3402 if (hexstr2bin(pos, oper_class, oper_class_len)) {
3405 line, pos);
3413 if (hs20_parse_icon(bss, pos) < 0) {
3415 line, pos);
3419 if (hs20_parse_osu_ssid(bss, pos, line) < 0)
3422 if (hs20_parse_osu_server_uri(bss, pos, line) < 0)
3425 if (hs20_parse_osu_friendly_name(bss, pos, line) < 0)
3428 if (hs20_parse_osu_nai(bss, pos, line) < 0)
3431 if (hs20_parse_osu_method_list(bss, pos, line) < 0)
3434 if (hs20_parse_osu_icon(bss, pos, line) < 0)
3437 if (hs20_parse_osu_service_desc(bss, pos, line) < 0)
3441 bss->subscr_remediation_url = os_strdup(pos);
3443 bss->subscr_remediation_method = atoi(pos);
3447 bss->mbo_enabled = atoi(pos);
3454 conf->_val = strtod(pos, &end); \
3459 line, pos); \
3468 conf->ecsa_ie_only = atoi(pos);
3470 WPA_PUT_LE16(bss->bss_load_test, atoi(pos));
3471 pos = os_strchr(pos, ':');
3472 if (pos == NULL) {
3477 pos++;
3478 bss->bss_load_test[2] = atoi(pos);
3479 pos = os_strchr(pos, ':');
3480 if (pos == NULL) {
3485 pos++;
3486 WPA_PUT_LE16(&bss->bss_load_test[3], atoi(pos));
3493 int val = atoi(pos);
3500 size_t len = os_strlen(pos) / 2;
3506 if (hexstr2bin(pos, wpabuf_put(tmp, len), len)) {
3510 line, pos);
3518 if (parse_wpabuf_hex(line, buf, &bss->vendor_elements, pos))
3521 if (parse_wpabuf_hex(line, buf, &bss->assocresp_elements, pos))
3524 bss->sae_anti_clogging_threshold = atoi(pos);
3526 if (hostapd_parse_intlist(&bss->sae_groups, pos)) {
3529 line, pos);
3533 int val = atoi(pos);
3541 conf->spectrum_mgmt_required = atoi(pos);
3544 bss->wowlan_triggers = os_strdup(pos);
3547 size_t len = os_strlen(pos);
3552 line, pos);
3559 line, pos);
3563 os_strlcpy(conf->fst_cfg.group_id, pos,
3569 if (!*pos) {
3576 val = strtol(pos, &endp, 0);
3580 line, val, pos, FST_MAX_PRIO_VALUE);
3588 if (!*pos) {
3594 val = strtol(pos, &endp, 0);
3599 line, val, pos, FST_MAX_LLT_MS);
3605 conf->track_sta_max_num = atoi(pos);
3607 conf->track_sta_max_age = atoi(pos);
3610 bss->no_probe_resp_if_seen_on = os_strdup(pos);
3613 bss->no_auth_if_seen_on = os_strdup(pos);
3616 conf->lci = wpabuf_parse_bin(pos);
3623 conf->civic = wpabuf_parse_bin(pos);
3629 if (atoi(pos))
3633 if (atoi(pos))
3639 bss->gas_address3 = atoi(pos);
3641 conf->stationary_ap = atoi(pos);
3643 bss->ftm_responder = atoi(pos);
3645 bss->ftm_initiator = atoi(pos);
3648 if (hexstr2bin(pos, bss->fils_cache_id, FILS_CACHE_ID_LEN)) {
3651 line, pos);
3656 if (parse_fils_realm(bss, pos) < 0)
3659 if (hostapd_parse_ip_addr(pos, &bss->dhcp_server)) {
3662 line, pos);
3666 bss->dhcp_rapid_commit_proxy = atoi(pos);
3668 bss->fils_hlp_wait_time = atoi(pos);
3670 bss->dhcp_server_port = atoi(pos);
3672 bss->dhcp_relay_port = atoi(pos);
3675 bss->multicast_to_unicast = atoi(pos);
3696 char buf[4096], *pos;
3733 pos = buf;
3734 while (*pos != '\0') {
3735 if (*pos == '\n') {
3736 *pos = '\0';
3739 pos++;
3744 pos = os_strchr(buf, '=');
3745 if (pos == NULL) {
3751 *pos = '\0';
3752 pos++;
3753 errors += hostapd_config_fill(conf, bss, buf, pos, line);