18#ifndef ZEPHYR_INCLUDE_DRIVERS_ESP_WIFI_MESH_H_
19#define ZEPHYR_INCLUDE_DRIVERS_ESP_WIFI_MESH_H_
209#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:43
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:88
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.
void esp_wifi_mesh_get_config(struct esp_wifi_mesh_config *config)
Get the mesh configuration esp_wifi_mesh_start() will use.
int esp_wifi_mesh_set_config(const struct esp_wifi_mesh_config *config)
Set the mesh configuration used by the next esp_wifi_mesh_start().
@ ESP_WIFI_MESH_EVENT_CHILD_CONNECTED
A child node connected to this node.
Definition esp_wifi_mesh.h:53
@ ESP_WIFI_MESH_EVENT_FIND_NETWORK
The node started looking for a network to join.
Definition esp_wifi_mesh.h:59
@ ESP_WIFI_MESH_EVENT_STARTED
The mesh stack has started.
Definition esp_wifi_mesh.h:45
@ ESP_WIFI_MESH_EVENT_PARENT_CONNECTED
This node connected to a parent (see is_root in the info).
Definition esp_wifi_mesh.h:49
@ ESP_WIFI_MESH_EVENT_STOPPED
The mesh stack has stopped.
Definition esp_wifi_mesh.h:47
@ ESP_WIFI_MESH_EVENT_NO_PARENT_FOUND
No parent was found during the last scan.
Definition esp_wifi_mesh.h:57
@ ESP_WIFI_MESH_EVENT_ROUTING_TABLE_CHANGE
The routing table changed (see routing_table_size in the info).
Definition esp_wifi_mesh.h:61
@ ESP_WIFI_MESH_EVENT_TODS_UNREACHABLE
The root external-network (toDS) path became unreachable.
Definition esp_wifi_mesh.h:65
@ ESP_WIFI_MESH_EVENT_TODS_REACHABLE
The root external-network (toDS) path became reachable.
Definition esp_wifi_mesh.h:63
@ ESP_WIFI_MESH_EVENT_CHILD_DISCONNECTED
A child node disconnected from this node.
Definition esp_wifi_mesh.h:55
@ ESP_WIFI_MESH_EVENT_PARENT_DISCONNECTED
This node lost its parent.
Definition esp_wifi_mesh.h:51
wifi_security_type
IEEE 802.11 security types.
Definition wifi.h:80
#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:273
uint8_t addr[6]
6-byte MAC address of the mesh node.
Definition esp_wifi_mesh.h:275
Runtime-configurable mesh credentials and tree limits.
Definition esp_wifi_mesh.h:111
char password[64]
Router password.
Definition esp_wifi_mesh.h:120
uint8_t mesh_id[6]
6-byte mesh network identifier.
Definition esp_wifi_mesh.h:134
uint8_t channel
Mesh channel: 0 lets the mesh select it by scanning (required when the router channel is unknown); 1-...
Definition esp_wifi_mesh.h:130
char mesh_password[64]
Mesh softAP password securing the inter-node mesh links.
Definition esp_wifi_mesh.h:125
char ssid[33]
Router SSID: the upstream Wi-Fi network the root associates to for external network access.
Definition esp_wifi_mesh.h:116
enum wifi_security_type authmode
Mesh softAP authentication mode.
Definition esp_wifi_mesh.h:136
uint8_t num_layers
Tree depth (layers) to use for this mesh.
Definition esp_wifi_mesh.h:141
uint8_t max_connections
Per-node direct child fan-out to use for this mesh.
Definition esp_wifi_mesh.h:147
Information delivered with a mesh event.
Definition esp_wifi_mesh.h:71
bool is_root
True if this node is the mesh root.
Definition esp_wifi_mesh.h:75
int layer
Current mesh layer (tree depth); -1 while unattached.
Definition esp_wifi_mesh.h:73
int routing_table_size
Current routing table size (valid for routing-table events).
Definition esp_wifi_mesh.h:77
int reason
Disconnect reason (valid for disconnect events).
Definition esp_wifi_mesh.h:79
Current mesh status snapshot.
Definition esp_wifi_mesh.h:252
bool is_root
True if this node is the mesh root.
Definition esp_wifi_mesh.h:256
int routing_table_size
Number of nodes in the routing table (root: whole sub-network).
Definition esp_wifi_mesh.h:258
bool tods_reachable
True once the root announced external-network reachability.
Definition esp_wifi_mesh.h:260
int layer
Current mesh layer (tree depth); -1 while unattached.
Definition esp_wifi_mesh.h:254
Network Interface structure.
Definition net_if.h:777
IEEE 802.11 protocol and general Wi-Fi definitions.