Zephyr API Documentation 4.0.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
wifi_nm.h
Go to the documentation of this file.
1
8/*
9 * Copyright (c) 2023 Nordic Semiconductor ASA.
10 *
11 * SPDX-License-Identifier: Apache-2.0
12 */
13
14#ifndef ZEPHYR_INCLUDE_ZEPHYR_NET_WIFI_NM_H_
15#define ZEPHYR_INCLUDE_ZEPHYR_NET_WIFI_NM_H_
16
17#include <zephyr/kernel.h>
18#include <zephyr/types.h>
20#include <zephyr/net/net_if.h>
31#ifdef __cplusplus
32extern "C" {
33#endif
34
42
48 unsigned char type;
50 struct net_if *iface;
51};
52
58 const char *name;
60 const struct wifi_mgmt_ops *ops;
62 struct wifi_nm_mgd_iface mgd_ifaces[CONFIG_WIFI_NM_MAX_MANAGED_INTERFACES];
63};
64
67#define WIFI_NM_NAME(name) wifi_nm_##name
68
69#define DEFINE_WIFI_NM_INSTANCE(_name, _ops) \
70 static STRUCT_SECTION_ITERABLE(wifi_nm_instance, WIFI_NM_NAME(_name)) = { \
71 .name = STRINGIFY(_name), \
72 .ops = _ops, \
73 .mgd_ifaces = {}, \
74 }
75
85
93
100unsigned char wifi_nm_get_type_iface(struct net_if *iface);
101
110bool wifi_nm_iface_is_sta(struct net_if *iface);
111
120bool wifi_nm_iface_is_sap(struct net_if *iface);
121
134
148 enum wifi_nm_iface_type type, struct net_if *iface);
149
159
164#ifdef __cplusplus
165}
166#endif
167#endif /* ZEPHYR_INCLUDE_ZEPHYR_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:36
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_STA
IEEE 802.11 Wi-Fi Station.
Definition wifi_nm.h:38
@ WIFI_TYPE_SAP
IEEE 802.11 Wi-Fi Soft AP.
Definition wifi_nm.h:40
Public kernel APIs.
Public API for network interface.
Network Interface structure.
Definition net_if.h:680
Wi-Fi management API.
Definition wifi_mgmt.h:1206
WiFi Network manager instance.
Definition wifi_nm.h:56
struct wifi_nm_mgd_iface mgd_ifaces[CONFIG_WIFI_NM_MAX_MANAGED_INTERFACES]
List of Managed interfaces.
Definition wifi_nm.h:62
const struct wifi_mgmt_ops * ops
Wi-Fi Management operations.
Definition wifi_nm.h:60
const char * name
Name of the Network manager instance.
Definition wifi_nm.h:58
WiFi Network Managed interfaces.
Definition wifi_nm.h:46
struct net_if * iface
Managed net interfaces.
Definition wifi_nm.h:50
unsigned char type
Wi-Fi interface type.
Definition wifi_nm.h:48
WiFi L2 stack public header.