Lines Matching full:value
39 int line, const char *value);
60 static char * wpa_config_parse_string(const char *value, size_t *len)
62 if (*value == '"') {
65 value++;
66 pos = os_strrchr(value, '"');
69 *len = pos - value;
73 os_memcpy(str, value, *len);
78 size_t tlen, hlen = os_strlen(value);
85 if (hexstr2bin(value, str, tlen)) {
98 int line, const char *value)
103 if (os_strcmp(value, "NULL") == 0) {
111 tmp = wpa_config_parse_string(value, &res_len);
115 data->key_data ? "[KEY DATA REMOVED]" : value);
168 static char * wpa_config_write_string_ascii(const u8 *value, size_t len)
176 os_memcpy(buf + 1, value, len);
184 static char * wpa_config_write_string_hex(const u8 *value, size_t len)
191 wpa_snprintf_hex(buf, 2 * len + 1, value, len);
197 static char * wpa_config_write_string(const u8 *value, size_t len)
199 if (value == NULL)
202 if (is_hex(value, len))
203 return wpa_config_write_string_hex(value, len);
205 return wpa_config_write_string_ascii(value, len);
251 int line, const char *value)
256 *dst = atoi(value);
260 wpa_printf(MSG_ERROR, "Line %d: too small %s (value=%d "
268 wpa_printf(MSG_ERROR, "Line %d: too large %s (value=%d "
284 char *value;
288 value = os_malloc(20);
289 if (value == NULL)
291 res = os_snprintf(value, 20, "%d", *src);
293 os_free(value);
296 value[20 - 1] = '\0';
297 return value;
304 const char *value)
306 if (hwaddr_aton(value, ssid->bssid)) {
308 line, value);
321 char *value;
327 value = os_malloc(20);
328 if (value == NULL)
330 res = os_snprintf(value, 20, MACSTR, MAC2STR(ssid->bssid));
332 os_free(value);
335 value[20 - 1] = '\0';
336 return value;
343 const char *value)
345 if (*value == '"') {
350 value++;
351 pos = os_strrchr(value, '"');
353 len = pos - value;
355 len = os_strlen(value);
359 line, (unsigned long) len, value);
363 (u8 *) value, len);
365 os_memcmp(ssid->passphrase, value, len) == 0)
372 os_memcpy(ssid->passphrase, value, len);
382 if (hexstr2bin(value, ssid->psk, PMK_LEN) ||
383 value[PMK_LEN * 2] != '\0') {
385 line, value);
417 const char *value)
422 buf = os_strdup(value);
501 const char *value)
506 buf = os_strdup(value);
664 static int wpa_config_parse_cipher(int line, const char *value)
669 buf = os_strdup(value);
784 const char *value)
787 val = wpa_config_parse_cipher(line, value);
813 const char *value)
816 val = wpa_config_parse_cipher(line, value);
843 const char *value)
848 buf = os_strdup(value);
943 const char *value)
950 buf = os_strdup(value);
1050 const char *value)
1054 if (os_strcmp(value, "NULL") == 0) {
1062 if (os_strncmp(value, "hash:", 5) != 0) {
1066 tmp = wpa_config_parse_string(value, &res_len);
1085 if (os_strlen(value + 5) != 2 * 16) {
1095 if (hexstr2bin(value + 5, hash, 16)) {
1138 const char *value, int idx)
1143 buf = wpa_config_parse_string(value, len);
1146 line, idx, value);
1151 line, idx, value);
1166 const char *value)
1170 value, 0);
1176 const char *value)
1180 value, 1);
1186 const char *value)
1190 value, 2);
1196 const char *value)
1200 value, 3);
1302 /* INT_RANGE: Define an integer variable with allowed value range */
1306 * parsing and writing the value. */
1327 * and value for INT).
1331 * function (.parser) is then called to parse the actual value of the field.
1748 * @value: Variable value
1753 * both the configuration file and management interface input. The value
1757 int wpa_config_set(struct wpa_ssid *ssid, const char *var, const char *value,
1763 if (ssid == NULL || var == NULL || value == NULL)
1771 if (field->parser(field, ssid, line, value)) {
1774 "parse %s '%s'.", line, var, value);
1797 * Returns: Value of the variable or %NULL on failure
1800 * returned value is a copy of the configuration variable in text format, i.e,.
1802 * are using for the value. The caller is responsible for freeing the returned
1803 * value.
1826 * Returns: Value of the variable or %NULL on failure
1831 * is requested, the returned value is an empty string or %NULL if the variable
1832 * is not set or "*" if the variable is set (regardless of its value). The
1833 * returned value is a copy of the configuration variable in text format, i.e,.
1835 * are using for the value. The caller is responsible for freeing the returned
1836 * value.
1914 * @blob: New value for the blob
1916 * Adds a new configuration blob or replaces the current value of an existing