mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-30 06:02:39 +01:00
util: Add util_ssid_is_utf8
This commit is contained in:
parent
b2e1c36cbb
commit
3877a4e5dd
@ -78,6 +78,14 @@ no_ssid:
|
|||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool util_ssid_is_utf8(size_t len, const uint8_t *ssid)
|
||||||
|
{
|
||||||
|
if (len > 32)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return l_utf8_validate((const char *)ssid, len, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
bool _msg_append_attr(struct l_genl_msg *msg,
|
bool _msg_append_attr(struct l_genl_msg *msg,
|
||||||
uint16_t type, const char *type_str,
|
uint16_t type, const char *type_str,
|
||||||
uint16_t len, const void *value)
|
uint16_t len, const void *value)
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
const char *util_ssid_to_utf8(size_t len, const uint8_t *ssid);
|
const char *util_ssid_to_utf8(size_t len, const uint8_t *ssid);
|
||||||
|
bool util_ssid_is_utf8(size_t len, const uint8_t *ssid);
|
||||||
|
|
||||||
static inline uint8_t util_bit_field(const uint8_t oct, int start, int num)
|
static inline uint8_t util_bit_field(const uint8_t oct, int start, int num)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user