#include #include LOG_MODULE_REGISTER(main); int main(void) { LOG_INF("Function main was started."); struct net_if *iface = net_if_get_default(); if (iface == NULL) { LOG_ERR("Could not find default network interface."); goto FINISH; } LOG_DBG("Got default network interface pointer 0x%p", (void *)iface); struct net_linkaddr *link_addr = net_if_get_link_addr(iface); if (iface == NULL) { LOG_ERR("Could not determine link address of default network interface."); goto FINISH; } LOG_INF( "Got link address of default network interface: %02x:%02x:%02x:%02x:%02x:%02x", link_addr->addr[0], link_addr->addr[1], link_addr->addr[2], link_addr->addr[3], link_addr->addr[4], link_addr->addr[5] ); FINISH: LOG_INF("Function main was finished."); return 0; }