nRF Connect SDK API 2.8.99
Loading...
Searching...
No Matches
conn_ctx.h File Reference
#include <zephyr/kernel.h>
#include <zephyr/sys/__assert.h>
#include <zephyr/bluetooth/conn.h>

Go to the source code of this file.

Data Structures

struct  bt_conn_ctx
 Context data for a connection. More...
 
struct  bt_conn_ctx_lib
 Bluetooth connection context library structure. More...
 

Macros

#define BT_CONN_CTX_DEF(_name, _max_clients, _ctx_sz)
 Macro for defining a Bluetooth connection context library instance.
 

Functions

static size_t bt_conn_ctx_block_size_get (struct bt_conn_ctx_lib *ctx_lib)
 Get the block size.
 
static size_t bt_conn_ctx_count (struct bt_conn_ctx_lib *ctx_lib)
 Get the number of connection contexts that are managed by the library.
 
void * bt_conn_ctx_alloc (struct bt_conn_ctx_lib *ctx_lib, struct bt_conn *conn)
 Allocate memory for the connection context data.
 
int bt_conn_ctx_free (struct bt_conn_ctx_lib *ctx_lib, struct bt_conn *conn)
 Free the allocated memory for a connection.
 
void bt_conn_ctx_free_all (struct bt_conn_ctx_lib *ctx_lib)
 Free all allocated context data.
 
void * bt_conn_ctx_get (struct bt_conn_ctx_lib *ctx_lib, struct bt_conn *conn)
 Get the context data of a connection from the memory pool.
 
const struct bt_conn_ctxbt_conn_ctx_get_by_id (struct bt_conn_ctx_lib *ctx_lib, uint8_t id)
 Get a specific connection context from the memory pool.
 
void bt_conn_ctx_release (struct bt_conn_ctx_lib *ctx_lib, void *data)
 Release a connection context from the memory pool.