Home
last modified time | relevance | path

Searched refs:frag (Results 1 – 25 of 53) sorted by relevance

123

/Zephyr-latest/subsys/net/l2/ieee802154/
Dieee802154_6lo_fragment.c95 static inline void set_up_frag_hdr(struct net_buf *frag, uint16_t size, uint8_t offset) in set_up_frag_hdr() argument
100 uint8_t pos = frag->len; in set_up_frag_hdr()
104 net_buf_add(frag, NET_6LO_FRAG1_HDR_LEN); in set_up_frag_hdr()
105 frag->data[pos] = NET_6LO_DISPATCH_FRAG1; in set_up_frag_hdr()
107 net_buf_add(frag, NET_6LO_FRAGN_HDR_LEN); in set_up_frag_hdr()
108 frag->data[pos] = NET_6LO_DISPATCH_FRAGN; in set_up_frag_hdr()
111 set_datagram_size(frag->data + pos, size); in set_up_frag_hdr()
114 set_datagram_tag(frag->data + pos, datagram_tag); in set_up_frag_hdr()
118 frag->data[pos] = offset; in set_up_frag_hdr()
122 static inline uint8_t calc_payload_capacity(struct net_buf *frag) in calc_payload_capacity() argument
[all …]
Dieee802154_priv.h38 int ieee802154_radio_send(struct net_if *iface, struct net_pkt *pkt, struct net_buf *frag);
77 bool ieee802154_prepare_for_ack(struct net_if *iface, struct net_pkt *pkt, struct net_buf *frag);
Dieee802154.c100 struct net_buf *frag) in ieee802154_prepare_for_ack() argument
102 bool ack_required = ieee802154_is_ar_flag_set(frag); in ieee802154_prepare_for_ack()
109 struct ieee802154_fcf_seq *fs = (struct ieee802154_fcf_seq *)frag->data; in ieee802154_prepare_for_ack()
177 int ieee802154_radio_send(struct net_if *iface, struct net_pkt *pkt, struct net_buf *frag) in ieee802154_radio_send() argument
183 NET_DBG("frag %p", frag); in ieee802154_radio_send()
205 frag, iface); in ieee802154_radio_send()
211 ack_required = ieee802154_prepare_for_ack(iface, pkt, frag); in ieee802154_radio_send()
221 pkt, frag); in ieee802154_radio_send()
/Zephyr-latest/drivers/ethernet/
Deth_dwmac.c120 struct net_buf *frag; in net_pkt_get_nbfrags() local
123 for (frag = pkt->buffer; frag; frag = frag->frags) { in net_pkt_get_nbfrags()
132 struct net_buf *frag, *pinned; in dwmac_send() local
146 frag = pkt->buffer; in dwmac_send()
159 pinned = net_buf_clone(frag, TX_AVAIL_WAIT); in dwmac_send()
168 frag->data, pinned->data, pinned->len); in dwmac_send()
171 if (!frag->frags) { in dwmac_send()
188 frag = frag->frags; in dwmac_send()
189 } while (frag); in dwmac_send()
206 frag = p->tx_frags[d_idx]; in dwmac_send()
[all …]
Deth_stellaris.c68 struct net_buf *frag; in eth_stellaris_send() local
81 for (frag = pkt->frags; frag; frag = frag->frags) { in eth_stellaris_send()
82 for (i = 0U; i < frag->len; ++i) { in eth_stellaris_send()
83 eth_stellaris_send_byte(dev, frag->data[i]); in eth_stellaris_send()
Deth_xmc4xxx.c228 struct net_buf *frag; in eth_xmc4xxx_send() local
237 frag = pkt->frags; in eth_xmc4xxx_send()
238 while (frag) { in eth_xmc4xxx_send()
240 frag = frag->frags; in eth_xmc4xxx_send()
268 frag = pkt->frags; in eth_xmc4xxx_send()
269 while (frag) { in eth_xmc4xxx_send()
288 frag_data = frag->data; in eth_xmc4xxx_send()
289 frag_len = frag->len; in eth_xmc4xxx_send()
321 frag = frag->frags; in eth_xmc4xxx_send()
364 struct net_buf *frag, *last_frag = NULL; in eth_xmc4xxx_rx_pkt() local
[all …]
Deth_sam_gmac.c705 struct net_buf *frag; in tx_completed()
724 frag = UINT_TO_POINTER(ring_buf_get(&queue->tx_frag_list)); in tx_completed()
725 net_pkt_frag_unref(frag); in tx_completed()
726 LOG_DBG("Dropping frag %p", frag); in tx_completed()
758 struct net_buf *frag; in tx_error_handler() local
775 frag = UINT_TO_POINTER(tx_frag_list->buf[tx_frag_list->tail]); in tx_error_handler()
776 net_pkt_frag_unref(frag); in tx_error_handler()
777 LOG_DBG("Dropping frag %p", frag); in tx_error_handler()
1227 struct net_buf *frag; in frame_get() local
1274 frag = rx_frag_list[tail]; in frame_get()
[all …]
Deth_cyclonev.c407 struct net_buf *frag; in eth_cyclonev_send() local
410 frag = pkt->buffer; in eth_cyclonev_send()
436 if (frag) { in eth_cyclonev_send()
437 memcpy(&p->tx_buf[p->tx_current_desc_number * ETH_BUFFER_SIZE], frag->data, in eth_cyclonev_send()
442 tx_desc->control_buffer_size = (frag->len & ETH_DMATXDESC_TBS1); in eth_cyclonev_send()
446 (unsigned int)&p->tx_desc_ring[p->tx_current_desc_number], frag->len, in eth_cyclonev_send()
458 if (!frag->frags) { in eth_cyclonev_send()
470 if (!frag->frags) { in eth_cyclonev_send()
527 frag = frag->frags; in eth_cyclonev_send()
528 } while (frag); in eth_cyclonev_send()
/Zephyr-latest/subsys/net/ip/
Dnet_pkt.c271 #define NET_FRAG_CHECK_IF_NOT_IN_USE(frag, ref) \ argument
275 frag, __FILE__, __func__, __LINE__); \
312 struct net_buf *frag; in net_pkt_print_frags() local
325 frag = pkt->frags; in net_pkt_print_frags()
326 while (frag) { in net_pkt_print_frags()
327 total += frag->len; in net_pkt_print_frags()
329 frag_size = net_buf_max_len(frag); in net_pkt_print_frags()
332 count, frag, frag->len, frag->size, in net_pkt_print_frags()
333 frag_size, net_buf_pool_get(frag->pool_id)); in net_pkt_print_frags()
337 frag = frag->frags; in net_pkt_print_frags()
[all …]
/Zephyr-latest/lib/net_buf/
Dbuf.c586 void net_buf_frag_insert(struct net_buf *parent, struct net_buf *frag) in net_buf_frag_insert() argument
589 __ASSERT_NO_MSG(frag); in net_buf_frag_insert()
592 net_buf_frag_last(frag)->frags = parent->frags; in net_buf_frag_insert()
595 parent->frags = frag; in net_buf_frag_insert()
598 struct net_buf *net_buf_frag_add(struct net_buf *head, struct net_buf *frag) in net_buf_frag_add() argument
600 __ASSERT_NO_MSG(frag); in net_buf_frag_add()
603 return net_buf_ref(frag); in net_buf_frag_add()
606 net_buf_frag_insert(net_buf_frag_last(head), frag); in net_buf_frag_add()
613 struct net_buf *frag, in net_buf_frag_del_debug() argument
616 struct net_buf *net_buf_frag_del(struct net_buf *parent, struct net_buf *frag) in net_buf_frag_del_debug()
[all …]
/Zephyr-latest/tests/net/ieee802154/l2/src/
Dieee802154_fake_driver.c51 static inline void insert_frag(struct net_pkt *pkt, struct net_buf *frag) in insert_frag() argument
55 new_frag = net_pkt_get_frag(pkt, frag->len, K_SECONDS(1)); in insert_frag()
60 memcpy(new_frag->data, frag->data, frag->len); in insert_frag()
61 net_buf_add(new_frag, frag->len); in insert_frag()
69 struct net_buf *frag) in fake_tx() argument
78 insert_frag(pkt, frag); in fake_tx()
80 if (ieee802154_is_ar_flag_set(frag)) { in fake_tx()
/Zephyr-latest/tests/lib/net_buf/buf/src/
Dmain.c128 struct net_buf *frag, *head; in ZTEST() local
135 frag = head; in ZTEST()
137 frag->frags = net_buf_alloc_len(&bufs_pool, 74, K_NO_WAIT); in ZTEST()
138 zassert_not_null(frag->frags, "Failed to get fragment"); in ZTEST()
139 frag = frag->frags; in ZTEST()
178 struct net_buf *frag, *head; in ZTEST() local
186 frag = head; in ZTEST()
188 frag->frags = net_buf_alloc_len(&bufs_pool, 74, K_NO_WAIT); in ZTEST()
189 zassert_not_null(frag->frags, "Failed to get fragment"); in ZTEST()
190 frag = frag->frags; in ZTEST()
[all …]
/Zephyr-latest/drivers/wifi/esp_at/
Desp_socket.c108 struct net_buf *frag; in esp_socket_prepare_pkt() local
118 frag = src; in esp_socket_prepare_pkt()
121 while (frag && offset >= frag->len) { in esp_socket_prepare_pkt()
122 offset -= frag->len; in esp_socket_prepare_pkt()
123 frag = frag->frags; in esp_socket_prepare_pkt()
127 while (frag && len > 0) { in esp_socket_prepare_pkt()
128 to_copy = MIN(len, frag->len - offset); in esp_socket_prepare_pkt()
129 if (net_pkt_write(pkt, frag->data + offset, to_copy) != 0) { in esp_socket_prepare_pkt()
136 frag = frag->frags; in esp_socket_prepare_pkt()
/Zephyr-latest/tests/subsys/mgmt/mcumgr/smp_reassembly/src/
Dmain.c107 int frag; in ZTEST() local
117 frag = 40; in ZTEST()
118 ret = smp_reassembly_collect(&smpt, buff, frag); in ZTEST()
119 expected = TEST_FRAME_SIZE - frag; in ZTEST()
122 pkt_used = frag; in ZTEST()
125 frag = 40; in ZTEST()
126 ret = smp_reassembly_collect(&smpt, &buff[pkt_used], frag); in ZTEST()
127 pkt_used += frag; in ZTEST()
/Zephyr-latest/drivers/modem/
Dmodem_cmd_handler.c49 struct net_buf **frag, uint16_t *offset) in findcrlf() argument
67 *frag = buf; in findcrlf()
302 struct net_buf *frag = last; in cmd_handler_process_iface_data() local
303 size_t frag_room = net_buf_tailroom(frag); in cmd_handler_process_iface_data()
306 frag = net_buf_alloc(data->buf_pool, in cmd_handler_process_iface_data()
308 if (!frag) { in cmd_handler_process_iface_data()
313 net_buf_frag_insert(last, frag); in cmd_handler_process_iface_data()
314 last = frag; in cmd_handler_process_iface_data()
316 frag_room = net_buf_tailroom(frag); in cmd_handler_process_iface_data()
319 ret = iface->read(iface, net_buf_tail(frag), frag_room, in cmd_handler_process_iface_data()
[all …]
Dwncm14a2a.c342 struct net_buf *frag; in send_data() local
351 frag = pkt->frags; in send_data()
354 sock->socket_id, net_buf_frags_len(frag)); in send_data()
358 while (frag) { in send_data()
360 frag->data, frag->len); in send_data()
361 frag = frag->frags; in send_data()
398 static uint16_t net_buf_findcrlf(struct net_buf *buf, struct net_buf **frag, in net_buf_findcrlf() argument
416 *frag = buf; in net_buf_findcrlf()
560 struct net_buf *frag = NULL; in on_cmd_atcmdecho_nosock_imei() local
578 frag = NULL; in on_cmd_atcmdecho_nosock_imei()
[all …]
Dhl7800.c1414 struct net_buf *frag; in send_data() local
1428 frag = pkt->frags; in send_data()
1429 send_len = net_buf_frags_len(frag); in send_data()
1461 while (frag) { in send_data()
1462 actual_send_len += frag->len; in send_data()
1463 mdm_receiver_send(&iface_ctx.mdm_ctx, frag->data, frag->len); in send_data()
1464 frag = frag->frags; in send_data()
1515 static uint16_t net_buf_findcrlf(struct net_buf *buf, struct net_buf **frag) in net_buf_findcrlf() argument
1531 *frag = buf; in net_buf_findcrlf()
1679 struct net_buf *frag = NULL; in on_cmd_atcmdinfo_manufacturer() local
[all …]
/Zephyr-latest/tests/subsys/canbus/isotp/implementation/src/
Dmain.c114 static const uint8_t *check_frag(struct net_buf *frag, const uint8_t *data) in check_frag() argument
118 ret = memcmp(data, frag->data, frag->len); in check_frag()
121 print_hex(data, frag->len); in check_frag()
122 printk("\nreceived (%d bytes):\n", frag->len); in check_frag()
123 print_hex(frag->data, frag->len); in check_frag()
127 return data + frag->len; in check_frag()
274 struct net_buf *buf, *frag; in ZTEST() local
289 frag = buf; in ZTEST()
292 data_ptr = check_frag(frag, data_ptr); in ZTEST()
293 memset(frag->data, 0, frag->len); in ZTEST()
[all …]
/Zephyr-latest/subsys/net/lib/shell/
Dconn.c175 struct net_buf *frag = pkt->frags; in tcp_sent_list_cb() local
188 if (frag) { in tcp_sent_list_cb()
192 while (frag) { in tcp_sent_list_cb()
193 PR("%p[%d/%d]", frag, frag->ref, frag->len); in tcp_sent_list_cb()
195 frag = frag->frags; in tcp_sent_list_cb()
196 if (frag) { in tcp_sent_list_cb()
Dipv6.c38 struct net_buf *frag = reass->pkt[i]->frags; in ipv6_frag_cb() local
42 while (frag) { in ipv6_frag_cb()
43 PR("%p", frag); in ipv6_frag_cb()
45 frag = frag->frags; in ipv6_frag_cb()
46 if (frag) { in ipv6_frag_cb()
/Zephyr-latest/subsys/mgmt/mcumgr/transport/src/
Dserial_util.c44 const uint8_t *frag, int frag_len) in mcumgr_serial_decode_frag() argument
51 frag, frag_len); in mcumgr_serial_decode_frag()
70 const uint8_t *frag, int frag_len) in mcumgr_serial_process_frag() argument
88 op = sys_be16_to_cpu(*(uint16_t *)frag); in mcumgr_serial_process_frag()
106 frag + sizeof(op), in mcumgr_serial_process_frag()
Dsmp_dummy.c64 const uint8_t *frag, int frag_len);
68 const uint8_t *frag, uint16_t frag_len);
329 const uint8_t *frag, int frag_len) in mcumgr_dummy_decode_frag() argument
336 frag, frag_len); in mcumgr_dummy_decode_frag()
359 const uint8_t *frag, int frag_len) in mcumgr_dummy_process_frag() argument
373 op = mcumgr_dummy_parse_op(frag, frag_len); in mcumgr_dummy_process_frag()
391 frag + sizeof(op), in mcumgr_dummy_process_frag()
444 const uint8_t *frag, uint16_t frag_len) in mcumgr_dummy_process_frag_outgoing() argument
458 op = mcumgr_dummy_parse_op(frag, frag_len); in mcumgr_dummy_process_frag_outgoing()
476 frag + sizeof(op), in mcumgr_dummy_process_frag_outgoing()
/Zephyr-latest/tests/net/6lo/src/
Dmain.c464 struct net_buf *frag; in create_pkt() local
483 frag = net_pkt_get_frag(pkt, NET_IPV6UDPH_LEN, K_FOREVER); in create_pkt()
484 if (!frag) { in create_pkt()
490 memcpy(frag->data, (uint8_t *) data, NET_IPV6UDPH_LEN); in create_pkt()
491 net_buf_add(frag, NET_IPV6UDPH_LEN); in create_pkt()
493 memcpy(frag->data, (uint8_t *) data, NET_IPV6ICMPH_LEN); in create_pkt()
494 net_buf_add(frag, NET_IPV6ICMPH_LEN); in create_pkt()
497 memcpy(frag->data, (uint8_t *) data, NET_IPV6H_LEN); in create_pkt()
498 net_buf_add(frag, NET_IPV6H_LEN); in create_pkt()
515 frag->data[4] = len >> 8; in create_pkt()
[all …]
/Zephyr-latest/tests/net/ieee802154/6lo_fragment/src/
Dmain.c194 struct net_buf *frag; in compare_data() local
203 frag = pkt->frags; in compare_data()
205 if (memcmp(frag->data, (uint8_t *)data, NET_IPV6UDPH_LEN)) { in compare_data()
213 while (remaining > 0 && frag) { in compare_data()
214 bytes = frag->len - offset; in compare_data()
217 if (memcmp(frag->data + offset, user_data + pos, compare)) { in compare_data()
224 frag = frag->frags; in compare_data()
/Zephyr-latest/include/zephyr/net/
Dnet_pkt.h1587 struct net_buf *net_pkt_frag_ref_debug(struct net_buf *frag,
1589 #define net_pkt_frag_ref(frag) net_pkt_frag_ref_debug(frag, __func__, __LINE__) argument
1591 void net_pkt_frag_unref_debug(struct net_buf *frag,
1593 #define net_pkt_frag_unref(frag) \ argument
1594 net_pkt_frag_unref_debug(frag, __func__, __LINE__)
1598 struct net_buf *frag,
1600 #define net_pkt_frag_del(pkt, parent, frag) \ argument
1601 net_pkt_frag_del_debug(pkt, parent, frag, __func__, __LINE__)
1603 void net_pkt_frag_add_debug(struct net_pkt *pkt, struct net_buf *frag,
1605 #define net_pkt_frag_add(pkt, frag) \ argument
[all …]

123