Zephyr API Documentation 4.0.0-rc2
A Scalable Open Source RTOS
|
Connection Manager Connectivity Implementation API . More...
Data Structures | |
struct | conn_mgr_conn_api |
Connectivity Manager Connectivity API structure. More... | |
struct | conn_mgr_conn_impl |
Connectivity Implementation struct. More... | |
struct | conn_mgr_conn_binding |
Connectivity Manager network interface binding structure. More... | |
Macros | |
#define | CONN_MGR_CONN_DEFINE(conn_id, conn_api) |
Define a conn_mgr connectivity implementation that can be bound to network devices. | |
#define | CONN_MGR_CONN_DECLARE_PUBLIC(conn_id) |
Helper macro to make a conn_mgr connectivity implementation publicly available. | |
#define | CONN_MGR_BIND_CONN_INST(dev_id, inst, conn_id) |
Associate a connectivity implementation with an existing network device instance. | |
#define | CONN_MGR_BIND_CONN(dev_id, conn_id) |
Associate a connectivity implementation with an existing network device. | |
Functions | |
static struct conn_mgr_conn_binding * | conn_mgr_if_get_binding (struct net_if *iface) |
Retrieves the conn_mgr binding struct for a provided iface if it exists. | |
static void | conn_mgr_binding_lock (struct conn_mgr_conn_binding *binding) |
Lock the passed-in binding, making it safe to access. | |
static void | conn_mgr_binding_unlock (struct conn_mgr_conn_binding *binding) |
Unlocks the passed-in binding. | |
static void | conn_mgr_binding_set_flag (struct conn_mgr_conn_binding *binding, enum conn_mgr_if_flag flag, bool value) |
Set the value of the specified connectivity flag for the provided binding. | |
static bool | conn_mgr_binding_get_flag (struct conn_mgr_conn_binding *binding, enum conn_mgr_if_flag flag) |
Check the value of the specified connectivity flag for the provided binding. | |
Connection Manager Connectivity Implementation API .
#define CONN_MGR_BIND_CONN | ( | dev_id, | |
conn_id ) |
#include <zephyr/net/conn_mgr_connectivity_impl.h>
Associate a connectivity implementation with an existing network device.
dev_id | Network device id. |
conn_id | Name of the connectivity implementation to associate. |
#define CONN_MGR_BIND_CONN_INST | ( | dev_id, | |
inst, | |||
conn_id ) |
#include <zephyr/net/conn_mgr_connectivity_impl.h>
Associate a connectivity implementation with an existing network device instance.
dev_id | Network device id. |
inst | Network device instance. |
conn_id | Name of the connectivity implementation to associate. |
#define CONN_MGR_CONN_DECLARE_PUBLIC | ( | conn_id | ) |
#include <zephyr/net/conn_mgr_connectivity_impl.h>
Helper macro to make a conn_mgr connectivity implementation publicly available.
#define CONN_MGR_CONN_DEFINE | ( | conn_id, | |
conn_api ) |
#include <zephyr/net/conn_mgr_connectivity_impl.h>
Define a conn_mgr connectivity implementation that can be bound to network devices.
conn_id | The name of the new connectivity implementation |
conn_api | A pointer to a conn_mgr_conn_api struct |
|
inlinestatic |
#include <zephyr/net/conn_mgr_connectivity_impl.h>
Check the value of the specified connectivity flag for the provided binding.
Can be used from any thread or callback without calling conn_mgr_binding_lock.
For use only by connectivity implementations
binding | The binding to check |
flag | The flag to check |
|
inlinestatic |
#include <zephyr/net/conn_mgr_connectivity_impl.h>
Lock the passed-in binding, making it safe to access.
Call this whenever accessing binding data, unless inside a conn_mgr_conn_api callback, where it is called automatically by conn_mgr.
Reentrant.
For use only by connectivity implementations.
binding | - Binding to lock |
|
inlinestatic |
#include <zephyr/net/conn_mgr_connectivity_impl.h>
Set the value of the specified connectivity flag for the provided binding.
Can be used from any thread or callback without calling conn_mgr_binding_lock.
For use only by connectivity implementations
binding | The binding to check |
flag | The flag to check |
value | New value for the specified flag |
|
inlinestatic |
#include <zephyr/net/conn_mgr_connectivity_impl.h>
Unlocks the passed-in binding.
Call this after any call to conn_mgr_binding_lock once done accessing binding data.
Reentrant.
For use only by connectivity implementations.
binding | - Binding to unlock |
|
inlinestatic |
#include <zephyr/net/conn_mgr_connectivity_impl.h>
Retrieves the conn_mgr binding struct for a provided iface if it exists.
Bindings for connectivity implementations with missing API structs are ignored.
For use only by connectivity implementations.
iface | - bound network interface to obtain the binding struct for. |