@@ -10,6 +10,7 @@
#include <stdbool.h>
#include <stdint.h>
+#include <string.h>
#ifdef __cplusplus
extern "C" {
@@ -119,6 +120,14 @@ static inline int l_netlink_message_append_mac(struct l_netlink_message *message
return l_netlink_message_append(message, type, mac, 6);
}
+static inline int l_netlink_message_append_string(
+ struct l_netlink_message *message,
+ uint16_t type,
+ const char *str)
+{
+ return l_netlink_message_append(message, type, str, strlen(str) + 1);
+}
+
struct l_netlink_attr {
const struct nlattr *data;
uint32_t len;