/* If the total number of ready ifaces changed, possibly send an event */
if (ready_count != original_ready_count) {
if (ready_count == 0) {
/* We just lost connectivity */
net_mgmt_event_notify(NET_EVENT_L4_DISCONNECTED, last_iface_down);
} else if (original_ready_count == 0) {
/* We just gained connectivity */
net_mgmt_event_notify(NET_EVENT_L4_CONNECTED, last_iface_up);
}
}
文件目录 subsys\net\conn_mgr\conn_mgr_monitor.c
目前只能支持1个NET_EVENT_L4事件,多网卡的情况下,无法正常触发该事件 https://github.com/zephyrproject-rtos/zephyr/blob/v3.6-branch/subsys/net/conn_mgr/conn_mgr_monitor.c