diff options
author | Felix Fietkau <nbd@nbd.name> | 2020-11-30 12:34:13 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2020-11-30 12:39:25 +0100 |
commit | 42c48866f1c1fce068f41536baa8dd2e80fc08d7 (patch) | |
tree | 439389ff79d44a5eb48c3fd5d3c60c0a5f36f024 /netifd.h | |
parent | 524310276f2084d419cb0f2de58b0f42641d987f (diff) | |
download | netifd-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.h | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -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; |