Home
last modified time | relevance | path

Searched refs:buf (Results 1 – 25 of 358) sorted by relevance

12345678910>>...15

/hal_espressif-latest/components/wpa_supplicant/src/utils/
Dwpabuf.c29 static struct wpabuf_trace * wpabuf_get_trace(const struct wpabuf *buf) in wpabuf_get_trace() argument
32 ((const u8 *) buf - sizeof(struct wpabuf_trace)); in wpabuf_get_trace()
37 static void wpabuf_overflow(const struct wpabuf *buf, size_t len) in wpabuf_overflow() argument
40 struct wpabuf_trace *trace = wpabuf_get_trace(buf); in wpabuf_overflow()
47 buf, (unsigned long) buf->size, (unsigned long) buf->used, in wpabuf_overflow()
54 struct wpabuf *buf = *_buf; in wpabuf_resize() local
59 if (buf == NULL) { in wpabuf_resize()
65 trace = wpabuf_get_trace(buf); in wpabuf_resize()
73 if (buf->used + add_len > buf->size) { in wpabuf_resize()
75 if (buf->flags & WPABUF_FLAG_EXT_DATA) { in wpabuf_resize()
[all …]
/hal_espressif-latest/components/bt/esp_ble_mesh/mesh_common/include/
Dmesh_buf.h129 struct net_buf_simple buf; \
132 .buf.size = _size, \
133 .buf.__buf = NULL, \
145 static inline void net_buf_simple_init(struct net_buf_simple *buf, in net_buf_simple_init() argument
148 if (!buf->__buf) { in net_buf_simple_init()
149 buf->__buf = (uint8_t *)buf + sizeof(*buf); in net_buf_simple_init()
152 buf->data = buf->__buf + reserve_head; in net_buf_simple_init()
153 buf->len = 0; in net_buf_simple_init()
165 void net_buf_simple_init_with_data(struct net_buf_simple *buf,
175 static inline void net_buf_simple_reset(struct net_buf_simple *buf) in net_buf_simple_reset() argument
[all …]
/hal_espressif-latest/components/bt/esp_ble_mesh/mesh_common/
Dmesh_buf.c11 int net_buf_id(struct net_buf *buf) in net_buf_id() argument
13 struct net_buf_pool *pool = buf->pool; in net_buf_id()
15 return buf - pool->__bufs; in net_buf_id()
21 struct net_buf *buf = NULL; in pool_get_uninit() local
23 buf = &pool->__bufs[pool->buf_count - uninit_count]; in pool_get_uninit()
25 buf->pool = pool; in pool_get_uninit()
27 return buf; in pool_get_uninit()
36 void *net_buf_simple_add(struct net_buf_simple *buf, size_t len) in net_buf_simple_add() argument
38 uint8_t *tail = net_buf_simple_tail(buf); in net_buf_simple_add()
40 NET_BUF_SIMPLE_DBG("buf %p len %u", buf, len); in net_buf_simple_add()
[all …]
Dmesh_common.c49 struct net_buf_simple *buf = NULL; in bt_mesh_alloc_buf() local
52 buf = (struct net_buf_simple *)bt_mesh_calloc(sizeof(struct net_buf_simple) + size); in bt_mesh_alloc_buf()
53 if (!buf) { in bt_mesh_alloc_buf()
58 data = (uint8_t *)buf + sizeof(struct net_buf_simple); in bt_mesh_alloc_buf()
60 buf->data = data; in bt_mesh_alloc_buf()
61 buf->len = 0; in bt_mesh_alloc_buf()
62 buf->size = size; in bt_mesh_alloc_buf()
63 buf->__buf = data; in bt_mesh_alloc_buf()
65 return buf; in bt_mesh_alloc_buf()
68 void bt_mesh_free_buf(struct net_buf_simple *buf) in bt_mesh_free_buf() argument
[all …]
/hal_espressif-latest/components/wpa_supplicant/include/utils/
Dwpabuf.h29 u8 *buf; /* pointer to the head of the buffer */ member
35 int wpabuf_resize(struct wpabuf **buf, size_t add_len);
40 void wpabuf_free(struct wpabuf *buf);
41 void wpabuf_clear_free(struct wpabuf *buf);
42 void * wpabuf_put(struct wpabuf *buf, size_t len);
44 struct wpabuf * wpabuf_zeropad(struct wpabuf *buf, size_t len);
45 void wpabuf_printf(struct wpabuf *buf, const char *fmt, ...) PRINTF_FORMAT(2, 3);
53 static inline size_t wpabuf_size(const struct wpabuf *buf) in wpabuf_size() argument
55 return buf->size; in wpabuf_size()
63 static inline size_t wpabuf_len(const struct wpabuf *buf) in wpabuf_len() argument
[all …]
Dwpa_debug.h81 void wpa_hexdump(int level, const char *title, const u8 *buf, size_t len);
83 static inline void wpa_hexdump_ascii(int level, const char *title, const void *buf, size_t len) in wpa_hexdump_ascii() argument
85 wpa_hexdump(level, title, buf, len); in wpa_hexdump_ascii()
88 static inline void wpa_hexdump_ascii_key(int level, const char *title, const void *buf, size_t len) in wpa_hexdump_ascii_key() argument
90 wpa_hexdump(level, title, buf, len); in wpa_hexdump_ascii_key()
94 const struct wpabuf *buf) in wpa_hexdump_buf() argument
96 wpa_hexdump(level, title, wpabuf_head(buf), wpabuf_len(buf)); in wpa_hexdump_buf()
112 void wpa_hexdump_key(int level, const char *title, const u8 *buf, size_t len);
115 const struct wpabuf *buf) in wpa_hexdump_buf_key() argument
117 wpa_hexdump_key(level, title, wpabuf_head(buf), wpabuf_len(buf)); in wpa_hexdump_buf_key()
[all …]
/hal_espressif-latest/components/bt/host/bluedroid/bta/hf_client/
Dbta_hf_client_at.c113 static void bta_hf_client_queue_at(tBTA_HF_CLIENT_AT_CMD cmd, const char *buf, UINT16 buf_len) in bta_hf_client_queue_at() argument
123 memcpy(new_cmd->buf, buf, buf_len); in bta_hf_client_queue_at()
175 static void bta_hf_client_send_at(tBTA_HF_CLIENT_AT_CMD cmd, char *buf, UINT16 buf_len) in bta_hf_client_send_at() argument
183 APPL_TRACE_DEBUG("%s %.*s", __FUNCTION__, buf_len - 1, buf); in bta_hf_client_send_at()
195 PORT_WriteData(bta_hf_client_cb.scb.conn_handle, buf, buf_len, &len); in bta_hf_client_send_at()
202 bta_hf_client_queue_at(cmd, buf, buf_len); in bta_hf_client_send_at()
214 bta_hf_client_send_at(cur->cmd, cur->buf, cur->buf_len); in bta_hf_client_send_queued_at()
579 #define AT_CHECK_EVENT(buf, event) \ argument
580 if (strncmp("\r\n"event,buf,sizeof("\r\n"event) - 1) != 0) \
581 return buf; \
[all …]
/hal_espressif-latest/components/bt/esp_ble_mesh/mesh_core/
Dscan.c48 static bool adv_flags_valid(struct net_buf_simple *buf) in adv_flags_valid() argument
52 if (buf->len != 1U) { in adv_flags_valid()
53 BT_DBG("Unexpected adv flags length %d", buf->len); in adv_flags_valid()
57 flags = net_buf_simple_pull_u8(buf); in adv_flags_valid()
67 static bool adv_service_uuid_valid(struct net_buf_simple *buf, uint16_t *uuid) in adv_service_uuid_valid() argument
69 if (buf->len != 2U) { in adv_service_uuid_valid()
74 *uuid = net_buf_simple_pull_le16(buf); in adv_service_uuid_valid()
96 static void handle_adv_service_data(struct net_buf_simple *buf, in handle_adv_service_data() argument
102 if (!buf || !addr) { in handle_adv_service_data()
107 type = net_buf_simple_pull_le16(buf); in handle_adv_service_data()
[all …]
Dprov.c91 #define XACT_SEG_DATA(_seg) (&link.rx.buf->data[20 + ((_seg - 1) * 23)])
142 struct net_buf_simple *buf; member
153 struct net_buf *buf[3]; member
246 link.rx.buf = bt_mesh_proxy_server_get_buf(); in reset_state()
249 link.rx.buf = &rx_buf; in reset_state()
261 if (!link.tx.buf[0]) { in buf_sent()
278 for (i = 0; i < ARRAY_SIZE(link.tx.buf); i++) { in free_segments()
279 struct net_buf *buf = link.tx.buf[i]; in free_segments() local
281 if (!buf) { in free_segments()
285 link.tx.buf[i] = NULL; in free_segments()
[all …]
Dcfg_cli.c134 struct net_buf_simple buf = {0}; in cfg_client_recv_status() local
143 buf.data = (uint8_t *)status; in cfg_client_recv_status()
144 buf.len = (uint16_t)len; in cfg_client_recv_status()
148 node = bt_mesh_is_client_recv_publish_msg(model, ctx, &buf, true); in cfg_client_recv_status()
253 struct net_buf_simple *buf) in comp_data_status() argument
258 ctx->net_idx, ctx->app_idx, ctx->addr, buf->len, in comp_data_status()
259 bt_hex(buf->data, buf->len)); in comp_data_status()
261 status.page = net_buf_simple_pull_u8(buf); in comp_data_status()
262 status.comp_data = bt_mesh_alloc_buf(buf->len); in comp_data_status()
268 net_buf_simple_add_mem(status.comp_data, buf->data, buf->len); in comp_data_status()
[all …]
Dadv.c98 struct net_buf *buf; member
144 static inline int adv_send(struct net_buf *buf) in adv_send() argument
148 const struct bt_mesh_send_cb *cb = BLE_MESH_ADV(buf)->cb; in adv_send()
149 void *cb_data = BLE_MESH_ADV(buf)->cb_data; in adv_send()
155 BT_DBG("type %u len %u: %s", BLE_MESH_ADV(buf)->type, in adv_send()
156 buf->len, bt_hex(buf->data, buf->len)); in adv_send()
159 if (BLE_MESH_ADV(buf)->type != BLE_MESH_ADV_BLE) { in adv_send()
162 BLE_MESH_TRANSMIT_INT(BLE_MESH_ADV(buf)->xmit)); in adv_send()
163 duration = (BLE_MESH_TRANSMIT_COUNT(BLE_MESH_ADV(buf)->xmit) + 1) * in adv_send()
167 BLE_MESH_TRANSMIT_COUNT(BLE_MESH_ADV(buf)->xmit) + 1, adv_int, in adv_send()
[all …]
Dbeacon.c107 struct net_buf_simple *buf) in bt_mesh_beacon_create() argument
112 net_buf_simple_add_u8(buf, BEACON_TYPE_SECURE); in bt_mesh_beacon_create()
120 net_buf_simple_add_u8(buf, flags); in bt_mesh_beacon_create()
123 net_buf_simple_add_mem(buf, keys->net_id, 8); in bt_mesh_beacon_create()
126 net_buf_simple_add_be32(buf, bt_mesh.iv_index); in bt_mesh_beacon_create()
128 net_buf_simple_add_mem(buf, sub->auth, 8); in bt_mesh_beacon_create()
154 struct net_buf *buf; in secure_beacon_send() local
179 buf = bt_mesh_adv_create(BLE_MESH_ADV_BEACON, PROV_XMIT, in secure_beacon_send()
181 if (!buf) { in secure_beacon_send()
186 bt_mesh_beacon_create(sub, &buf->b); in secure_beacon_send()
[all …]
Dfriend.c31 #define FRIEND_ADV(buf) CONTAINER_OF(BLE_MESH_ADV(buf), struct friend_adv, adv) argument
132 struct net_buf *buf = NULL; in purge_buffers() local
134 buf = (void *)sys_slist_get_not_empty(list); in purge_buffers()
136 buf->frags = NULL; in purge_buffers()
137 buf->flags &= ~NET_BUF_FRAGS; in purge_buffers()
139 net_buf_unref(buf); in purge_buffers()
258 int bt_mesh_friend_clear(struct bt_mesh_net_rx *rx, struct net_buf_simple *buf) in bt_mesh_friend_clear() argument
260 struct bt_mesh_ctl_friend_clear *msg = (void *)buf->data; in bt_mesh_friend_clear()
271 if (buf->len < sizeof(*msg)) { in bt_mesh_friend_clear()
272 BT_WARN("Too short Friend Clear (len %d)", buf->len); in bt_mesh_friend_clear()
[all …]
Dcfg_srv.c43 static int comp_add_elem(struct net_buf_simple *buf, struct bt_mesh_elem *elem, in comp_add_elem() argument
49 if (net_buf_simple_tailroom(buf) < in comp_add_elem()
55 net_buf_simple_add_le16(buf, elem->loc); in comp_add_elem()
57 net_buf_simple_add_u8(buf, elem->model_count); in comp_add_elem()
58 net_buf_simple_add_u8(buf, elem->vnd_model_count); in comp_add_elem()
62 net_buf_simple_add_le16(buf, mod->id); in comp_add_elem()
67 net_buf_simple_add_le16(buf, mod->vnd.company); in comp_add_elem()
68 net_buf_simple_add_le16(buf, mod->vnd.id); in comp_add_elem()
74 static int comp_get_page_0(struct net_buf_simple *buf) in comp_get_page_0() argument
98 net_buf_simple_add_le16(buf, comp->cid); in comp_get_page_0()
[all …]
Dhealth_cli.c92 struct net_buf_simple buf = {0}; in health_client_recv_status() local
101 buf.data = (uint8_t *)status; in health_client_recv_status()
102 buf.len = (uint16_t)len; in health_client_recv_status()
106 node = bt_mesh_is_client_recv_publish_msg(model, ctx, &buf, true); in health_client_recv_status()
154 struct net_buf_simple *buf) in health_fault_status() argument
159 ctx->net_idx, ctx->app_idx, ctx->addr, buf->len, in health_fault_status()
160 bt_hex(buf->data, buf->len)); in health_fault_status()
162 status.test_id = net_buf_simple_pull_u8(buf); in health_fault_status()
163 status.cid = net_buf_simple_pull_le16(buf); in health_fault_status()
164 status.fault_array = bt_mesh_alloc_buf(buf->len); in health_fault_status()
[all …]
Dproxy_client.c50 struct net_buf_simple buf; member
80 net_buf_simple_reset(&server->buf); in proxy_sar_timeout()
116 struct net_buf_simple *buf) in filter_status() argument
121 if (buf->len != 3) { in filter_status()
122 BT_ERR("Invalid Proxy Filter Status length %d", buf->len); in filter_status()
126 filter_type = net_buf_simple_pull_u8(buf); in filter_status()
132 list_size = net_buf_simple_pull_be16(buf); in filter_status()
145 NET_BUF_SIMPLE_DEFINE(buf, 29); in proxy_cfg()
150 if (server->buf.len > 29) { in proxy_cfg()
151 BT_ERR("Too large proxy cfg pdu (len %d)", server->buf.len); in proxy_cfg()
[all …]
/hal_espressif-latest/components/wpa_supplicant/src/tls/
Dasn1.c171 int asn1_get_next(const u8 *buf, size_t len, struct asn1_hdr *hdr) in asn1_get_next() argument
177 pos = buf; in asn1_get_next()
178 end = buf + len; in asn1_get_next()
290 int asn1_parse_oid(const u8 *buf, size_t len, struct asn1_oid *oid) in asn1_parse_oid() argument
298 pos = buf; in asn1_parse_oid()
299 end = buf + len; in asn1_parse_oid()
334 int asn1_get_oid(const u8 *buf, size_t len, struct asn1_oid *oid, in asn1_get_oid() argument
339 if (asn1_get_next(buf, len, &hdr) < 0 || hdr.length == 0 || in asn1_get_oid()
351 void asn1_oid_to_str(const struct asn1_oid *oid, char *buf, size_t len) in asn1_oid_to_str() argument
353 char *pos = buf; in asn1_oid_to_str()
[all …]
/hal_espressif-latest/components/bt/porting/include/os/
Dendian.h217 void r_put_le16(void *buf, uint16_t x);
220 void r_put_le24(void *buf, uint32_t x);
223 void r_put_le32(void *buf, uint32_t x);
226 void r_put_le64(void *buf, uint64_t x);
229 uint16_t r_get_le16(const void *buf);
232 uint32_t r_get_le24(const void *buf);
235 uint32_t r_get_le32(const void *buf);
238 uint64_t r_get_le64(const void *buf);
241 void r_put_be16(void *buf, uint16_t x);
244 void r_put_be24(void *buf, uint32_t x);
[all …]
/hal_espressif-latest/components/bt/esp_ble_mesh/mesh_models/client/
Dlighting_client.c173 struct net_buf_simple *buf) in light_status() argument
180 BT_DBG("len %d, bytes %s", buf->len, bt_hex(buf->data, buf->len)); in light_status()
185 if (buf->len != 2 && buf->len != 5) { in light_status()
186 BT_ERR("Invalid Light Lightness Status length %d", buf->len); in light_status()
194 status->present_lightness = net_buf_simple_pull_le16(buf); in light_status()
195 if (buf->len) { in light_status()
197 status->target_lightness = net_buf_simple_pull_le16(buf); in light_status()
198 status->remain_time = net_buf_simple_pull_u8(buf); in light_status()
206 if (buf->len != 2 && buf->len != 5) { in light_status()
207 BT_ERR("Invalid Light Lightness Linear Status length %d", buf->len); in light_status()
[all …]
Dgeneric_client.c164 struct net_buf_simple *buf) in generic_status() argument
171 BT_DBG("len %d, bytes %s", buf->len, bt_hex(buf->data, buf->len)); in generic_status()
176 if (buf->len != 1 && buf->len != 3) { in generic_status()
177 BT_ERR("Invalid Generic OnOff Status length %d", buf->len); in generic_status()
185 status->present_onoff = net_buf_simple_pull_u8(buf); in generic_status()
186 if (buf->len) { in generic_status()
188 status->target_onoff = net_buf_simple_pull_u8(buf); in generic_status()
189 status->remain_time = net_buf_simple_pull_u8(buf); in generic_status()
197 if (buf->len != 2 && buf->len != 5) { in generic_status()
198 BT_ERR("Invalid Generic Level Status length %d", buf->len); in generic_status()
[all …]
/hal_espressif-latest/components/bt/common/osi/
Dbuffer.c47 buffer_t *buffer_new_ref(const buffer_t *buf) in buffer_new_ref() argument
49 assert(buf != NULL); in buffer_new_ref()
50 return buffer_new_slice(buf, buf->length); in buffer_new_ref()
53 buffer_t *buffer_new_slice(const buffer_t *buf, size_t slice_size) in buffer_new_slice() argument
55 assert(buf != NULL); in buffer_new_slice()
57 assert(slice_size <= buf->length); in buffer_new_slice()
65 ret->root = buf->root; in buffer_new_slice()
69 ++buf->root->refcount; in buffer_new_slice()
92 void *buffer_ptr(const buffer_t *buf) in buffer_ptr() argument
94 assert(buf != NULL); in buffer_ptr()
[all …]
/hal_espressif-latest/components/wpa_supplicant/src/eap_peer/
Deap_fast_pac.c185 char *buf; member
195 if (fgets(rc->buf, rc->buf_len, rc->f) == NULL) in eap_fast_read_line()
208 os_memcpy(rc->buf, rc->pos, len); in eap_fast_read_line()
209 rc->buf[len] = '\0'; in eap_fast_read_line()
213 rc->buf[rc->buf_len - 1] = '\0'; in eap_fast_read_line()
214 pos = rc->buf; in eap_fast_read_line()
223 pos = os_strchr(rc->buf, '='); in eap_fast_read_line()
235 u8 *buf; in eap_fast_parse_hex() local
243 buf = os_malloc(*len); in eap_fast_parse_hex()
244 if (buf == NULL) in eap_fast_parse_hex()
[all …]
/hal_espressif-latest/components/wpa_supplicant/src/common/
Drrm.c143 struct wpabuf *buf; in wpas_rrm_send_neighbor_rep_request() local
159 buf = wpabuf_alloc(3 + (ssid ? 2 + ssid->ssid_len : 0) + in wpas_rrm_send_neighbor_rep_request()
162 if (buf == NULL) { in wpas_rrm_send_neighbor_rep_request()
173 wpabuf_put_u8(buf, WLAN_ACTION_RADIO_MEASUREMENT); in wpas_rrm_send_neighbor_rep_request()
174 wpabuf_put_u8(buf, WLAN_RRM_NEIGHBOR_REPORT_REQUEST); in wpas_rrm_send_neighbor_rep_request()
175 wpabuf_put_u8(buf, wpa_s->rrm.next_neighbor_rep_token); in wpas_rrm_send_neighbor_rep_request()
177 wpabuf_put_u8(buf, WLAN_EID_SSID); in wpas_rrm_send_neighbor_rep_request()
178 wpabuf_put_u8(buf, ssid->ssid_len); in wpas_rrm_send_neighbor_rep_request()
179 wpabuf_put_data(buf, ssid->ssid, ssid->ssid_len); in wpas_rrm_send_neighbor_rep_request()
184 wpabuf_put_u8(buf, WLAN_EID_MEASURE_REQUEST); in wpas_rrm_send_neighbor_rep_request()
[all …]
/hal_espressif-latest/components/esp_hw_support/include/
Desp_crc.h25 static inline uint32_t esp_crc32_le(uint32_t crc, uint8_t const *buf, uint32_t len) in esp_crc32_le() argument
27 return esp_rom_crc32_le(crc, buf, len); in esp_crc32_le()
38 static inline uint32_t esp_crc32_be(uint32_t crc, uint8_t const *buf, uint32_t len) in esp_crc32_be() argument
40 return esp_rom_crc32_be(crc, buf, len); in esp_crc32_be()
51 static inline uint16_t esp_crc16_le(uint16_t crc, uint8_t const *buf, uint32_t len) in esp_crc16_le() argument
53 return esp_rom_crc16_le(crc, buf, len); in esp_crc16_le()
64 static inline uint16_t esp_crc16_be(uint16_t crc, uint8_t const *buf, uint32_t len) in esp_crc16_be() argument
66 return esp_rom_crc16_be(crc, buf, len); in esp_crc16_be()
77 static inline uint8_t esp_crc8_le(uint8_t crc, uint8_t const *buf, uint32_t len) in esp_crc8_le() argument
79 return esp_rom_crc8_le(crc, buf, len); in esp_crc8_le()
[all …]
/hal_espressif-latest/components/bt/esp_ble_mesh/mesh_core/storage/
Dsettings_nvs.c296 uint8_t *buf, size_t buf_len, bool *exist) in settings_load() argument
300 if (key == NULL || buf == NULL || exist == NULL) { in settings_load()
305 err = nvs_get_blob(handle, key, buf, &buf_len); in settings_load()
322 uint8_t *buf, size_t buf_len, bool *exist) in bt_mesh_load_settings() argument
326 err = settings_load(handle, key, buf, buf_len, exist); in bt_mesh_load_settings()
331 int bt_mesh_load_core_settings(const char *key, uint8_t *buf, size_t buf_len, bool *exist) in bt_mesh_load_core_settings() argument
334 return bt_mesh_load_settings(handle, key, buf, buf_len, exist); in bt_mesh_load_core_settings()
338 int bt_mesh_load_uid_settings(const char *key, uint8_t *buf, size_t buf_len, bool *exist) in bt_mesh_load_uid_settings() argument
341 return bt_mesh_load_settings(handle, key, buf, buf_len, exist); in bt_mesh_load_uid_settings()
375 struct net_buf_simple *buf = NULL; in settings_get_item() local
[all …]

12345678910>>...15