summaryrefslogtreecommitdiff
path: root/netifd.h
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2020-11-30 12:34:13 +0100
committerFelix Fietkau <nbd@nbd.name>2020-11-30 12:39:25 +0100
commit42c48866f1c1fce068f41536baa8dd2e80fc08d7 (patch)
tree439389ff79d44a5eb48c3fd5d3c60c0a5f36f024 /netifd.h
parent524310276f2084d419cb0f2de58b0f42641d987f (diff)
downloadnetifd-42c48866f1c1fce068f41536baa8dd2e80fc08d7.tar.gz
config: parse default mac address from board.json
Example: { "network-device": { "eth0": { "macaddr": "bc:a5:11:16:76:d7" } } } Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'netifd.h')
-rw-r--r--netifd.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/netifd.h b/netifd.h
index a4a146c..9645a0a 100644
--- a/netifd.h
+++ b/netifd.h
@@ -26,6 +26,12 @@
#include <libubus.h>
+#ifdef linux
+#include <netinet/ether.h>
+#else
+#include <net/ethernet.h>
+#endif
+
#include "utils.h"
#ifdef DUMMY_MODE
@@ -33,11 +39,13 @@
#define DEFAULT_CONFIG_PATH "./config"
#define DEFAULT_HOTPLUG_PATH "./examples/hotplug-cmd"
#define DEFAULT_RESOLV_CONF "./tmp/resolv.conf"
+#define DEFAULT_BOARD_JSON "./config/board.json"
#else
#define DEFAULT_MAIN_PATH "/lib/netifd"
#define DEFAULT_CONFIG_PATH NULL /* use the default set in libuci */
#define DEFAULT_HOTPLUG_PATH "/sbin/hotplug-call"
#define DEFAULT_RESOLV_CONF "/tmp/resolv.conf.d/resolv.conf.auto"
+#define DEFAULT_BOARD_JSON "/etc/board.json"
#endif
extern const char *resolv_conf;