Lines Matching full:binding
53 int (*connect)(struct conn_mgr_conn_binding *const binding);
64 int (*disconnect)(struct conn_mgr_conn_binding *const binding);
76 void (*init)(struct conn_mgr_conn_binding *const binding);
96 int (*set_opt)(struct conn_mgr_conn_binding *const binding,
114 int (*get_opt)(struct conn_mgr_conn_binding *const binding,
157 * @brief Connectivity Manager network interface binding structure
201 /* Internal-use mutex for protecting access to the binding and API functions. */
235 * @brief Retrieves the conn_mgr binding struct for a provided iface if it exists.
241 * @param iface - bound network interface to obtain the binding struct for.
242 * @return struct conn_mgr_conn_binding* Pointer to the retrieved binding struct if it exists,
247 STRUCT_SECTION_FOREACH(conn_mgr_conn_binding, binding) { in conn_mgr_if_get_binding()
248 if (iface == binding->iface) { in conn_mgr_if_get_binding()
249 if (binding->impl->api) { in conn_mgr_if_get_binding()
250 return binding; in conn_mgr_if_get_binding()
259 * @brief Lock the passed-in binding, making it safe to access.
261 * Call this whenever accessing binding data, unless inside a conn_mgr_conn_api callback, where it
268 * @param binding - Binding to lock
270 static inline void conn_mgr_binding_lock(struct conn_mgr_conn_binding *binding) in conn_mgr_binding_lock() argument
272 (void)k_mutex_lock(binding->mutex, K_FOREVER); in conn_mgr_binding_lock()
276 * @brief Unlocks the passed-in binding.
278 * Call this after any call to @ref conn_mgr_binding_lock once done accessing binding data.
284 * @param binding - Binding to unlock
286 static inline void conn_mgr_binding_unlock(struct conn_mgr_conn_binding *binding) in conn_mgr_binding_unlock() argument
288 (void)k_mutex_unlock(binding->mutex); in conn_mgr_binding_unlock()
292 * @brief Set the value of the specified connectivity flag for the provided binding
298 * @param binding The binding to check
302 static inline void conn_mgr_binding_set_flag(struct conn_mgr_conn_binding *binding, in conn_mgr_binding_set_flag() argument
305 conn_mgr_binding_lock(binding); in conn_mgr_binding_set_flag()
307 binding->flags &= ~BIT(flag); in conn_mgr_binding_set_flag()
309 binding->flags |= BIT(flag); in conn_mgr_binding_set_flag()
312 conn_mgr_binding_unlock(binding); in conn_mgr_binding_set_flag()
316 * @brief Check the value of the specified connectivity flag for the provided binding
322 * @param binding The binding to check
326 static inline bool conn_mgr_binding_get_flag(struct conn_mgr_conn_binding *binding, in conn_mgr_binding_get_flag() argument
331 conn_mgr_binding_lock(binding); in conn_mgr_binding_get_flag()
333 value = !!(binding->flags & BIT(flag)); in conn_mgr_binding_get_flag()
335 conn_mgr_binding_unlock(binding); in conn_mgr_binding_get_flag()