Dmitry Shmidt | fb45fd5 | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 1 | /* |
| 2 | * WPA Supplicant - Basic mesh mode routines |
| 3 | * Copyright (c) 2013-2014, cozybit, Inc. All rights reserved. |
| 4 | * |
| 5 | * This software may be distributed under the terms of the BSD license. |
| 6 | * See README for more details. |
| 7 | */ |
| 8 | |
| 9 | #ifndef MESH_H |
| 10 | #define MESH_H |
| 11 | |
| 12 | int wpa_supplicant_join_mesh(struct wpa_supplicant *wpa_s, |
| 13 | struct wpa_ssid *ssid); |
Hai Shalom | 6084025 | 2021-02-19 19:02:11 -0800 | [diff] [blame] | 14 | int wpa_supplicant_leave_mesh(struct wpa_supplicant *wpa_s, |
| 15 | bool need_deinit); |
Dmitry Shmidt | fb45fd5 | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 16 | void wpa_supplicant_mesh_iface_deinit(struct wpa_supplicant *wpa_s, |
Hai Shalom | 6084025 | 2021-02-19 19:02:11 -0800 | [diff] [blame] | 17 | struct hostapd_iface *ifmsh, |
| 18 | bool also_clear_hostapd); |
Dmitry Shmidt | fb45fd5 | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 19 | int wpas_mesh_scan_result_text(const u8 *ies, size_t ies_len, char *buf, |
| 20 | char *end); |
| 21 | int wpas_mesh_add_interface(struct wpa_supplicant *wpa_s, char *ifname, |
| 22 | size_t len); |
Dmitry Shmidt | e466304 | 2016-04-04 10:07:49 -0700 | [diff] [blame] | 23 | int wpas_mesh_peer_remove(struct wpa_supplicant *wpa_s, const u8 *addr); |
| 24 | int wpas_mesh_peer_add(struct wpa_supplicant *wpa_s, const u8 *addr, |
| 25 | int duration); |
Dmitry Shmidt | fb45fd5 | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 26 | |
| 27 | #ifdef CONFIG_MESH |
| 28 | |
| 29 | void wpa_mesh_notify_peer(struct wpa_supplicant *wpa_s, const u8 *addr, |
| 30 | const u8 *ies, size_t ie_len); |
| 31 | void wpa_supplicant_mesh_add_scan_ie(struct wpa_supplicant *wpa_s, |
| 32 | struct wpabuf **extra_ie); |
| 33 | |
| 34 | #else /* CONFIG_MESH */ |
| 35 | |
| 36 | static inline void wpa_mesh_notify_peer(struct wpa_supplicant *wpa_s, |
| 37 | const u8 *addr, |
| 38 | const u8 *ies, size_t ie_len) |
| 39 | { |
| 40 | } |
| 41 | |
| 42 | static inline void wpa_supplicant_mesh_add_scan_ie(struct wpa_supplicant *wpa_s, |
| 43 | struct wpabuf **extra_ie) |
| 44 | { |
| 45 | } |
| 46 | |
| 47 | #endif /* CONFIG_MESH */ |
| 48 | |
| 49 | #endif /* MESH_H */ |