Lines Matching +full:ascii +full:. +full:r

2  * wpa_supplicant/hostapd / common helper functions, etc.
3 * Copyright (c) 2002-2019, Jouni Malinen <j@w1.fi>
5 * This software may be distributed under the terms of the BSD license.
6 * See README for more details.
9 #include "includes.h"
11 #include "common/ieee802_11_defs.h"
12 #include "common.h"
60 * hwaddr_aton - Convert ASCII string to MAC address (colon-delimited format)
61 * @txt: MAC address as a string (e.g., "00:11:22:33:44:55")
63 * Returns: 0 on success, -1 on failure (e.g., string not a MAC address)
72 …* hwaddr_masked_aton - Convert ASCII string with optional mask to MAC address (colon-delimited for…
73 * @txt: MAC address with optional mask as a string (e.g., "00:11:22:33:44:55/ff:ff:ff:ff:00:00")
77 * Returns: 0 on success, -1 on failure (e.g., string not a MAC address)
81 const char *r; in hwaddr_masked_aton() local
84 r = hwaddr_parse(txt, addr); in hwaddr_masked_aton()
85 if (!r) in hwaddr_masked_aton()
89 if (*r == '\0' || isspace((unsigned char) *r)) { in hwaddr_masked_aton()
92 } else if (maskable && *r == '/') { in hwaddr_masked_aton()
94 r = hwaddr_parse(r + 1, mask); in hwaddr_masked_aton()
96 if (!r) in hwaddr_masked_aton()
108 * hwaddr_compact_aton - Convert ASCII string to MAC address (no colon delimitors format)
109 * @txt: MAC address as a string (e.g., "001122334455")
111 * Returns: 0 on success, -1 on failure (e.g., string not a MAC address)
133 * hwaddr_aton2 - Convert ASCII string to MAC address (in any known format)
134 * @txt: MAC address as a string (e.g., 00:11:22:33:44:55 or 0011.2233.4455)
146 while (*pos == ':' || *pos == '.' || *pos == '-') in hwaddr_aton2()
163 * hexstr2bin - Convert ASCII hex string into binary data
164 * @hex: ASCII hex string (e.g., "01ab")
219 * 0xff to 0x00.
251 sec = now.sec + 2208988800U; /* Epoch to 1900 */ in wpa_get_ntp_timestamp()
253 usec = now.usec; in wpa_get_ntp_timestamp()
269 * the NULL byte (i.e., 0 on error, size-1 if buffer is not big enough).
271 int wpa_scnprintf(char *buf, size_t size, const char *fmt, ...) in wpa_scnprintf() argument
442 * wpa_unicode2ascii_inplace - Convert unicode string into ASCII
445 * This function converts a unicode string to ASCII using the same
446 * buffer for output. If UNICODE is not set, the buffer is not
447 * modified.
502 case '\r': in printf_encode()
504 *txt++ = 'r'; in printf_encode()
550 case 'r': in printf_decode()
551 buf[len++] = '\r'; in printf_decode()
613 * This function can be used to convert SSIDs into printable form. In most
615 * does not limit the used character set, so anything could be used in an SSID.
618 * time, i.e., this is not re-entrant and the returned buffer must be used
619 * before calling this again.
725 if (*str == '\n' || *str == '\r') in has_newline()
788 * Comma separated list of frequency ranges. in freq_range_list_parse()
800 freq[count].min = atoi(pos); in freq_range_list_parse()
805 freq[count].max = atoi(pos2); in freq_range_list_parse()
807 freq[count].max = freq[count].min; in freq_range_list_parse()
831 if (freq >= list->range[i].min && freq <= list->range[i].max) in freq_range_list_includes()
1014 * further call.
1018 * char and const char strings. Differences:
1021 * position in str buffer. If a return value is not NULL a size
1022 * of the returned token could be calculated as (last - token).
1052 * @buf: String to tokenize. Note that the string might be modified.
1054 * @context: Pointer to save our context. Should be initialized with
1055 * NULL on the first call, and passed for any further call.
1056 * Returns: The next token, NULL if there are no more valid tokens.
1171 * or NULL terminated string of hex digits for the hex format. buf can include
1172 * additional arguments after the SSID.
1221 * Returns: RCPI corresponding to the given RSSI value, or 255 if not available.
1223 * It's possible to estimate RCPI based on RSSI in dBm. This calculation will
1225 * frames which are transmitted with up to 24 Mbps rates.
1265 * becomes unaccessible after this function is called. This is mostly the case
1266 * for clearing local stack variables at the end of a function. This is not
1267 * exactly perfect, i.e., someone could come up with a compiler that figures out
1270 * a bit more difficult to optimize out. Once memset_s() is available, that
1271 * could be used here instead. */