Home
last modified time | relevance | path

Searched full:net_buf (Results 1 – 25 of 619) sorted by relevance

12345678910>>...25

/Zephyr-latest/subsys/bluetooth/audio/
Dbap_base.c23 #include <zephyr/net_buf.h>
51 static uint32_t base_pull_pd(struct net_buf_simple *net_buf) in base_pull_pd() argument
53 return net_buf_simple_pull_le24(net_buf); in base_pull_pd()
56 static uint8_t base_pull_bis_count(struct net_buf_simple *net_buf) in base_pull_bis_count() argument
58 return net_buf_simple_pull_u8(net_buf); in base_pull_bis_count()
61 static void base_pull_codec_id(struct net_buf_simple *net_buf, in base_pull_codec_id() argument
66 codec.id = net_buf_simple_pull_u8(net_buf); /* coding format */ in base_pull_codec_id()
67 codec.cid = net_buf_simple_pull_le16(net_buf); /* company id */ in base_pull_codec_id()
68 codec.vid = net_buf_simple_pull_le16(net_buf); /* VS codec id */ in base_pull_codec_id()
75 static uint8_t base_pull_ltv(struct net_buf_simple *net_buf, uint8_t **data) in base_pull_ltv() argument
[all …]
/Zephyr-latest/subsys/bluetooth/controller/hci/
Dhci_internal.h36 struct net_buf *hci_cmd_handle(struct net_buf *cmd, void **node_rx);
37 void hci_evt_encode(struct node_rx_pdu *node_rx, struct net_buf *buf);
40 struct net_buf *buf);
42 void hci_num_cmplt_encode(struct net_buf *buf, uint16_t handle, uint8_t num);
43 int hci_acl_handle(struct net_buf *acl, struct net_buf **evt);
44 void hci_acl_encode(struct node_rx_pdu *node_rx, struct net_buf *buf);
45 int hci_iso_handle(struct net_buf *acl, struct net_buf **evt);
46 void hci_iso_encode(struct net_buf *buf, uint16_t handle, uint8_t flags);
47 int hci_vendor_cmd_handle(uint16_t ocf, struct net_buf *cmd,
48 struct net_buf **evt);
[all …]
/Zephyr-latest/subsys/bluetooth/host/
Dhci_core.h398 struct net_buf *sent_cmd;
441 int bt_hci_recv(const struct device *dev, struct net_buf *buf);
456 void bt_hci_cmd_state_set_init(struct net_buf *buf,
484 int bt_send(struct net_buf *buf);
498 void bt_hci_host_num_completed_packets(struct net_buf *buf);
501 void bt_hci_pin_code_req(struct net_buf *buf);
502 void bt_hci_link_key_notify(struct net_buf *buf);
503 void bt_hci_link_key_req(struct net_buf *buf);
504 void bt_hci_io_capa_resp(struct net_buf *buf);
505 void bt_hci_io_capa_req(struct net_buf *buf);
[all …]
Ddirection_internal.h10 int hci_df_prepare_connectionless_iq_report(struct net_buf *buf,
13 int hci_df_vs_prepare_connectionless_iq_report(struct net_buf *buf,
16 int hci_df_prepare_connection_iq_report(struct net_buf *buf,
19 int hci_df_vs_prepare_connection_iq_report(struct net_buf *buf,
22 int hci_df_prepare_conn_cte_req_failed(struct net_buf *buf,
Dhci_common.c12 struct net_buf *bt_hci_evt_create(uint8_t evt, uint8_t len) in bt_hci_evt_create()
15 struct net_buf *buf; in bt_hci_evt_create()
28 struct net_buf *bt_hci_cmd_complete_create(uint16_t op, uint8_t plen) in bt_hci_cmd_complete_create()
30 struct net_buf *buf; in bt_hci_cmd_complete_create()
42 struct net_buf *bt_hci_cmd_status_create(uint16_t op, uint8_t status) in bt_hci_cmd_status_create()
44 struct net_buf *buf; in bt_hci_cmd_status_create()
Diso_internal.h18 #include <zephyr/net_buf.h>
85 void hci_iso(struct net_buf *buf);
88 struct net_buf *bt_iso_get_rx(k_timeout_t timeout);
101 void hci_le_cis_established(struct net_buf *buf);
102 void hci_le_cis_established_v2(struct net_buf *buf);
105 void hci_le_cis_req(struct net_buf *buf);
108 void hci_le_big_complete(struct net_buf *buf);
111 void hci_le_big_terminate(struct net_buf *buf);
114 void hci_le_big_sync_established(struct net_buf *buf);
117 void hci_le_big_sync_lost(struct net_buf *buf);
[all …]
Dbuf_view.h14 #include <zephyr/net_buf.h>
18 struct net_buf *parent;
56 struct net_buf *bt_buf_make_view(struct net_buf *view,
57 struct net_buf *parent,
68 bool bt_buf_has_view(const struct net_buf *parent);
83 void bt_buf_destroy_view(struct net_buf *view, struct bt_buf_view_meta *meta);
/Zephyr-latest/tests/bluetooth/host/cs/mocks/
Dnet_buf.c8 #include <zephyr/net_buf.h>
10 #include "mocks/net_buf.h"
14 DEFINE_FAKE_VOID_FUNC(net_buf_unref, struct net_buf *);
15 DEFINE_FAKE_VOID_FUNC(net_buf_reset, struct net_buf *);
16 DEFINE_FAKE_VOID_FUNC(net_buf_slist_put, sys_slist_t *, struct net_buf *);
17 DEFINE_FAKE_VALUE_FUNC(struct net_buf *, net_buf_alloc_fixed, struct net_buf_pool *, k_timeout_t);
Dnet_buf.h9 #include <zephyr/net_buf.h>
18 DECLARE_FAKE_VOID_FUNC(net_buf_unref, struct net_buf *);
19 DECLARE_FAKE_VOID_FUNC(net_buf_reset, struct net_buf *);
20 DECLARE_FAKE_VOID_FUNC(net_buf_slist_put, sys_slist_t *, struct net_buf *);
21 DECLARE_FAKE_VALUE_FUNC(struct net_buf *, net_buf_alloc_fixed, struct net_buf_pool *, k_timeout_t);
Dhci_core.c12 DEFINE_FAKE_VALUE_FUNC(struct net_buf *, bt_hci_cmd_create, uint16_t, uint8_t);
13 DEFINE_FAKE_VALUE_FUNC(int, bt_hci_cmd_send_sync, uint16_t, struct net_buf *, struct net_buf **);
/Zephyr-latest/doc/services/net_buf/
Dindex.rst16 defined in :zephyr_file:`include/zephyr/net_buf.h`:.
75 void *net_buf_add(struct net_buf *buf, size_t len);
76 void *net_buf_add_mem(struct net_buf *buf, const void *mem, size_t len);
77 uint8_t *net_buf_add_u8(struct net_buf *buf, uint8_t value);
78 void net_buf_add_le16(struct net_buf *buf, uint16_t value);
79 void net_buf_add_le32(struct net_buf *buf, uint32_t value);
88 void *net_buf_remove_mem(struct net_buf *buf, size_t len);
89 uint8_t net_buf_remove_u8(struct net_buf *buf);
90 uint16_t net_buf_remove_le16(struct net_buf *buf);
91 uint32_t net_buf_remove_le32(struct net_buf *buf);
[all …]
/Zephyr-latest/lib/net_buf/
Dbuf.c9 #define LOG_MODULE_NAME net_buf
21 #include <zephyr/net_buf.h>
62 int net_buf_id(const struct net_buf *buf) in net_buf_id()
65 size_t struct_size = ROUND_UP(sizeof(struct net_buf) + pool->user_data_size, in net_buf_id()
66 __alignof__(struct net_buf)); in net_buf_id()
72 static inline struct net_buf *pool_get_uninit(struct net_buf_pool *pool, in pool_get_uninit()
75 size_t struct_size = ROUND_UP(sizeof(struct net_buf) + pool->user_data_size, in pool_get_uninit()
76 __alignof__(struct net_buf)); in pool_get_uninit()
78 struct net_buf *buf; in pool_get_uninit()
80 buf = (struct net_buf *)(((uint8_t *)pool->__bufs) + byte_offset); in pool_get_uninit()
[all …]
DKconfig6 menuconfig NET_BUF config
12 if NET_BUF
20 module = NET_BUF
21 module-str = net_buf
62 endif # NET_BUF
/Zephyr-latest/tests/bluetooth/host/conn/mocks/
Dbuf_view.c11 DEFINE_FAKE_VALUE_FUNC(bool, bt_buf_has_view, const struct net_buf *);
12 DEFINE_FAKE_VALUE_FUNC(struct net_buf *, bt_buf_make_view, struct net_buf *, struct net_buf *,
14 DEFINE_FAKE_VOID_FUNC(bt_buf_destroy_view, struct net_buf *, struct bt_buf_view_meta *);
Dbuf_view.h15 DECLARE_FAKE_VALUE_FUNC(bool, bt_buf_has_view, const struct net_buf *);
16 DECLARE_FAKE_VALUE_FUNC(struct net_buf *, bt_buf_make_view, struct net_buf *, struct net_buf *,
18 DECLARE_FAKE_VOID_FUNC(bt_buf_destroy_view, struct net_buf *, struct bt_buf_view_meta *);
Dhci_core.c14 DEFINE_FAKE_VALUE_FUNC(struct net_buf *, bt_hci_cmd_create, uint16_t, uint8_t);
15 DEFINE_FAKE_VALUE_FUNC(int, bt_hci_cmd_send_sync, uint16_t, struct net_buf *, struct net_buf **);
20 DEFINE_FAKE_VALUE_FUNC(int, bt_send, struct net_buf *);
22 DEFINE_FAKE_VOID_FUNC(bt_acl_set_ncp_sent, struct net_buf *, bool);
Dhci_core.h27 DECLARE_FAKE_VALUE_FUNC(struct net_buf *, bt_hci_cmd_create, uint16_t, uint8_t);
28 DECLARE_FAKE_VALUE_FUNC(int, bt_hci_cmd_send_sync, uint16_t, struct net_buf *, struct net_buf **);
33 DECLARE_FAKE_VALUE_FUNC(int, bt_send, struct net_buf *);
35 DECLARE_FAKE_VOID_FUNC(bt_acl_set_ncp_sent, struct net_buf *, bool);
/Zephyr-latest/include/zephyr/mgmt/mcumgr/smp/
Dsmp_client.h11 #include <zephyr/net_buf.h>
55 * @param nb net_buf for response
61 typedef int (*smp_client_res_fn)(struct net_buf *nb, void *user_data);
66 * @param nb response net_buf
72 int smp_client_single_response(struct net_buf *nb, const struct smp_hdr *res_hdr);
83 * @return A newly-allocated buffer net_buf on success
86 struct net_buf *smp_client_buf_allocation(struct smp_client_object *smp_client, uint16_t group,
92 * @param nb The net_buf to free.
94 void smp_client_buf_free(struct net_buf *nb);
100 * @param nb net_buf packet for send
[all …]
Dsmp.h29 #include <zephyr/net_buf.h>
48 struct net_buf *nb;
56 struct net_buf *nb;
66 * @brief Allocates a net_buf for holding an mcumgr request or response.
68 * @return A newly-allocated buffer net_buf on success;
71 struct net_buf *smp_packet_alloc(void);
74 * @brief Frees an mcumgr net_buf
76 * @param nb The net_buf to free.
78 void smp_packet_free(struct net_buf *nb);
/Zephyr-latest/include/zephyr/mgmt/mcumgr/transport/
Dsmp.h26 struct net_buf;
31 * The supplied net_buf is always consumed, regardless of return code.
33 * @param nb The net_buf to transmit.
37 typedef int (*smp_transport_out_fn)(struct net_buf *nb);
42 * The supplied net_buf should contain a request received from the peer whose
43 * MTU is being queried. This function takes a net_buf parameter because some
44 * transports store connection-specific information in the net_buf user header
52 typedef uint16_t (*smp_transport_get_mtu_fn)(const struct net_buf *nb);
57 * The supplied src net_buf should contain a user_data that cannot be copied
58 * using regular memcpy function (e.g., the BLE transport net_buf user_data
[all …]
/Zephyr-latest/subsys/bluetooth/host/classic/
Dat.h76 typedef int (*at_resp_cb_t)(struct at_client *at, struct net_buf *buf);
86 typedef int (*handle_parse_input_t)(struct at_client *at, struct net_buf *buf);
87 typedef int (*handle_cmd_input_t)(struct at_client *at, struct net_buf *buf,
107 /* This parsing will only works for non-fragmented net_buf */
108 int at_parse_input(struct at_client *at, struct net_buf *buf);
109 /* This command parsing will only works for non-fragmented net_buf */
110 int at_parse_cmd_input(struct at_client *at, struct net_buf *buf,
113 int at_check_byte(struct net_buf *buf, char check_byte);
/Zephyr-latest/tests/bluetooth/hci_prop_evt/src/
Dmain.c43 void (*handler)(struct net_buf *buf, struct net_buf **evt,
47 /* Add event to net_buf. */
48 static void evt_create(struct net_buf *buf, uint8_t evt, uint8_t len) in evt_create()
58 static void *cmd_complete(struct net_buf **buf, uint8_t plen, uint16_t opcode) in cmd_complete()
71 static int cmd_handle_helper(uint16_t opcode, struct net_buf *cmd, in cmd_handle_helper()
72 struct net_buf **evt, in cmd_handle_helper()
94 struct net_buf *cmd, in cmd_handle()
99 struct net_buf *evt = NULL; in cmd_handle()
123 static void generic_success(struct net_buf *buf, struct net_buf **evt, in generic_success()
137 static void read_local_features(struct net_buf *buf, struct net_buf **evt, in read_local_features()
[all …]
/Zephyr-latest/tests/bsim/bluetooth/host/att/sequential/tester/src/
Dmain.c11 #include <zephyr/net_buf.h>
60 static struct net_buf *cmd_rsp;
62 struct net_buf *bt_hci_cmd_create(uint16_t opcode, uint8_t param_len) in bt_hci_cmd_create()
65 struct net_buf *buf; in bt_hci_cmd_create()
85 static void handle_cmd_complete(struct net_buf *buf) in handle_cmd_complete()
133 static void handle_meta_event(struct net_buf *buf) in handle_meta_event()
156 static void handle_ncp(struct net_buf *buf) in handle_ncp()
175 static void handle_att_notification(struct net_buf *buf) in handle_att_notification()
187 struct net_buf *alloc_l2cap_pdu(void);
188 static void send_l2cap_packet(struct net_buf *buf, uint16_t cid);
[all …]
/Zephyr-latest/include/zephyr/
Dnet_buf.h25 * @defgroup net_buf Network Buffer Library
79 * This is a simpler variant of the net_buf object (in fact net_buf uses
85 * net_buf isn't needed and causes too much overhead. This could be e.g.
992 * explicitly set or unset by the net_buf API user. Such net_buf is
995 * count going to 0 will free the net_buf but no the data pointer in it.
1006 struct net_buf { struct
1011 struct net_buf *frags; argument
1059 uint8_t * __must_check (*alloc)(struct net_buf *buf, size_t *size,
1061 uint8_t * __must_check (*ref)(struct net_buf *buf, uint8_t *data);
1062 void (*unref)(struct net_buf *buf, uint8_t *data);
[all …]
/Zephyr-latest/tests/bsim/bluetooth/host/att/pipeline/tester/src/
Dmain.c11 #include <zephyr/net_buf.h>
50 typedef void (*att_handler_t)(struct net_buf *buf);
64 static struct net_buf *cmd_rsp;
66 struct net_buf *bt_hci_cmd_create(uint16_t opcode, uint8_t param_len) in bt_hci_cmd_create()
69 struct net_buf *buf; in bt_hci_cmd_create()
89 static void handle_cmd_complete(struct net_buf *buf) in handle_cmd_complete()
137 static void handle_meta_event(struct net_buf *buf) in handle_meta_event()
160 static void handle_ncp(struct net_buf *buf) in handle_ncp()
179 static void handle_att_notification(struct net_buf *buf) in handle_att_notification()
191 struct net_buf *alloc_l2cap_pdu(void);
[all …]

12345678910>>...25