Lines Matching full:value
37 int line, const char *value);
56 static char * wpa_config_parse_string(const char *value, size_t *len)
58 if (*value == '"') {
60 value++;
61 pos = os_strrchr(value, '"');
65 *len = os_strlen(value);
66 return os_strdup(value);
69 size_t tlen, hlen = os_strlen(value);
76 if (hexstr2bin(value, str, tlen)) {
89 int line, const char *value)
94 if (os_strcmp(value, "NULL") == 0) {
102 tmp = wpa_config_parse_string(value, &res_len);
106 data->key_data ? "[KEY DATA REMOVED]" : value);
158 static char * wpa_config_write_string_ascii(const u8 *value, size_t len)
166 os_memcpy(buf + 1, value, len);
174 static char * wpa_config_write_string_hex(const u8 *value, size_t len)
181 wpa_snprintf_hex(buf, 2 * len + 1, value, len);
187 static char * wpa_config_write_string(const u8 *value, size_t len)
189 if (value == NULL)
192 if (is_hex(value, len))
193 return wpa_config_write_string_hex(value, len);
195 return wpa_config_write_string_ascii(value, len);
239 int line, const char *value)
244 *dst = atoi(value);
248 wpa_printf(MSG_ERROR, "Line %d: too small %s (value=%d "
256 wpa_printf(MSG_ERROR, "Line %d: too large %s (value=%d "
271 char *value;
275 value = os_malloc(20);
276 if (value == NULL)
278 os_snprintf(value, 20, "%d", *src);
279 value[20 - 1] = '\0';
280 return value;
286 const char *value)
288 if (hwaddr_aton(value, ssid->bssid)) {
290 line, value);
302 char *value;
307 value = os_malloc(20);
308 if (value == NULL)
310 os_snprintf(value, 20, MACSTR, MAC2STR(ssid->bssid));
311 value[20 - 1] = '\0';
312 return value;
318 const char *value)
320 if (*value == '"') {
324 value++;
325 pos = os_strrchr(value, '"');
327 len = pos - value;
329 len = os_strlen(value);
333 line, (unsigned long) len, value);
337 (u8 *) value, len);
339 os_memcmp(ssid->passphrase, value, len) == 0)
346 os_memcpy(ssid->passphrase, value, len);
351 if (hexstr2bin(value, ssid->psk, PMK_LEN) ||
352 value[PMK_LEN * 2] != '\0') {
354 line, value);
384 const char *value)
389 buf = os_strdup(value);
466 const char *value)
471 buf = os_strdup(value);
585 static int wpa_config_parse_cipher(int line, const char *value)
590 buf = os_strdup(value);
703 const char *value)
706 val = wpa_config_parse_cipher(line, value);
730 const char *value)
733 val = wpa_config_parse_cipher(line, value);
758 const char *value)
763 buf = os_strdup(value);
856 const char *value)
863 buf = os_strdup(value);
963 const char *value, int idx)
967 buf = wpa_config_parse_string(value, len);
970 line, idx, value);
975 line, idx, value);
989 const char *value)
993 value, 0);
999 const char *value)
1003 value, 1);
1009 const char *value)
1013 value, 2);
1019 const char *value)
1023 value, 3);
1106 /* INT_RANGE: Define an integer variable with allowed value range */
1110 * parsing and writing the value. */
1127 * and value for INT).
1131 * function (.parser) is then called to parse the actual value of the field.
1544 * @value: Variable value
1549 * both the configuration file and management interface input. The value
1553 int wpa_config_set(struct wpa_ssid *ssid, const char *var, const char *value,
1559 if (ssid == NULL || var == NULL || value == NULL)
1567 if (field->parser(field, ssid, line, value)) {
1570 "parse %s '%s'.", line, var, value);
1592 * Returns: Value of the variable or %NULL on failure
1595 * returned value is a copy of the configuration variable in text format, i.e,.
1597 * are using for the value. The caller is responsible for freeing the returned
1598 * value.
1621 * Returns: Value of the variable or %NULL on failure
1626 * is requested, the returned value is an empty string or %NULL if the variable
1627 * is not set or "*" if the variable is set (regardless of its value). The
1628 * returned value is a copy of the configuration variable in text format, i.e,.
1630 * are using for the value. The caller is responsible for freeing the returned
1631 * value.
1705 * @blob: New value for the blob
1707 * Adds a new configuration blob or replaces the current value of an existing