| 
    Zephyr Project API 3.5.0
    
   A Scalable Open Source RTOS 
   | 
 
Connection Manager Connectivity API. More...
Macros | |
| #define | NET_EVENT_CONN_IF_TIMEOUT (_NET_MGMT_CONN_IF_EVENT | NET_EVENT_CONN_CMD_IF_TIMEOUT) | 
| net_mgmt event raised when a connection attempt times out   | |
| #define | NET_EVENT_CONN_IF_FATAL_ERROR (_NET_MGMT_CONN_IF_EVENT | NET_EVENT_CONN_CMD_IF_FATAL_ERROR) | 
| net_mgmt event raised when a non-recoverable connectivity error occurs on an iface   | |
| #define | CONN_MGR_IF_NO_TIMEOUT 0 | 
| Value to use with conn_mgr_if_set_timeout and conn_mgr_conn_binding::timeout to indicate no timeout.   | |
Enumerations | |
| enum | net_event_conn_cmd { NET_EVENT_CONN_CMD_IF_TIMEOUT = 1 , NET_EVENT_CONN_CMD_IF_FATAL_ERROR } | 
| enum | conn_mgr_if_flag { CONN_MGR_IF_PERSISTENT , CONN_MGR_IF_NO_AUTO_CONNECT , CONN_MGR_IF_NO_AUTO_DOWN } | 
| Per-iface connectivity flags.  More... | |
Functions | |
| int | conn_mgr_if_connect (struct net_if *iface) | 
| Connect interface.   | |
| int | conn_mgr_if_disconnect (struct net_if *iface) | 
| Disconnect interface.   | |
| bool | conn_mgr_if_is_bound (struct net_if *iface) | 
| Check whether the provided network interface supports connectivity / has been bound to a connectivity implementation.   | |
| int | conn_mgr_if_set_opt (struct net_if *iface, int optname, const void *optval, size_t optlen) | 
| Set implementation-specific connectivity options.   | |
| int | conn_mgr_if_get_opt (struct net_if *iface, int optname, void *optval, size_t *optlen) | 
| Get implementation-specific connectivity options.   | |
| bool | conn_mgr_if_get_flag (struct net_if *iface, enum conn_mgr_if_flag flag) | 
| Check the value of connectivity flags.   | |
| int | conn_mgr_if_set_flag (struct net_if *iface, enum conn_mgr_if_flag flag, bool value) | 
| Set the value of a connectivity flags.   | |
| int | conn_mgr_if_get_timeout (struct net_if *iface) | 
| Get the connectivity timeout for an iface.   | |
| int | conn_mgr_if_set_timeout (struct net_if *iface, int timeout) | 
| Set the connectivity timeout for an iface.   | |
Connection Manager Connectivity API.
| #define CONN_MGR_IF_NO_TIMEOUT 0 | 
#include <include/zephyr/net/conn_mgr_connectivity.h>
Value to use with conn_mgr_if_set_timeout and conn_mgr_conn_binding::timeout to indicate no timeout.
| #define NET_EVENT_CONN_IF_FATAL_ERROR (_NET_MGMT_CONN_IF_EVENT | NET_EVENT_CONN_CMD_IF_FATAL_ERROR) | 
#include <include/zephyr/net/conn_mgr_connectivity.h>
net_mgmt event raised when a non-recoverable connectivity error occurs on an iface
| #define NET_EVENT_CONN_IF_TIMEOUT (_NET_MGMT_CONN_IF_EVENT | NET_EVENT_CONN_CMD_IF_TIMEOUT) | 
#include <include/zephyr/net/conn_mgr_connectivity.h>
net_mgmt event raised when a connection attempt times out
| enum conn_mgr_if_flag | 
#include <include/zephyr/net/conn_mgr_connectivity.h>
Per-iface connectivity flags.
| enum net_event_conn_cmd | 
#include <include/zephyr/net/conn_mgr_connectivity.h>
| Enumerator | |
|---|---|
| NET_EVENT_CONN_CMD_IF_TIMEOUT | |
| NET_EVENT_CONN_CMD_IF_FATAL_ERROR | |
| int conn_mgr_if_connect | ( | struct net_if * | iface | ) | 
#include <include/zephyr/net/conn_mgr_connectivity.h>
Connect interface.
If the provided iface has been bound to a connectivity implementation, initiate network connect/association.
Automatically takes the iface admin-up (by calling net_if_up) if it isn't already.
Non-Blocking.
| iface | Pointer to network interface | 
| 0 | on success. | 
| -ESHUTDOWN | if the iface is not admin-up. | 
| -ENOTSUP | if the iface does not have a connectivity implementation. | 
| implementation-specific | status code otherwise. | 
| int conn_mgr_if_disconnect | ( | struct net_if * | iface | ) | 
#include <include/zephyr/net/conn_mgr_connectivity.h>
Disconnect interface.
If the provided iface has been bound to a connectivity implementation, disconnect/dissassociate it from the network, and cancel any pending attempts to connect/associate.
Does nothing if the iface is currently admin-down.
| iface | Pointer to network interface | 
| 0 | on success. | 
| -ENOTSUP | if the iface does not have a connectivity implementation. | 
| implementation-specific | status code otherwise. | 
| bool conn_mgr_if_get_flag | ( | struct net_if * | iface, | 
| enum conn_mgr_if_flag | flag | ||
| ) | 
#include <include/zephyr/net/conn_mgr_connectivity.h>
Check the value of connectivity flags.
If the provided iface is bound to a connectivity implementation, retrieves the value of the specified connectivity flag associated with that iface.
| iface | - Pointer to the network interface to check. | 
| flag | - The flag to check. | 
#include <include/zephyr/net/conn_mgr_connectivity.h>
Get implementation-specific connectivity options.
If the provided iface has been bound to a connectivity implementation that supports it, retrieves implementation-specific connectivity options related to the iface.
| iface | Pointer to the network interface. | 
| optname | Integer value representing the option to set. The meaning of values is up to the conn_mgr_conn_api implementation. Some settings may be shared by multiple ifaces. | 
| optval | Pointer to where the retrieved value should be stored. | 
| optlen | Pointer to length (in bytes) of the destination buffer available for storing the retrieved value. If the available space is less than what is needed, -ENOBUFS is returned. If the available space is invalid, -EINVAL is returned. | 
optlen will always be set to the total number of bytes written, regardless of whether an error is returned, even if zero bytes were written.
| 0 | if successful. | 
| -ENOTSUP | if conn_mgr_if_get_opt is not implemented by the iface. | 
| -ENOBUFS | if retrieval buffer is too small. | 
| -EINVAL | if invalid retrieval buffer length is provided, or if NULL optval or optlen pointer provided. | 
| -ENOPROTOOPT | if the optname is not recognized. | 
| implementation-specific | error code otherwise. | 
| int conn_mgr_if_get_timeout | ( | struct net_if * | iface | ) | 
#include <include/zephyr/net/conn_mgr_connectivity.h>
Get the connectivity timeout for an iface.
If the provided iface is bound to a connectivity implementation, retrieves the timeout setting in seconds for it.
| iface | - Pointer to the iface to check. | 
#include <include/zephyr/net/conn_mgr_connectivity.h>
Check whether the provided network interface supports connectivity / has been bound to a connectivity implementation.
| iface | Pointer to the iface to check. | 
| true | if connectivity is supported (a connectivity implementation has been bound). | 
| false | otherwise. | 
| int conn_mgr_if_set_flag | ( | struct net_if * | iface, | 
| enum conn_mgr_if_flag | flag, | ||
| bool | value | ||
| ) | 
#include <include/zephyr/net/conn_mgr_connectivity.h>
Set the value of a connectivity flags.
If the provided iface is bound to a connectivity implementation, sets the value of the specified connectivity flag associated with that iface.
| iface | - Pointer to the network interface to modify. | 
| flag | - The flag to set. | 
| value | - Whether the flag should be enabled or disabled. | 
| 0 | on success. | 
| -EINVAL | if the flag does not exist. | 
| -ENOTSUP | if the provided iface is not bound to a connectivity implementation. | 
#include <include/zephyr/net/conn_mgr_connectivity.h>
Set implementation-specific connectivity options.
If the provided iface has been bound to a connectivity implementation that supports it, implementation-specific connectivity options related to the iface.
| iface | Pointer to the network interface. | 
| optname | Integer value representing the option to set. The meaning of values is up to the conn_mgr_conn_api implementation. Some settings may affect multiple ifaces. | 
| optval | Pointer to the value to be assigned to the option. | 
| optlen | Length (in bytes) of the value to be assigned to the option. | 
| 0 | if successful. | 
| -ENOTSUP | if conn_mgr_if_set_opt not implemented by the iface. | 
| -ENOBUFS | if optlen is too long. | 
| -EINVAL | if NULL optval pointer provided. | 
| -ENOPROTOOPT | if the optname is not recognized. | 
| implementation-specific | error code otherwise. | 
| int conn_mgr_if_set_timeout | ( | struct net_if * | iface, | 
| int | timeout | ||
| ) | 
#include <include/zephyr/net/conn_mgr_connectivity.h>
Set the connectivity timeout for an iface.
If the provided iface is bound to a connectivity implementation, sets the timeout setting in seconds for it.
| iface | - Pointer to the network interface to modify. | 
| timeout | - The timeout value to set (in seconds). Pass CONN_MGR_IF_NO_TIMEOUT to disable the timeout. | 
| 0 | on success. | 
| -ENOTSUP | if the provided iface is not bound to a connectivity implementation. |