feat: cJSON, Gerätenamen und HTTP-Parser

This commit is contained in:
Michael Sauer
2026-09-11 22:18:14 +02:00
parent 0648b3a252
commit 4a23df1b8d
12 changed files with 3829 additions and 2 deletions
+20
View File
@@ -0,0 +1,20 @@
#include "net/nl_names.h"
#include <stdio.h>
void nl_names_mac_suffix(const uint8_t mac[6], char out[5])
{
snprintf(out, 5, "%02x%02x", mac[4], mac[5]);
}
void nl_names_hostname(const uint8_t mac[6], char *out, size_t len)
{
char suffix[5];
nl_names_mac_suffix(mac, suffix);
snprintf(out, len, "ninlight-%s", suffix);
}
void nl_names_mac_str(const uint8_t mac[6], char out[18])
{
snprintf(out, 18, "%02x:%02x:%02x:%02x:%02x:%02x", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
}