17#ifndef ZEPHYR_INCLUDE_DRIVERS_ESP_WIFI_MESH_H_
18#define ZEPHYR_INCLUDE_DRIVERS_ESP_WIFI_MESH_H_
132#if !defined(CONFIG_WIFI_ESP32_MESH_IP)
int esp_wifi_mesh_start(void)
Start the Wi-Fi mesh stack.
esp_wifi_mesh_event
Wi-Fi mesh events delivered to the application callback.
Definition esp_wifi_mesh.h:41
int esp_wifi_mesh_recv(uint8_t *data, size_t *len, int timeout_ms)
Receive a data buffer from the mesh.
void esp_wifi_mesh_set_tods_reachable(bool reachable)
Announce the root external-network (toDS) reachability to the mesh.
void esp_wifi_mesh_bind_sta_rx(void)
Deliver root station uplink frames to the station interface.
void(* esp_wifi_mesh_event_cb_t)(enum esp_wifi_mesh_event event, const struct esp_wifi_mesh_event_info *info)
Application mesh event callback.
Definition esp_wifi_mesh.h:86
void esp_wifi_mesh_get_status(struct esp_wifi_mesh_status *status)
Read the current mesh status.
int esp_wifi_mesh_get_routing_table(struct esp_wifi_mesh_addr *macs, size_t max, size_t *count)
Read the mesh routing table node addresses.
struct net_if * esp_wifi_mesh_netif_get(void)
Get the Ethernet-over-mesh network interface.
void esp_wifi_mesh_event_cb_register(esp_wifi_mesh_event_cb_t cb)
Register the application mesh event callback.
int esp_wifi_mesh_send(const uint8_t *data, size_t len)
Send a data buffer over the mesh.
@ ESP_WIFI_MESH_EVENT_CHILD_CONNECTED
A child node connected to this node.
Definition esp_wifi_mesh.h:51
@ ESP_WIFI_MESH_EVENT_FIND_NETWORK
The node started looking for a network to join.
Definition esp_wifi_mesh.h:57
@ ESP_WIFI_MESH_EVENT_STARTED
The mesh stack has started.
Definition esp_wifi_mesh.h:43
@ ESP_WIFI_MESH_EVENT_PARENT_CONNECTED
This node connected to a parent (see is_root in the info).
Definition esp_wifi_mesh.h:47
@ ESP_WIFI_MESH_EVENT_STOPPED
The mesh stack has stopped.
Definition esp_wifi_mesh.h:45
@ ESP_WIFI_MESH_EVENT_NO_PARENT_FOUND
No parent was found during the last scan.
Definition esp_wifi_mesh.h:55
@ ESP_WIFI_MESH_EVENT_ROUTING_TABLE_CHANGE
The routing table changed (see routing_table_size in the info).
Definition esp_wifi_mesh.h:59
@ ESP_WIFI_MESH_EVENT_TODS_UNREACHABLE
The root external-network (toDS) path became unreachable.
Definition esp_wifi_mesh.h:63
@ ESP_WIFI_MESH_EVENT_TODS_REACHABLE
The root external-network (toDS) path became reachable.
Definition esp_wifi_mesh.h:61
@ ESP_WIFI_MESH_EVENT_CHILD_DISCONNECTED
A child node disconnected from this node.
Definition esp_wifi_mesh.h:53
@ ESP_WIFI_MESH_EVENT_PARENT_DISCONNECTED
This node lost its parent.
Definition esp_wifi_mesh.h:49
#define max(a, b)
Return larger value of two provided expressions.
Definition minmax.h:65
Public API for network interface.
IPv6 and IPv4 definitions.
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
A mesh node address (a 6-byte MAC).
Definition esp_wifi_mesh.h:196
uint8_t addr[6]
6-byte MAC address of the mesh node.
Definition esp_wifi_mesh.h:198
Information delivered with a mesh event.
Definition esp_wifi_mesh.h:69
bool is_root
True if this node is the mesh root.
Definition esp_wifi_mesh.h:73
int layer
Current mesh layer (tree depth); -1 while unattached.
Definition esp_wifi_mesh.h:71
int routing_table_size
Current routing table size (valid for routing-table events).
Definition esp_wifi_mesh.h:75
int reason
Disconnect reason (valid for disconnect events).
Definition esp_wifi_mesh.h:77
Current mesh status snapshot.
Definition esp_wifi_mesh.h:175
bool is_root
True if this node is the mesh root.
Definition esp_wifi_mesh.h:179
int routing_table_size
Number of nodes in the routing table (root: whole sub-network).
Definition esp_wifi_mesh.h:181
bool tods_reachable
True once the root announced external-network reachability.
Definition esp_wifi_mesh.h:183
int layer
Current mesh layer (tree depth); -1 while unattached.
Definition esp_wifi_mesh.h:177
Network Interface structure.
Definition net_if.h:744