Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
wifi_nm.h
Go to the documentation of this file.
1
8
9/*
10 * Copyright (c) 2023 Nordic Semiconductor ASA.
11 *
12 * SPDX-License-Identifier: Apache-2.0
13 */
14
15#ifndef ZEPHYR_INCLUDE_NET_WIFI_NM_H_
16#define ZEPHYR_INCLUDE_NET_WIFI_NM_H_
17
18#include <zephyr/kernel.h>
19#include <zephyr/types.h>
21#include <zephyr/net/net_if.h>
31
32#ifdef __cplusplus
33extern "C" {
34#endif
35
45
51 unsigned char type;
53 struct net_if *iface;
54};
55
61 const char *name;
63 const struct wifi_mgmt_ops *ops;
65 struct wifi_nm_mgd_iface mgd_ifaces[CONFIG_WIFI_NM_MAX_MANAGED_INTERFACES];
66};
67
69
70#define WIFI_NM_NAME(name) wifi_nm_##name
71
72#define DEFINE_WIFI_NM_INSTANCE(_name, _ops) \
73 static STRUCT_SECTION_ITERABLE(wifi_nm_instance, WIFI_NM_NAME(_name)) = { \
74 .name = STRINGIFY(_name), \
75 .ops = _ops, \
76 .mgd_ifaces = {}, \
77 }
78
80
88
96
103unsigned char wifi_nm_get_type_iface(struct net_if *iface);
104
113bool wifi_nm_iface_is_sta(struct net_if *iface);
114
123bool wifi_nm_iface_is_sap(struct net_if *iface);
124
137
151 enum wifi_nm_iface_type type, struct net_if *iface);
152
162
166
167#ifdef __cplusplus
168}
169#endif
170#endif /* ZEPHYR_INCLUDE_NET_WIFI_NM_H_ */
int wifi_nm_register_mgd_iface(struct wifi_nm_instance *nm, struct net_if *iface)
Register a managed interface.
int wifi_nm_unregister_mgd_iface(struct wifi_nm_instance *nm, struct net_if *iface)
Unregister managed interface.
unsigned char wifi_nm_get_type_iface(struct net_if *iface)
Get a Wi-Fi type for a given interface.
struct wifi_nm_instance * wifi_nm_get_instance(const char *name)
Get a Network manager instance for a given name.
struct wifi_nm_instance * wifi_nm_get_instance_iface(struct net_if *iface)
Get a Network manager instance for a given interface.
bool wifi_nm_iface_is_sap(struct net_if *iface)
Check if the interface is a Wi-Fi Soft AP interface.
bool wifi_nm_iface_is_sta(struct net_if *iface)
Check if the interface is a Wi-Fi station interface.
wifi_nm_iface_type
Types of Wi-Fi interface.
Definition wifi_nm.h:37
int wifi_nm_register_mgd_type_iface(struct wifi_nm_instance *nm, enum wifi_nm_iface_type type, struct net_if *iface)
Register a managed interface.
@ WIFI_TYPE_MAX
MAX of Wi-Fi interface type.
Definition wifi_nm.h:43
@ WIFI_TYPE_STA
IEEE 802.11 Wi-Fi Station.
Definition wifi_nm.h:39
@ WIFI_TYPE_SAP
IEEE 802.11 Wi-Fi Soft AP.
Definition wifi_nm.h:41
Public kernel APIs.
Public API for network interface.
Network Interface structure.
Definition net_if.h:764
Wi-Fi management API.
Definition wifi_mgmt.h:1975
WiFi Network manager instance.
Definition wifi_nm.h:59
struct wifi_nm_mgd_iface mgd_ifaces[CONFIG_WIFI_NM_MAX_MANAGED_INTERFACES]
List of Managed interfaces.
Definition wifi_nm.h:65
const struct wifi_mgmt_ops * ops
Wi-Fi Management operations.
Definition wifi_nm.h:63
const char * name
Name of the Network manager instance.
Definition wifi_nm.h:61
WiFi Network Managed interfaces.
Definition wifi_nm.h:49
struct net_if * iface
Managed net interfaces.
Definition wifi_nm.h:53
unsigned char type
Wi-Fi interface type.
Definition wifi_nm.h:51
Iterable sections helpers.
WiFi L2 stack public header.